@@ -9,16 +9,27 @@ import com.github.libretube.api.obj.SearchResult
99import com.github.libretube.api.obj.SegmentData
1010import com.github.libretube.api.obj.StreamItem
1111import com.github.libretube.api.obj.Streams
12+ import com.github.libretube.helpers.PlayerHelper
1213
1314interface MediaServiceRepository {
1415 suspend fun getTrending (region : String ): List <StreamItem >
1516 suspend fun getStreams (videoId : String ): Streams
1617 suspend fun getComments (videoId : String ): CommentsPage
17- suspend fun getSegments (videoId : String , category : String , actionType : String? = null): SegmentData
18+ suspend fun getSegments (
19+ videoId : String ,
20+ category : String ,
21+ actionType : String? = null
22+ ): SegmentData
23+
1824 suspend fun getDeArrowContent (videoIds : String ): Map <String , DeArrowContent >
1925 suspend fun getCommentsNextPage (videoId : String , nextPage : String ): CommentsPage
2026 suspend fun getSearchResults (searchQuery : String , filter : String ): SearchResult
21- suspend fun getSearchResultsNextPage (searchQuery : String , filter : String , nextPage : String ): SearchResult
27+ suspend fun getSearchResultsNextPage (
28+ searchQuery : String ,
29+ filter : String ,
30+ nextPage : String
31+ ): SearchResult
32+
2233 suspend fun getSuggestions (query : String ): List <String >
2334 suspend fun getChannel (channelId : String ): Channel
2435 suspend fun getChannelTab (data : String , nextPage : String? = null): ChannelTabResponse
@@ -29,7 +40,12 @@ interface MediaServiceRepository {
2940
3041 companion object {
3142 val instance by lazy {
32- PipedMediaServiceRepository ()
43+ if (PlayerHelper .disablePipedProxy && PlayerHelper .localStreamExtraction) {
44+ // TODO: LocalStreamsExtractionPipedMediaServiceRepository()
45+ NewPipeMediaServiceRepository ()
46+ } else {
47+ PipedMediaServiceRepository ()
48+ }
3349 }
3450 }
3551}
0 commit comments