This commit is contained in:
LagradOst 2022-06-17 19:37:06 +02:00
parent b433e753a1
commit efa7623495

View file

@ -901,8 +901,12 @@ interface LoadResponse {
/**better to call addTrailer with mutible trailers directly instead of calling this multiple times*/ /**better to call addTrailer with mutible trailers directly instead of calling this multiple times*/
suspend fun LoadResponse.addTrailer(trailerUrl: String?, referer: String? = null) { suspend fun LoadResponse.addTrailer(trailerUrl: String?, referer: String? = null) {
if (trailerUrl == null) return if (trailerUrl == null) return
try {
val newTrailers = loadExtractor(trailerUrl, referer) val newTrailers = loadExtractor(trailerUrl, referer)
addTrailer(newTrailers) addTrailer(newTrailers)
} catch (e: Exception) {
logError(e)
}
} }
fun LoadResponse.addTrailer(newTrailers: List<ExtractorLink>) { fun LoadResponse.addTrailer(newTrailers: List<ExtractorLink>) {