@@ -304,7 +304,7 @@ abstract class AnimeHttpSource : AnimeCatalogueSource {
304304 return client.newCall(hosterListRequest(episode))
305305 .awaitSuccess()
306306 .let { response ->
307- hosterListParse(response).sortHosters()
307+ hosterListParse(response)
308308 }
309309 }
310310
@@ -340,7 +340,7 @@ abstract class AnimeHttpSource : AnimeCatalogueSource {
340340 return client.newCall(videoListRequest(hoster))
341341 .awaitSuccess()
342342 .let { response ->
343- videoListParse(response, hoster).sortVideos()
343+ videoListParse(response, hoster)
344344 }
345345 }
346346
@@ -385,18 +385,17 @@ abstract class AnimeHttpSource : AnimeCatalogueSource {
385385 * @param episode the episode.
386386 * @return the videos for the episode.
387387 */
388- @Suppress(" DEPRECATION" )
389388 override suspend fun getVideoList (episode : SEpisode ): List <Video > {
389+ @Suppress(" DEPRECATION" )
390390 return fetchVideoList(episode).awaitSingle()
391391 }
392392
393- @Suppress(" DEPRECATION" )
394393 @Deprecated(" Use the non-RxJava API instead" , replaceWith = ReplaceWith (" getVideoList" ))
395394 override fun fetchVideoList (episode : SEpisode ): Observable <List <Video >> {
396395 return client.newCall(videoListRequest(episode))
397396 .asObservableSuccess()
398397 .map { response ->
399- videoListParse(response).sort()
398+ videoListParse(response)
400399 }
401400 }
402401
@@ -422,7 +421,7 @@ abstract class AnimeHttpSource : AnimeCatalogueSource {
422421 *
423422 * @since extensions-lib 16
424423 */
425- protected open fun List<Hoster>.sortHosters (): List <Hoster > {
424+ open fun List<Hoster>.sortHosters (): List <Hoster > {
426425 return this
427426 }
428427
@@ -431,8 +430,9 @@ abstract class AnimeHttpSource : AnimeCatalogueSource {
431430 *
432431 * @since extensions-lib 16
433432 */
434- protected open fun List<Video>.sortVideos (): List <Video > {
435- return this
433+ open fun List<Video>.sortVideos (): List <Video > {
434+ @Suppress(" DEPRECATION" )
435+ return sort()
436436 }
437437
438438 /* *
0 commit comments