Skip to content

Commit

Permalink
chore: change API Type to Audio Source
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Dec 2, 2023
1 parent 840e014 commit 2a87a0f
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/l10n/app_ar.arb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"developers": "المطورون",
"not_logged_in": "لم تقم بتسجيل الدخول",
"search_mode": "وضع البحث",
"youtube_api_type": "نوع الـAPI",
"audio_source": "مصدر الصوت",
"ok": "حسسناً",
"failed_to_encrypt": "فشل في التشفير",
"encryption_failed_warning": "يستخدم Spotube التشفير لتخزين بياناتك بشكل آمن. لكنها فشلت في القيام بذلك. لذلك سيعود الأمر إلى التخزين غير الآمن\nإذا كنت تستخدم Linux، فيرجى التأكد من تثبيت أي خدمة سرية (gnome-keyring، kde-wallet، keepassxc، إلخ)",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_bn.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "ডেভেলপার",
"not_logged_in": "আপনি লগইন করা নেই",
"search_mode": "অনুসন্ধান মোড",
"youtube_api_type": "API প্রকার",
"audio_source": "অডিও উৎস",
"ok": "ঠিক আছে",
"failed_to_encrypt": "এনক্রিপ্ট করা ব্যর্থ হয়েছে",
"encryption_failed_warning": "Spotube আপনার তথ্যগুলি নিরাপদভাবে স্টোর করতে এনক্রিপশন ব্যবহার করে। কিন্তু এটি ব্যর্থ হয়েছে। তাই এটি অনিরাপদ স্টোরে ফলফল হবে\nযদি আপনি Linux ব্যবহার করেন, তবে দয়া করে নিশ্চিত হউন যে আপনার কোনও সিক্রেট-সার্ভিস gnome-keyring, kde-wallet, keepassxc ইত্যাদি ইনস্টল করা আছে",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_ca.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "Desenvolupadors",
"not_logged_in": "No ha iniciat sesió",
"search_mode": "Mode de cerca",
"youtube_api_type": "Tipus d'API de YouTube",
"audio_source": "Font d'àudio",
"ok": "OK",
"failed_to_encrypt": "Error al xifrar",
"encryption_failed_warning": "Spotube utilitza el xifrado per emmagatzemar les seves dades de forma segura. Però ha fallat. Per tant, tornarà a un emmagatzament no segur\nSi estè utilizant Linux, asseguri's de tenir instal·lats els serveis secrets com gnome-keyring, kde-wallet i keepassxc",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "Entwickler",
"not_logged_in": "Sie sind nicht angemeldet",
"search_mode": "Suchmodus",
"youtube_api_type": "API-Typ",
"audio_source": "Audioquelle",
"ok": "OK",
"failed_to_encrypt": "Verschlüsselung fehlgeschlagen",
"encryption_failed_warning": "Spotube verwendet Verschlüsselung, um Ihre Daten sicher zu speichern. Dies ist jedoch fehlgeschlagen. Daher wird es auf unsichere Speicherung zurückgreifen\nWenn Sie Linux verwenden, stellen Sie bitte sicher, dass Sie Secret-Services wie gnome-keyring, kde-wallet und keepassxc installiert haben",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"developers": "Developers",
"not_logged_in": "You're not logged in",
"search_mode": "Search Mode",
"youtube_api_type": "API Type",
"audio_source": "Audio Source",
"ok": "Ok",
"failed_to_encrypt": "Failed to encrypt",
"encryption_failed_warning": "Spotube uses encryption to securely store your data. But failed to do so. So it'll fallback to insecure storage\nIf you're using linux, please make sure you've any secret-service (gnome-keyring, kde-wallet, keepassxc etc) installed",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "Desarrolladores",
"not_logged_in": "No has iniciado sesión",
"search_mode": "Modo de búsqueda",
"youtube_api_type": "Tipo de API de YouTube",
"audio_source": "Fuente de audio",
"ok": "OK",
"failed_to_encrypt": "Error al cifrar",
"encryption_failed_warning": "Spotube utiliza el cifrado para almacenar sus datos de forma segura. Pero ha fallado. Por lo tanto, volverá a un almacenamiento no seguro\nSi está utilizando Linux, asegúrese de tener instalados servicios secretos como gnome-keyring, kde-wallet y keepassxc",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_fa.arb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"developers": "توسعه دهنده ها",
"not_logged_in": "شما وارد نشده اید ",
"search_mode": "حالت جستجو",
"youtube_api_type": "API نوع",
"audio_source": "منبع صدا",
"ok": "باشد",
"failed_to_encrypt": "رمز گذاری نشده",
"encryption_failed_warning": "Spotube از رمزگذاری برای ذخیره ایمن داده های شما استفاده می کند. اما موفق به انجام این کار نشد. بنابراین به فضای ذخیره‌سازی ناامن تبدیل می‌شود\nاگر از لینوکس استفاده می‌کنید، لطفاً مطمئن شوید که سرویس مخفی (gnome-keyring، kde-wallet، keepassxc و غیره) را نصب کرده‌اید.",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "Développeurs",
"not_logged_in": "Vous n'êtes pas connecté(e)",
"search_mode": "Mode de recherche",
"youtube_api_type": "Type d'API",
"audio_source": "Source audio",
"ok": "OK",
"failed_to_encrypt": "Échec de la cryptage",
"encryption_failed_warning": "Spotube utilise le cryptage pour stocker vos données en toute sécurité. Mais cela a échoué. Il basculera donc vers un stockage non sécurisé\nSi vous utilisez Linux, assurez-vous d'avoir installé des services secrets tels que gnome-keyring, kde-wallet et keepassxc",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_hi.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "डेवलपर्स",
"not_logged_in": "आप लॉग इन नहीं हैं",
"search_mode": "खोज मोड",
"youtube_api_type": "API प्रकार",
"audio_source": "ऑडियो स्रोत",
"ok": "ठीक है",
"failed_to_encrypt": "एन्क्रिप्ट करने में विफल रहा",
"encryption_failed_warning": "Spotube आपके डेटा को सुरक्षित रूप से स्टोर करने के लिए एन्क्रिप्शन का उपयोग करता है। लेकिन इसमें विफल रहा। इसलिए, यह असुरक्षित स्टोरेज पर फॉलबैक करेगा\nयदि आप Linux का उपयोग कर रहे हैं, तो कृपया सुनिश्चित करें कि आपके पास gnome-keyring, kde-wallet, keepassxc आदि जैसी कोई सीक्रेट-सर्विस इंस्टॉल की गई है",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "開発",
"not_logged_in": "ログインしていません",
"search_mode": "検索モード",
"youtube_api_type": "APIの種類",
"audio_source": "音声ソース",
"ok": "分かりました",
"failed_to_encrypt": "暗号化に失敗しました",
"encryption_failed_warning": "Spotubeはデータを安全に保存するために暗号化を使用しています。しかし、失敗しました。したがって、安全でないストレージにフォールバックします\nLinuxを使用している場合は、gnome-keyring、kde-wallet、keepassxcなどのシークレットサービスがインストールされていることを確認してください",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_pl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "Developerzy",
"not_logged_in": "Nie jesteś zalogowany",
"search_mode": "Tryb szukania",
"youtube_api_type": "Typ API",
"audio_source": "Źródło dźwięku",
"ok": "Ok",
"failed_to_encrypt": "Nie można zaszyfrować :(",
"encryption_failed_warning": "Spotube używa szyfrowania do bezpiecznego przechowywania danych. Ale nie udało się tego zrobić. Więc powróci do niezabezpieczonego przechowywania\nJeśli używasz Linuksa, upewnij się, że masz zainstalowane jakieś usługi do szyfrowania (gnome-keyring, kde-wallet, keepassxc itp.)",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "Desenvolvedores",
"not_logged_in": "Você não está logado",
"search_mode": "Modo de Busca",
"youtube_api_type": "Tipo de API",
"audio_source": "Fonte de Áudio",
"ok": "Ok",
"failed_to_encrypt": "Falha ao criptografar",
"encryption_failed_warning": "O Spotube usa criptografia para armazenar seus dados com segurança, mas falhou em fazê-lo. Portanto, ele voltará para o armazenamento não seguro.\nSe você estiver usando o Linux, certifique-se de ter algum serviço secreto (gnome-keyring, kde-wallet, keepassxc, etc.) instalado",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "Разработчики",
"not_logged_in": "Вы не выполнили вход",
"search_mode": "Режим поиска",
"youtube_api_type": "Тип API",
"audio_source": "Источник аудио",
"ok": "Ок",
"failed_to_encrypt": "Не удалось зашифровать",
"encryption_failed_warning": "Spotube использует шифрование для безопасного хранения ваших данных. Однако в этом случае произошла ошибка. Поэтому будет использовано небезопасное хранилище.\nЕсли вы используете Linux, убедитесь, что у вас установлен какой-либо инструмент для работы с секретами (gnome-keyring, kde-wallet, keepassxc и т.д.)",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_tr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"developers": "Geliştiriciler",
"not_logged_in": "Giriş yapmadınız",
"search_mode": "Arama Modu",
"youtube_api_type": "API Türü",
"audio_source": "Ses Kaynağı",
"ok": "Tamam",
"failed_to_encrypt": "Şifreleme başarısız oldu",
"encryption_failed_warning": "Spotube, verilerinizi güvenli bir şekilde depolamak için şifreleme kullanır. Ancak bunu başaramadı. Bu nedenle güvensiz bir depolamaya geri dönecektir. Linux kullanıyorsanız, lütfen gnome-keyring, kde-wallet, keepassxc vb. gibi bir güvenlik hizmetinizin kurulu olduğundan emin olun.",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_uk.arb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"developers": "Розробники",
"not_logged_in": "Ви не ввійшли в обліковий запис",
"search_mode": "Режим пошуку",
"youtube_api_type": "Тип API",
"audio_source": "Джерело аудіо",
"ok": "Гаразд",
"failed_to_encrypt": "Не вдалося зашифрувати",
"encryption_failed_warning": "Spotube використовує шифрування для безпечного зберігання ваших даних. Але не вдалося цього зробити. Тому він перейде до небезпечного зберігання\nЯкщо ви використовуєте Linux, переконайтеся, що у вас встановлено будь-який секретний сервіс (gnome-keyring, kde-wallet, keepassxc тощо)",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"developers": "开发者",
"not_logged_in": "你尚未登录",
"search_mode": "搜索模式",
"youtube_api_type": "API 类型",
"audio_source": "音频源",
"ok": "确定",
"failed_to_encrypt": "加密失败",
"encryption_failed_warning": "Spotube使用加密来安全地存储您的数据。但是失败了。因此,它将回退到不安全的存储\n如果您使用Linux,请确保已安装gnome-keyring、kde-wallet和keepassxc等秘密服务",
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/settings/sections/playback.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SettingsPlaybackSection extends HookConsumerWidget {
),
AdaptiveSelectTile<AudioSource>(
secondary: const Icon(SpotubeIcons.api),
title: Text(context.l10n.youtube_api_type),
title: Text(context.l10n.audio_source),
value: preferences.audioSource,
options: AudioSource.values
.map((e) => DropdownMenuItem(
Expand Down
6 changes: 4 additions & 2 deletions lib/provider/proxy_playlist/proxy_playlist_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import 'package:spotube/services/discord/discord.dart';
import 'package:spotube/services/sourced_track/exceptions.dart';
import 'package:spotube/services/sourced_track/models/source_info.dart';
import 'package:spotube/services/sourced_track/sourced_track.dart';
import 'package:spotube/services/sourced_track/sources/piped.dart';
import 'package:spotube/services/sourced_track/sources/youtube.dart';

import 'package:spotube/utils/persisted_state_notifier.dart';
import 'package:spotube/utils/type_conversion_utils.dart';
Expand Down Expand Up @@ -161,8 +163,8 @@ class ProxyPlaylistNotifier extends PersistedStateNotifier<ProxyPlaylist>
return;
}
try {
final isNotYTMode = preferences.audioSource != AudioSource.youtube ||
(preferences.audioSource == AudioSource.piped &&
final isNotYTMode = state.activeTrack is! YoutubeSourcedTrack &&
(state.activeTrack is PipedSourcedTrack &&
preferences.searchMode == SearchMode.youtubeMusic);

if (isNotYTMode || !preferences.skipNonMusic) return;
Expand Down

0 comments on commit 2a87a0f

Please sign in to comment.