fix: default to youtube API by default

This commit is contained in:
Kingkor Roy Tirtho 2023-08-18 13:30:12 +06:00
parent f90e9bee31
commit 5a8a1e41e9
2 changed files with 8 additions and 8 deletions

View File

@ -512,10 +512,10 @@ abstract class LanguageLocals {
// name: "Persian",
// nativeName: "فارسی",
// ),
// "pl": const ISOLanguageName(
// name: "Polish",
// nativeName: "polski",
// ),
"pl": const ISOLanguageName(
name: "Polish",
nativeName: "polski",
),
// "ps": const ISOLanguageName(
// name: "Pashto, Pushto",
// nativeName: "پښتو",

View File

@ -82,9 +82,9 @@ class UserPreferences extends PersistedChangeNotifier {
this.showSystemTrayIcon = true,
this.locale = const Locale("system", "system"),
this.pipedInstance = "https://pipedapi.kavin.rocks",
this.searchMode = SearchMode.youtubeMusic,
this.searchMode = SearchMode.youtube,
this.skipNonMusic = true,
this.youtubeApiType = YoutubeApiType.piped,
this.youtubeApiType = YoutubeApiType.youtube,
}) : super() {
if (downloadLocation.isEmpty && !kIsWeb) {
_getDefaultDownloadDirectory().then(
@ -248,14 +248,14 @@ class UserPreferences extends PersistedChangeNotifier {
searchMode = SearchMode.values.firstWhere(
(mode) => mode.name == map["searchMode"],
orElse: () => SearchMode.youtubeMusic,
orElse: () => SearchMode.youtube,
);
skipNonMusic = map["skipNonMusic"] ?? skipNonMusic;
youtubeApiType = YoutubeApiType.values.firstWhere(
(type) => type.name == map["youtubeApiType"],
orElse: () => YoutubeApiType.piped,
orElse: () => YoutubeApiType.youtube,
);
}