Skip to content

Commit

Permalink
Specifically search for music tracks on YouTube Music
Browse files Browse the repository at this point in the history
  • Loading branch information
0xf4b1 committed Dec 23, 2023
1 parent 9608b3d commit 7aae907
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.schabi.newpipe.extractor.Page
import org.schabi.newpipe.extractor.ServiceList.YouTube
import org.schabi.newpipe.extractor.exceptions.ExtractionException
import org.schabi.newpipe.extractor.localization.Localization
import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory.MUSIC_SONGS
import org.schabi.newpipe.extractor.stream.StreamInfoItem
import java.io.IOException
import java.util.*
Expand Down Expand Up @@ -75,7 +76,7 @@ class Plugin(appContext: Context, context: Context) : IPlugin {
return emptyList()
}

val extractor = YouTube.getSearchExtractor(query)
val extractor = YouTube.getSearchExtractor(query, listOf(MUSIC_SONGS), "")
val itemsPage: ListExtractor.InfoItemsPage<InfoItem>

if (!reset && query == this.query) {
Expand Down

0 comments on commit 7aae907

Please sign in to comment.