From 7aae90760c52f90e456400e2c498b84024972f26 Mon Sep 17 00:00:00 2001 From: tiefensuche <10889432+tiefensuche@users.noreply.github.com> Date: Sat, 23 Dec 2023 15:59:59 +0100 Subject: [PATCH] Specifically search for music tracks on YouTube Music --- .../java/com/tiefensuche/soundcrowd/plugins/youtube/Plugin.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube/src/main/java/com/tiefensuche/soundcrowd/plugins/youtube/Plugin.kt b/youtube/src/main/java/com/tiefensuche/soundcrowd/plugins/youtube/Plugin.kt index 3afeb3c..625c87e 100644 --- a/youtube/src/main/java/com/tiefensuche/soundcrowd/plugins/youtube/Plugin.kt +++ b/youtube/src/main/java/com/tiefensuche/soundcrowd/plugins/youtube/Plugin.kt @@ -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.* @@ -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 if (!reset && query == this.query) {