feat: add setting default audio source support

This commit is contained in:
Kingkor Roy Tirtho 2025-10-25 23:23:27 +06:00
parent f6d9d64b7d
commit 3bc296cf22
56 changed files with 4960 additions and 392 deletions

File diff suppressed because one or more lines are too long

View File

@ -434,7 +434,10 @@
"update_available": "Update available", "update_available": "Update available",
"supports_scrobbling": "Supports scrobbling", "supports_scrobbling": "Supports scrobbling",
"plugin_scrobbling_info": "This plugin scrobbles your music to generate your listening history.", "plugin_scrobbling_info": "This plugin scrobbles your music to generate your listening history.",
"default_plugin": "Default", "default_metadata_source": "Default metadata source",
"set_default_metadata_source": "Set default metadata source",
"default_audio_source": "Default audio source",
"set_default_audio_source": "Set default audio source",
"set_default": "Set default", "set_default": "Set default",
"support": "Support", "support": "Support",
"support_plugin_development": "Support plugin development", "support_plugin_development": "Support plugin development",

View File

@ -2763,11 +2763,29 @@ abstract class AppLocalizations {
/// **'This plugin scrobbles your music to generate your listening history.'** /// **'This plugin scrobbles your music to generate your listening history.'**
String get plugin_scrobbling_info; String get plugin_scrobbling_info;
/// No description provided for @default_plugin. /// No description provided for @default_metadata_source.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Default'** /// **'Default metadata source'**
String get default_plugin; String get default_metadata_source;
/// No description provided for @set_default_metadata_source.
///
/// In en, this message translates to:
/// **'Set default metadata source'**
String get set_default_metadata_source;
/// No description provided for @default_audio_source.
///
/// In en, this message translates to:
/// **'Default audio source'**
String get default_audio_source;
/// No description provided for @set_default_audio_source.
///
/// In en, this message translates to:
/// **'Set default audio source'**
String get set_default_audio_source;
/// No description provided for @set_default. /// No description provided for @set_default.
/// ///

View File

@ -1443,7 +1443,16 @@ class AppLocalizationsAr extends AppLocalizations {
'تقوم هذه الإضافة بتتبع مقاطعك الموسيقية لإنشاء سجل الاستماع الخاص بك.'; 'تقوم هذه الإضافة بتتبع مقاطعك الموسيقية لإنشاء سجل الاستماع الخاص بك.';
@override @override
String get default_plugin => 'الافتراضي'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'تعيين كافتراضي'; String get set_default => 'تعيين كافتراضي';

View File

@ -1443,7 +1443,16 @@ class AppLocalizationsBn extends AppLocalizations {
'এই প্লাগইনটি আপনার সঙ্গীত স্ক্রোব্বল করে আপনার শোনা ইতিহাস তৈরি করে।'; 'এই প্লাগইনটি আপনার সঙ্গীত স্ক্রোব্বল করে আপনার শোনা ইতিহাস তৈরি করে।';
@override @override
String get default_plugin => 'ডিফল্ট'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'ডিফল্ট হিসাবে নির্ধারণ করুন'; String get set_default => 'ডিফল্ট হিসাবে নির্ধারণ করুন';

View File

@ -1450,7 +1450,16 @@ class AppLocalizationsCa extends AppLocalizations {
'Aquest complement fa scrobbling de la teva música per generar lhistorial descoltes.'; 'Aquest complement fa scrobbling de la teva música per generar lhistorial descoltes.';
@override @override
String get default_plugin => 'Predeterminat'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Establir com a predeterminat'; String get set_default => 'Establir com a predeterminat';

View File

@ -1442,7 +1442,16 @@ class AppLocalizationsCs extends AppLocalizations {
'Tento plugin scrobbles vaši hudbu pro vytvoření historie poslechů.'; 'Tento plugin scrobbles vaši hudbu pro vytvoření historie poslechů.';
@override @override
String get default_plugin => 'Výchozí'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Nastavit jako výchozí'; String get set_default => 'Nastavit jako výchozí';

View File

@ -1455,7 +1455,16 @@ class AppLocalizationsDe extends AppLocalizations {
'Dieses Plugin scrobbelt Ihre Musik, um Ihre Hörhistorie zu erstellen.'; 'Dieses Plugin scrobbelt Ihre Musik, um Ihre Hörhistorie zu erstellen.';
@override @override
String get default_plugin => 'Standard'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Als Standard festlegen'; String get set_default => 'Als Standard festlegen';

View File

@ -1442,7 +1442,16 @@ class AppLocalizationsEn extends AppLocalizations {
'This plugin scrobbles your music to generate your listening history.'; 'This plugin scrobbles your music to generate your listening history.';
@override @override
String get default_plugin => 'Default'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Set default'; String get set_default => 'Set default';

View File

@ -1452,7 +1452,16 @@ class AppLocalizationsEs extends AppLocalizations {
'Este complemento scrobblea tu música para generar tu historial de reproducción.'; 'Este complemento scrobblea tu música para generar tu historial de reproducción.';
@override @override
String get default_plugin => 'Predeterminado'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Establecer como predeterminado'; String get set_default => 'Establecer como predeterminado';

View File

@ -1451,7 +1451,16 @@ class AppLocalizationsEu extends AppLocalizations {
'Plugin honek zure musika scrobbled egiten du zure entzuteen historia sortzeko.'; 'Plugin honek zure musika scrobbled egiten du zure entzuteen historia sortzeko.';
@override @override
String get default_plugin => 'Lehenetsia'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Lehenetsi gisa ezarri'; String get set_default => 'Lehenetsi gisa ezarri';

View File

@ -1441,7 +1441,16 @@ class AppLocalizationsFa extends AppLocalizations {
'این افزونه موسیقی شما را اسکراب می‌کند تا تاریخچهٔ شنیداری‌تان را تولید کند.'; 'این افزونه موسیقی شما را اسکراب می‌کند تا تاریخچهٔ شنیداری‌تان را تولید کند.';
@override @override
String get default_plugin => 'پیش‌فرض'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'تنظیم به عنوان پیش‌فرض'; String get set_default => 'تنظیم به عنوان پیش‌فرض';

View File

@ -1443,7 +1443,16 @@ class AppLocalizationsFi extends AppLocalizations {
'Tämä lisäosa scrobblaa musiikkisi luodakseen kuunteluhistoriasi.'; 'Tämä lisäosa scrobblaa musiikkisi luodakseen kuunteluhistoriasi.';
@override @override
String get default_plugin => 'Oletus'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Aseta oletukseksi'; String get set_default => 'Aseta oletukseksi';

View File

@ -1457,7 +1457,16 @@ class AppLocalizationsFr extends AppLocalizations {
'Ce plugin scrobble votre musique pour générer votre historique d\'écoute.'; 'Ce plugin scrobble votre musique pour générer votre historique d\'écoute.';
@override @override
String get default_plugin => 'Par défaut'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Définir par défaut'; String get set_default => 'Définir par défaut';

View File

@ -1448,7 +1448,16 @@ class AppLocalizationsHi extends AppLocalizations {
'यह प्लगइन आपके सुनने के इतिहास को उत्पन्न करने के लिए आपके संगीत को स्क्रॉबल करता है।'; 'यह प्लगइन आपके सुनने के इतिहास को उत्पन्न करने के लिए आपके संगीत को स्क्रॉबल करता है।';
@override @override
String get default_plugin => 'डिफ़ॉल्ट'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'डिफ़ॉल्ट सेट करें'; String get set_default => 'डिफ़ॉल्ट सेट करें';

View File

@ -1449,7 +1449,16 @@ class AppLocalizationsId extends AppLocalizations {
'Plugin ini scrobble musik Anda untuk menghasilkan riwayat mendengarkan Anda.'; 'Plugin ini scrobble musik Anda untuk menghasilkan riwayat mendengarkan Anda.';
@override @override
String get default_plugin => 'Bawaan'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Atur sebagai bawaan'; String get set_default => 'Atur sebagai bawaan';

View File

@ -1448,7 +1448,16 @@ class AppLocalizationsIt extends AppLocalizations {
'Questo plugin scrobbla la tua musica per generare la tua cronologia di ascolti.'; 'Questo plugin scrobbla la tua musica per generare la tua cronologia di ascolti.';
@override @override
String get default_plugin => 'Predefinito'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Imposta come predefinito'; String get set_default => 'Imposta come predefinito';

View File

@ -1416,7 +1416,16 @@ class AppLocalizationsJa extends AppLocalizations {
String get plugin_scrobbling_info => 'このプラグインは、あなたの音楽をscrobbleして視聴履歴を生成します。'; String get plugin_scrobbling_info => 'このプラグインは、あなたの音楽をscrobbleして視聴履歴を生成します。';
@override @override
String get default_plugin => 'デフォルト'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'デフォルトに設定'; String get set_default => 'デフォルトに設定';

View File

@ -1448,7 +1448,16 @@ class AppLocalizationsKa extends AppLocalizations {
'ეს პლაგინი აწარმოებს თქვენი მუსიკის სქრობლინგს, რათა შექმნას თქვენი მოსმენის ისტორია.'; 'ეს პლაგინი აწარმოებს თქვენი მუსიკის სქრობლინგს, რათა შექმნას თქვენი მოსმენის ისტორია.';
@override @override
String get default_plugin => 'ნაგულისხმევი'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'ნაგულისხმევად დაყენება'; String get set_default => 'ნაგულისხმევად დაყენება';

View File

@ -1421,7 +1421,16 @@ class AppLocalizationsKo extends AppLocalizations {
String get plugin_scrobbling_info => '이 플러그인은 음악을 스크로블하여 청취 기록을 생성합니다.'; String get plugin_scrobbling_info => '이 플러그인은 음악을 스크로블하여 청취 기록을 생성합니다.';
@override @override
String get default_plugin => '기본'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => '기본값으로 설정'; String get set_default => '기본값으로 설정';

View File

@ -1454,7 +1454,16 @@ class AppLocalizationsNe extends AppLocalizations {
'यो प्लगइनले तपाईंको सुन्ने इतिहास उत्पन्न गर्न तपाईंको संगीतलाई स्क्रब्बल गर्दछ।'; 'यो प्लगइनले तपाईंको सुन्ने इतिहास उत्पन्न गर्न तपाईंको संगीतलाई स्क्रब्बल गर्दछ।';
@override @override
String get default_plugin => 'पूर्वनिर्धारित'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'पूर्वनिर्धारित सेट गर्नुहोस्'; String get set_default => 'पूर्वनिर्धारित सेट गर्नुहोस्';

View File

@ -1446,7 +1446,16 @@ class AppLocalizationsNl extends AppLocalizations {
'Deze plugin scrobblet uw muziek om uw luistergeschiedenis te genereren.'; 'Deze plugin scrobblet uw muziek om uw luistergeschiedenis te genereren.';
@override @override
String get default_plugin => 'Standaard'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Instellen als standaard'; String get set_default => 'Instellen als standaard';

View File

@ -1449,7 +1449,16 @@ class AppLocalizationsPl extends AppLocalizations {
'Ta wtyczka scrobbluje Twoją muzykę, aby wygenerować historię odsłuchań.'; 'Ta wtyczka scrobbluje Twoją muzykę, aby wygenerować historię odsłuchań.';
@override @override
String get default_plugin => 'Domyślna'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Ustaw jako domyślną'; String get set_default => 'Ustaw jako domyślną';

View File

@ -1446,7 +1446,16 @@ class AppLocalizationsPt extends AppLocalizations {
'Este plugin faz o scrobbling de sua música para gerar seu histórico de audição.'; 'Este plugin faz o scrobbling de sua música para gerar seu histórico de audição.';
@override @override
String get default_plugin => 'Padrão'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Definir como padrão'; String get set_default => 'Definir como padrão';

View File

@ -1448,7 +1448,16 @@ class AppLocalizationsRu extends AppLocalizations {
'Этот плагин скробблит вашу музыку для создания вашей истории прослушиваний.'; 'Этот плагин скробблит вашу музыку для создания вашей истории прослушиваний.';
@override @override
String get default_plugin => 'По умолчанию'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Установить по умолчанию'; String get set_default => 'Установить по умолчанию';

View File

@ -1455,7 +1455,16 @@ class AppLocalizationsTa extends AppLocalizations {
'இந்த பிளகின் உங்கள் கேட்பதின் வரலாற்றை உருவாக்க உங்கள் இசையை ஸ்க்ரோப்ள் செய்கிறது.'; 'இந்த பிளகின் உங்கள் கேட்பதின் வரலாற்றை உருவாக்க உங்கள் இசையை ஸ்க்ரோப்ள் செய்கிறது.';
@override @override
String get default_plugin => 'இயல்புநிலை'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'இயல்புநிலையாக அமைக்கவும்'; String get set_default => 'இயல்புநிலையாக அமைக்கவும்';

View File

@ -1440,7 +1440,16 @@ class AppLocalizationsTh extends AppLocalizations {
'ปลั๊กอินนี้จะ scrobble เพลงของคุณเพื่อสร้างประวัติการฟังของคุณ'; 'ปลั๊กอินนี้จะ scrobble เพลงของคุณเพื่อสร้างประวัติการฟังของคุณ';
@override @override
String get default_plugin => 'ค่าเริ่มต้น'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'ตั้งค่าเริ่มต้น'; String get set_default => 'ตั้งค่าเริ่มต้น';

View File

@ -1456,7 +1456,16 @@ class AppLocalizationsTl extends AppLocalizations {
'Sinis-scrobble ng plugin na ito ang iyong musika upang mabuo ang iyong kasaysayan ng pakikinig.'; 'Sinis-scrobble ng plugin na ito ang iyong musika upang mabuo ang iyong kasaysayan ng pakikinig.';
@override @override
String get default_plugin => 'Default'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Itakda bilang default'; String get set_default => 'Itakda bilang default';

View File

@ -1450,7 +1450,16 @@ class AppLocalizationsTr extends AppLocalizations {
'Bu eklenti, dinleme geçmişinizi oluşturmak için müziğinizi scrobble eder.'; 'Bu eklenti, dinleme geçmişinizi oluşturmak için müziğinizi scrobble eder.';
@override @override
String get default_plugin => 'Varsayılan'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Varsayılan olarak ayarla'; String get set_default => 'Varsayılan olarak ayarla';

View File

@ -1446,7 +1446,16 @@ class AppLocalizationsUk extends AppLocalizations {
'Цей плагін скроббить вашу музику, щоб створити вашу історію прослуховувань.'; 'Цей плагін скроббить вашу музику, щоб створити вашу історію прослуховувань.';
@override @override
String get default_plugin => 'За замовчуванням'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Встановити за замовчуванням'; String get set_default => 'Встановити за замовчуванням';

View File

@ -1450,7 +1450,16 @@ class AppLocalizationsVi extends AppLocalizations {
'Plugin này scrobble nhạc của bạn để tạo lịch sử nghe của bạn.'; 'Plugin này scrobble nhạc của bạn để tạo lịch sử nghe của bạn.';
@override @override
String get default_plugin => 'Mặc định'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => 'Đặt làm mặc định'; String get set_default => 'Đặt làm mặc định';

View File

@ -1412,7 +1412,16 @@ class AppLocalizationsZh extends AppLocalizations {
String get plugin_scrobbling_info => '此插件会 scrobble 您的音乐以生成您的收听历史记录。'; String get plugin_scrobbling_info => '此插件会 scrobble 您的音乐以生成您的收听历史记录。';
@override @override
String get default_plugin => '默认'; String get default_metadata_source => 'Default metadata source';
@override
String get set_default_metadata_source => 'Set default metadata source';
@override
String get default_audio_source => 'Default audio source';
@override
String get set_default_audio_source => 'Set default audio source';
@override @override
String get set_default => '设为默认'; String get set_default => '设为默认';
@ -2920,9 +2929,6 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override @override
String get plugin_scrobbling_info => '此外掛程式會 Scrobble 您的音樂以產生您的收聽記錄。'; String get plugin_scrobbling_info => '此外掛程式會 Scrobble 您的音樂以產生您的收聽記錄。';
@override
String get default_plugin => '預設';
@override @override
String get set_default => '設為預設'; String get set_default => '設為預設';

View File

@ -150,11 +150,13 @@ class Spotube extends HookConsumerWidget {
ref.listen(audioPlayerStreamListenersProvider, (_, __) {}); ref.listen(audioPlayerStreamListenersProvider, (_, __) {});
ref.listen(bonsoirProvider, (_, __) {}); ref.listen(bonsoirProvider, (_, __) {});
ref.listen(connectClientsProvider, (_, __) {}); ref.listen(connectClientsProvider, (_, __) {});
ref.listen(metadataPluginsProvider, (_, __) {});
ref.listen(metadataPluginProvider, (_, __) {});
ref.listen(serverProvider, (_, __) {}); ref.listen(serverProvider, (_, __) {});
ref.listen(trayManagerProvider, (_, __) {}); ref.listen(trayManagerProvider, (_, __) {});
ref.listen(metadataPluginsProvider, (_, __) {});
ref.listen(metadataPluginProvider, (_, __) {});
ref.listen(audioSourcePluginProvider, (_, __) {});
ref.listen(metadataPluginUpdateCheckerProvider, (_, __) {}); ref.listen(metadataPluginUpdateCheckerProvider, (_, __) {});
ref.listen(audioSourcePluginUpdateCheckerProvider, (_, __) {});
useFixWindowStretching(); useFixWindowStretching();
useDisableBatteryOptimizations(); useDisableBatteryOptimizations();

View File

@ -58,14 +58,14 @@ part 'typeconverters/subtitle.dart';
AudioPlayerStateTable, AudioPlayerStateTable,
HistoryTable, HistoryTable,
LyricsTable, LyricsTable,
MetadataPluginsTable, PluginsTable,
], ],
) )
class AppDatabase extends _$AppDatabase { class AppDatabase extends _$AppDatabase {
AppDatabase() : super(_openConnection()); AppDatabase() : super(_openConnection());
@override @override
int get schemaVersion => 8; int get schemaVersion => 9;
@override @override
MigrationStrategy get migration { MigrationStrategy get migration {
@ -199,6 +199,18 @@ class AppDatabase extends _$AppDatabase {
} }
}); });
}, },
from8To9: (m, schema) async {
await m.renameTable(schema.pluginsTable, "metadata_plugins_table");
await m.renameColumn(
schema.pluginsTable,
"selected",
pluginsTable.selectedForMetadata,
);
await m.addColumn(
schema.pluginsTable,
pluginsTable.selectedForAudioSource,
);
},
), ),
); );
} }

View File

@ -3740,12 +3740,12 @@ class LyricsTableCompanion extends UpdateCompanion<LyricsTableData> {
} }
} }
class $MetadataPluginsTableTable extends MetadataPluginsTable class $PluginsTableTable extends PluginsTable
with TableInfo<$MetadataPluginsTableTable, MetadataPluginsTableData> { with TableInfo<$PluginsTableTable, PluginsTableData> {
@override @override
final GeneratedDatabase attachedDatabase; final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$MetadataPluginsTableTable(this.attachedDatabase, [this._alias]); $PluginsTableTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id'); static const VerificationMeta _idMeta = const VerificationMeta('id');
@override @override
late final GeneratedColumn<int> id = GeneratedColumn<int>( late final GeneratedColumn<int> id = GeneratedColumn<int>(
@ -3790,23 +3790,31 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
late final GeneratedColumnWithTypeConverter<List<String>, String> apis = late final GeneratedColumnWithTypeConverter<List<String>, String> apis =
GeneratedColumn<String>('apis', aliasedName, false, GeneratedColumn<String>('apis', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true) type: DriftSqlType.string, requiredDuringInsert: true)
.withConverter<List<String>>( .withConverter<List<String>>($PluginsTableTable.$converterapis);
$MetadataPluginsTableTable.$converterapis);
@override @override
late final GeneratedColumnWithTypeConverter<List<String>, String> abilities = late final GeneratedColumnWithTypeConverter<List<String>, String> abilities =
GeneratedColumn<String>('abilities', aliasedName, false, GeneratedColumn<String>('abilities', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true) type: DriftSqlType.string, requiredDuringInsert: true)
.withConverter<List<String>>( .withConverter<List<String>>($PluginsTableTable.$converterabilities);
$MetadataPluginsTableTable.$converterabilities); static const VerificationMeta _selectedForMetadataMeta =
static const VerificationMeta _selectedMeta = const VerificationMeta('selectedForMetadata');
const VerificationMeta('selected');
@override @override
late final GeneratedColumn<bool> selected = GeneratedColumn<bool>( late final GeneratedColumn<bool> selectedForMetadata = GeneratedColumn<bool>(
'selected', aliasedName, false, 'selected_for_metadata', aliasedName, false,
type: DriftSqlType.bool, type: DriftSqlType.bool,
requiredDuringInsert: false, requiredDuringInsert: false,
defaultConstraints: defaultConstraints: GeneratedColumn.constraintIsAlways(
GeneratedColumn.constraintIsAlways('CHECK ("selected" IN (0, 1))'), 'CHECK ("selected_for_metadata" IN (0, 1))'),
defaultValue: const Constant(false));
static const VerificationMeta _selectedForAudioSourceMeta =
const VerificationMeta('selectedForAudioSource');
@override
late final GeneratedColumn<bool> selectedForAudioSource =
GeneratedColumn<bool>('selected_for_audio_source', aliasedName, false,
type: DriftSqlType.bool,
requiredDuringInsert: false,
defaultConstraints: GeneratedColumn.constraintIsAlways(
'CHECK ("selected_for_audio_source" IN (0, 1))'),
defaultValue: const Constant(false)); defaultValue: const Constant(false));
static const VerificationMeta _repositoryMeta = static const VerificationMeta _repositoryMeta =
const VerificationMeta('repository'); const VerificationMeta('repository');
@ -3821,7 +3829,7 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
'plugin_api_version', aliasedName, false, 'plugin_api_version', aliasedName, false,
type: DriftSqlType.string, type: DriftSqlType.string,
requiredDuringInsert: false, requiredDuringInsert: false,
defaultValue: const Constant('1.0.0')); defaultValue: const Constant('2.0.0'));
@override @override
List<GeneratedColumn> get $columns => [ List<GeneratedColumn> get $columns => [
id, id,
@ -3832,7 +3840,8 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
entryPoint, entryPoint,
apis, apis,
abilities, abilities,
selected, selectedForMetadata,
selectedForAudioSource,
repository, repository,
pluginApiVersion pluginApiVersion
]; ];
@ -3840,10 +3849,9 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
String get aliasedName => _alias ?? actualTableName; String get aliasedName => _alias ?? actualTableName;
@override @override
String get actualTableName => $name; String get actualTableName => $name;
static const String $name = 'metadata_plugins_table'; static const String $name = 'plugins_table';
@override @override
VerificationContext validateIntegrity( VerificationContext validateIntegrity(Insertable<PluginsTableData> instance,
Insertable<MetadataPluginsTableData> instance,
{bool isInserting = false}) { {bool isInserting = false}) {
final context = VerificationContext(); final context = VerificationContext();
final data = instance.toColumns(true); final data = instance.toColumns(true);
@ -3884,9 +3892,17 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
} else if (isInserting) { } else if (isInserting) {
context.missing(_entryPointMeta); context.missing(_entryPointMeta);
} }
if (data.containsKey('selected')) { if (data.containsKey('selected_for_metadata')) {
context.handle(_selectedMeta, context.handle(
selected.isAcceptableOrUnknown(data['selected']!, _selectedMeta)); _selectedForMetadataMeta,
selectedForMetadata.isAcceptableOrUnknown(
data['selected_for_metadata']!, _selectedForMetadataMeta));
}
if (data.containsKey('selected_for_audio_source')) {
context.handle(
_selectedForAudioSourceMeta,
selectedForAudioSource.isAcceptableOrUnknown(
data['selected_for_audio_source']!, _selectedForAudioSourceMeta));
} }
if (data.containsKey('repository')) { if (data.containsKey('repository')) {
context.handle( context.handle(
@ -3906,10 +3922,9 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
@override @override
Set<GeneratedColumn> get $primaryKey => {id}; Set<GeneratedColumn> get $primaryKey => {id};
@override @override
MetadataPluginsTableData map(Map<String, dynamic> data, PluginsTableData map(Map<String, dynamic> data, {String? tablePrefix}) {
{String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return MetadataPluginsTableData( return PluginsTableData(
id: attachedDatabase.typeMapping id: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}id'])!, .read(DriftSqlType.int, data['${effectivePrefix}id'])!,
name: attachedDatabase.typeMapping name: attachedDatabase.typeMapping
@ -3922,14 +3937,17 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
.read(DriftSqlType.string, data['${effectivePrefix}author'])!, .read(DriftSqlType.string, data['${effectivePrefix}author'])!,
entryPoint: attachedDatabase.typeMapping entryPoint: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}entry_point'])!, .read(DriftSqlType.string, data['${effectivePrefix}entry_point'])!,
apis: $MetadataPluginsTableTable.$converterapis.fromSql(attachedDatabase apis: $PluginsTableTable.$converterapis.fromSql(attachedDatabase
.typeMapping .typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}apis'])!), .read(DriftSqlType.string, data['${effectivePrefix}apis'])!),
abilities: $MetadataPluginsTableTable.$converterabilities.fromSql( abilities: $PluginsTableTable.$converterabilities.fromSql(attachedDatabase
attachedDatabase.typeMapping .typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}abilities'])!), .read(DriftSqlType.string, data['${effectivePrefix}abilities'])!),
selected: attachedDatabase.typeMapping selectedForMetadata: attachedDatabase.typeMapping.read(
.read(DriftSqlType.bool, data['${effectivePrefix}selected'])!, DriftSqlType.bool, data['${effectivePrefix}selected_for_metadata'])!,
selectedForAudioSource: attachedDatabase.typeMapping.read(
DriftSqlType.bool,
data['${effectivePrefix}selected_for_audio_source'])!,
repository: attachedDatabase.typeMapping repository: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}repository']), .read(DriftSqlType.string, data['${effectivePrefix}repository']),
pluginApiVersion: attachedDatabase.typeMapping.read( pluginApiVersion: attachedDatabase.typeMapping.read(
@ -3938,8 +3956,8 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
} }
@override @override
$MetadataPluginsTableTable createAlias(String alias) { $PluginsTableTable createAlias(String alias) {
return $MetadataPluginsTableTable(attachedDatabase, alias); return $PluginsTableTable(attachedDatabase, alias);
} }
static TypeConverter<List<String>, String> $converterapis = static TypeConverter<List<String>, String> $converterapis =
@ -3948,8 +3966,8 @@ class $MetadataPluginsTableTable extends MetadataPluginsTable
const StringListConverter(); const StringListConverter();
} }
class MetadataPluginsTableData extends DataClass class PluginsTableData extends DataClass
implements Insertable<MetadataPluginsTableData> { implements Insertable<PluginsTableData> {
final int id; final int id;
final String name; final String name;
final String description; final String description;
@ -3958,10 +3976,11 @@ class MetadataPluginsTableData extends DataClass
final String entryPoint; final String entryPoint;
final List<String> apis; final List<String> apis;
final List<String> abilities; final List<String> abilities;
final bool selected; final bool selectedForMetadata;
final bool selectedForAudioSource;
final String? repository; final String? repository;
final String pluginApiVersion; final String pluginApiVersion;
const MetadataPluginsTableData( const PluginsTableData(
{required this.id, {required this.id,
required this.name, required this.name,
required this.description, required this.description,
@ -3970,7 +3989,8 @@ class MetadataPluginsTableData extends DataClass
required this.entryPoint, required this.entryPoint,
required this.apis, required this.apis,
required this.abilities, required this.abilities,
required this.selected, required this.selectedForMetadata,
required this.selectedForAudioSource,
this.repository, this.repository,
required this.pluginApiVersion}); required this.pluginApiVersion});
@override @override
@ -3983,14 +4003,15 @@ class MetadataPluginsTableData extends DataClass
map['author'] = Variable<String>(author); map['author'] = Variable<String>(author);
map['entry_point'] = Variable<String>(entryPoint); map['entry_point'] = Variable<String>(entryPoint);
{ {
map['apis'] = Variable<String>( map['apis'] =
$MetadataPluginsTableTable.$converterapis.toSql(apis)); Variable<String>($PluginsTableTable.$converterapis.toSql(apis));
} }
{ {
map['abilities'] = Variable<String>( map['abilities'] = Variable<String>(
$MetadataPluginsTableTable.$converterabilities.toSql(abilities)); $PluginsTableTable.$converterabilities.toSql(abilities));
} }
map['selected'] = Variable<bool>(selected); map['selected_for_metadata'] = Variable<bool>(selectedForMetadata);
map['selected_for_audio_source'] = Variable<bool>(selectedForAudioSource);
if (!nullToAbsent || repository != null) { if (!nullToAbsent || repository != null) {
map['repository'] = Variable<String>(repository); map['repository'] = Variable<String>(repository);
} }
@ -3998,8 +4019,8 @@ class MetadataPluginsTableData extends DataClass
return map; return map;
} }
MetadataPluginsTableCompanion toCompanion(bool nullToAbsent) { PluginsTableCompanion toCompanion(bool nullToAbsent) {
return MetadataPluginsTableCompanion( return PluginsTableCompanion(
id: Value(id), id: Value(id),
name: Value(name), name: Value(name),
description: Value(description), description: Value(description),
@ -4008,7 +4029,8 @@ class MetadataPluginsTableData extends DataClass
entryPoint: Value(entryPoint), entryPoint: Value(entryPoint),
apis: Value(apis), apis: Value(apis),
abilities: Value(abilities), abilities: Value(abilities),
selected: Value(selected), selectedForMetadata: Value(selectedForMetadata),
selectedForAudioSource: Value(selectedForAudioSource),
repository: repository == null && nullToAbsent repository: repository == null && nullToAbsent
? const Value.absent() ? const Value.absent()
: Value(repository), : Value(repository),
@ -4016,10 +4038,10 @@ class MetadataPluginsTableData extends DataClass
); );
} }
factory MetadataPluginsTableData.fromJson(Map<String, dynamic> json, factory PluginsTableData.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) { {ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer; serializer ??= driftRuntimeOptions.defaultSerializer;
return MetadataPluginsTableData( return PluginsTableData(
id: serializer.fromJson<int>(json['id']), id: serializer.fromJson<int>(json['id']),
name: serializer.fromJson<String>(json['name']), name: serializer.fromJson<String>(json['name']),
description: serializer.fromJson<String>(json['description']), description: serializer.fromJson<String>(json['description']),
@ -4028,7 +4050,10 @@ class MetadataPluginsTableData extends DataClass
entryPoint: serializer.fromJson<String>(json['entryPoint']), entryPoint: serializer.fromJson<String>(json['entryPoint']),
apis: serializer.fromJson<List<String>>(json['apis']), apis: serializer.fromJson<List<String>>(json['apis']),
abilities: serializer.fromJson<List<String>>(json['abilities']), abilities: serializer.fromJson<List<String>>(json['abilities']),
selected: serializer.fromJson<bool>(json['selected']), selectedForMetadata:
serializer.fromJson<bool>(json['selectedForMetadata']),
selectedForAudioSource:
serializer.fromJson<bool>(json['selectedForAudioSource']),
repository: serializer.fromJson<String?>(json['repository']), repository: serializer.fromJson<String?>(json['repository']),
pluginApiVersion: serializer.fromJson<String>(json['pluginApiVersion']), pluginApiVersion: serializer.fromJson<String>(json['pluginApiVersion']),
); );
@ -4045,13 +4070,14 @@ class MetadataPluginsTableData extends DataClass
'entryPoint': serializer.toJson<String>(entryPoint), 'entryPoint': serializer.toJson<String>(entryPoint),
'apis': serializer.toJson<List<String>>(apis), 'apis': serializer.toJson<List<String>>(apis),
'abilities': serializer.toJson<List<String>>(abilities), 'abilities': serializer.toJson<List<String>>(abilities),
'selected': serializer.toJson<bool>(selected), 'selectedForMetadata': serializer.toJson<bool>(selectedForMetadata),
'selectedForAudioSource': serializer.toJson<bool>(selectedForAudioSource),
'repository': serializer.toJson<String?>(repository), 'repository': serializer.toJson<String?>(repository),
'pluginApiVersion': serializer.toJson<String>(pluginApiVersion), 'pluginApiVersion': serializer.toJson<String>(pluginApiVersion),
}; };
} }
MetadataPluginsTableData copyWith( PluginsTableData copyWith(
{int? id, {int? id,
String? name, String? name,
String? description, String? description,
@ -4060,10 +4086,11 @@ class MetadataPluginsTableData extends DataClass
String? entryPoint, String? entryPoint,
List<String>? apis, List<String>? apis,
List<String>? abilities, List<String>? abilities,
bool? selected, bool? selectedForMetadata,
bool? selectedForAudioSource,
Value<String?> repository = const Value.absent(), Value<String?> repository = const Value.absent(),
String? pluginApiVersion}) => String? pluginApiVersion}) =>
MetadataPluginsTableData( PluginsTableData(
id: id ?? this.id, id: id ?? this.id,
name: name ?? this.name, name: name ?? this.name,
description: description ?? this.description, description: description ?? this.description,
@ -4072,13 +4099,14 @@ class MetadataPluginsTableData extends DataClass
entryPoint: entryPoint ?? this.entryPoint, entryPoint: entryPoint ?? this.entryPoint,
apis: apis ?? this.apis, apis: apis ?? this.apis,
abilities: abilities ?? this.abilities, abilities: abilities ?? this.abilities,
selected: selected ?? this.selected, selectedForMetadata: selectedForMetadata ?? this.selectedForMetadata,
selectedForAudioSource:
selectedForAudioSource ?? this.selectedForAudioSource,
repository: repository.present ? repository.value : this.repository, repository: repository.present ? repository.value : this.repository,
pluginApiVersion: pluginApiVersion ?? this.pluginApiVersion, pluginApiVersion: pluginApiVersion ?? this.pluginApiVersion,
); );
MetadataPluginsTableData copyWithCompanion( PluginsTableData copyWithCompanion(PluginsTableCompanion data) {
MetadataPluginsTableCompanion data) { return PluginsTableData(
return MetadataPluginsTableData(
id: data.id.present ? data.id.value : this.id, id: data.id.present ? data.id.value : this.id,
name: data.name.present ? data.name.value : this.name, name: data.name.present ? data.name.value : this.name,
description: description:
@ -4089,7 +4117,12 @@ class MetadataPluginsTableData extends DataClass
data.entryPoint.present ? data.entryPoint.value : this.entryPoint, data.entryPoint.present ? data.entryPoint.value : this.entryPoint,
apis: data.apis.present ? data.apis.value : this.apis, apis: data.apis.present ? data.apis.value : this.apis,
abilities: data.abilities.present ? data.abilities.value : this.abilities, abilities: data.abilities.present ? data.abilities.value : this.abilities,
selected: data.selected.present ? data.selected.value : this.selected, selectedForMetadata: data.selectedForMetadata.present
? data.selectedForMetadata.value
: this.selectedForMetadata,
selectedForAudioSource: data.selectedForAudioSource.present
? data.selectedForAudioSource.value
: this.selectedForAudioSource,
repository: repository:
data.repository.present ? data.repository.value : this.repository, data.repository.present ? data.repository.value : this.repository,
pluginApiVersion: data.pluginApiVersion.present pluginApiVersion: data.pluginApiVersion.present
@ -4100,7 +4133,7 @@ class MetadataPluginsTableData extends DataClass
@override @override
String toString() { String toString() {
return (StringBuffer('MetadataPluginsTableData(') return (StringBuffer('PluginsTableData(')
..write('id: $id, ') ..write('id: $id, ')
..write('name: $name, ') ..write('name: $name, ')
..write('description: $description, ') ..write('description: $description, ')
@ -4109,7 +4142,8 @@ class MetadataPluginsTableData extends DataClass
..write('entryPoint: $entryPoint, ') ..write('entryPoint: $entryPoint, ')
..write('apis: $apis, ') ..write('apis: $apis, ')
..write('abilities: $abilities, ') ..write('abilities: $abilities, ')
..write('selected: $selected, ') ..write('selectedForMetadata: $selectedForMetadata, ')
..write('selectedForAudioSource: $selectedForAudioSource, ')
..write('repository: $repository, ') ..write('repository: $repository, ')
..write('pluginApiVersion: $pluginApiVersion') ..write('pluginApiVersion: $pluginApiVersion')
..write(')')) ..write(')'))
@ -4117,12 +4151,23 @@ class MetadataPluginsTableData extends DataClass
} }
@override @override
int get hashCode => Object.hash(id, name, description, version, author, int get hashCode => Object.hash(
entryPoint, apis, abilities, selected, repository, pluginApiVersion); id,
name,
description,
version,
author,
entryPoint,
apis,
abilities,
selectedForMetadata,
selectedForAudioSource,
repository,
pluginApiVersion);
@override @override
bool operator ==(Object other) => bool operator ==(Object other) =>
identical(this, other) || identical(this, other) ||
(other is MetadataPluginsTableData && (other is PluginsTableData &&
other.id == this.id && other.id == this.id &&
other.name == this.name && other.name == this.name &&
other.description == this.description && other.description == this.description &&
@ -4131,13 +4176,13 @@ class MetadataPluginsTableData extends DataClass
other.entryPoint == this.entryPoint && other.entryPoint == this.entryPoint &&
other.apis == this.apis && other.apis == this.apis &&
other.abilities == this.abilities && other.abilities == this.abilities &&
other.selected == this.selected && other.selectedForMetadata == this.selectedForMetadata &&
other.selectedForAudioSource == this.selectedForAudioSource &&
other.repository == this.repository && other.repository == this.repository &&
other.pluginApiVersion == this.pluginApiVersion); other.pluginApiVersion == this.pluginApiVersion);
} }
class MetadataPluginsTableCompanion class PluginsTableCompanion extends UpdateCompanion<PluginsTableData> {
extends UpdateCompanion<MetadataPluginsTableData> {
final Value<int> id; final Value<int> id;
final Value<String> name; final Value<String> name;
final Value<String> description; final Value<String> description;
@ -4146,10 +4191,11 @@ class MetadataPluginsTableCompanion
final Value<String> entryPoint; final Value<String> entryPoint;
final Value<List<String>> apis; final Value<List<String>> apis;
final Value<List<String>> abilities; final Value<List<String>> abilities;
final Value<bool> selected; final Value<bool> selectedForMetadata;
final Value<bool> selectedForAudioSource;
final Value<String?> repository; final Value<String?> repository;
final Value<String> pluginApiVersion; final Value<String> pluginApiVersion;
const MetadataPluginsTableCompanion({ const PluginsTableCompanion({
this.id = const Value.absent(), this.id = const Value.absent(),
this.name = const Value.absent(), this.name = const Value.absent(),
this.description = const Value.absent(), this.description = const Value.absent(),
@ -4158,11 +4204,12 @@ class MetadataPluginsTableCompanion
this.entryPoint = const Value.absent(), this.entryPoint = const Value.absent(),
this.apis = const Value.absent(), this.apis = const Value.absent(),
this.abilities = const Value.absent(), this.abilities = const Value.absent(),
this.selected = const Value.absent(), this.selectedForMetadata = const Value.absent(),
this.selectedForAudioSource = const Value.absent(),
this.repository = const Value.absent(), this.repository = const Value.absent(),
this.pluginApiVersion = const Value.absent(), this.pluginApiVersion = const Value.absent(),
}); });
MetadataPluginsTableCompanion.insert({ PluginsTableCompanion.insert({
this.id = const Value.absent(), this.id = const Value.absent(),
required String name, required String name,
required String description, required String description,
@ -4171,7 +4218,8 @@ class MetadataPluginsTableCompanion
required String entryPoint, required String entryPoint,
required List<String> apis, required List<String> apis,
required List<String> abilities, required List<String> abilities,
this.selected = const Value.absent(), this.selectedForMetadata = const Value.absent(),
this.selectedForAudioSource = const Value.absent(),
this.repository = const Value.absent(), this.repository = const Value.absent(),
this.pluginApiVersion = const Value.absent(), this.pluginApiVersion = const Value.absent(),
}) : name = Value(name), }) : name = Value(name),
@ -4181,7 +4229,7 @@ class MetadataPluginsTableCompanion
entryPoint = Value(entryPoint), entryPoint = Value(entryPoint),
apis = Value(apis), apis = Value(apis),
abilities = Value(abilities); abilities = Value(abilities);
static Insertable<MetadataPluginsTableData> custom({ static Insertable<PluginsTableData> custom({
Expression<int>? id, Expression<int>? id,
Expression<String>? name, Expression<String>? name,
Expression<String>? description, Expression<String>? description,
@ -4190,7 +4238,8 @@ class MetadataPluginsTableCompanion
Expression<String>? entryPoint, Expression<String>? entryPoint,
Expression<String>? apis, Expression<String>? apis,
Expression<String>? abilities, Expression<String>? abilities,
Expression<bool>? selected, Expression<bool>? selectedForMetadata,
Expression<bool>? selectedForAudioSource,
Expression<String>? repository, Expression<String>? repository,
Expression<String>? pluginApiVersion, Expression<String>? pluginApiVersion,
}) { }) {
@ -4203,13 +4252,16 @@ class MetadataPluginsTableCompanion
if (entryPoint != null) 'entry_point': entryPoint, if (entryPoint != null) 'entry_point': entryPoint,
if (apis != null) 'apis': apis, if (apis != null) 'apis': apis,
if (abilities != null) 'abilities': abilities, if (abilities != null) 'abilities': abilities,
if (selected != null) 'selected': selected, if (selectedForMetadata != null)
'selected_for_metadata': selectedForMetadata,
if (selectedForAudioSource != null)
'selected_for_audio_source': selectedForAudioSource,
if (repository != null) 'repository': repository, if (repository != null) 'repository': repository,
if (pluginApiVersion != null) 'plugin_api_version': pluginApiVersion, if (pluginApiVersion != null) 'plugin_api_version': pluginApiVersion,
}); });
} }
MetadataPluginsTableCompanion copyWith( PluginsTableCompanion copyWith(
{Value<int>? id, {Value<int>? id,
Value<String>? name, Value<String>? name,
Value<String>? description, Value<String>? description,
@ -4218,10 +4270,11 @@ class MetadataPluginsTableCompanion
Value<String>? entryPoint, Value<String>? entryPoint,
Value<List<String>>? apis, Value<List<String>>? apis,
Value<List<String>>? abilities, Value<List<String>>? abilities,
Value<bool>? selected, Value<bool>? selectedForMetadata,
Value<bool>? selectedForAudioSource,
Value<String?>? repository, Value<String?>? repository,
Value<String>? pluginApiVersion}) { Value<String>? pluginApiVersion}) {
return MetadataPluginsTableCompanion( return PluginsTableCompanion(
id: id ?? this.id, id: id ?? this.id,
name: name ?? this.name, name: name ?? this.name,
description: description ?? this.description, description: description ?? this.description,
@ -4230,7 +4283,9 @@ class MetadataPluginsTableCompanion
entryPoint: entryPoint ?? this.entryPoint, entryPoint: entryPoint ?? this.entryPoint,
apis: apis ?? this.apis, apis: apis ?? this.apis,
abilities: abilities ?? this.abilities, abilities: abilities ?? this.abilities,
selected: selected ?? this.selected, selectedForMetadata: selectedForMetadata ?? this.selectedForMetadata,
selectedForAudioSource:
selectedForAudioSource ?? this.selectedForAudioSource,
repository: repository ?? this.repository, repository: repository ?? this.repository,
pluginApiVersion: pluginApiVersion ?? this.pluginApiVersion, pluginApiVersion: pluginApiVersion ?? this.pluginApiVersion,
); );
@ -4258,16 +4313,19 @@ class MetadataPluginsTableCompanion
map['entry_point'] = Variable<String>(entryPoint.value); map['entry_point'] = Variable<String>(entryPoint.value);
} }
if (apis.present) { if (apis.present) {
map['apis'] = Variable<String>( map['apis'] =
$MetadataPluginsTableTable.$converterapis.toSql(apis.value)); Variable<String>($PluginsTableTable.$converterapis.toSql(apis.value));
} }
if (abilities.present) { if (abilities.present) {
map['abilities'] = Variable<String>($MetadataPluginsTableTable map['abilities'] = Variable<String>(
.$converterabilities $PluginsTableTable.$converterabilities.toSql(abilities.value));
.toSql(abilities.value));
} }
if (selected.present) { if (selectedForMetadata.present) {
map['selected'] = Variable<bool>(selected.value); map['selected_for_metadata'] = Variable<bool>(selectedForMetadata.value);
}
if (selectedForAudioSource.present) {
map['selected_for_audio_source'] =
Variable<bool>(selectedForAudioSource.value);
} }
if (repository.present) { if (repository.present) {
map['repository'] = Variable<String>(repository.value); map['repository'] = Variable<String>(repository.value);
@ -4280,7 +4338,7 @@ class MetadataPluginsTableCompanion
@override @override
String toString() { String toString() {
return (StringBuffer('MetadataPluginsTableCompanion(') return (StringBuffer('PluginsTableCompanion(')
..write('id: $id, ') ..write('id: $id, ')
..write('name: $name, ') ..write('name: $name, ')
..write('description: $description, ') ..write('description: $description, ')
@ -4289,7 +4347,8 @@ class MetadataPluginsTableCompanion
..write('entryPoint: $entryPoint, ') ..write('entryPoint: $entryPoint, ')
..write('apis: $apis, ') ..write('apis: $apis, ')
..write('abilities: $abilities, ') ..write('abilities: $abilities, ')
..write('selected: $selected, ') ..write('selectedForMetadata: $selectedForMetadata, ')
..write('selectedForAudioSource: $selectedForAudioSource, ')
..write('repository: $repository, ') ..write('repository: $repository, ')
..write('pluginApiVersion: $pluginApiVersion') ..write('pluginApiVersion: $pluginApiVersion')
..write(')')) ..write(')'))
@ -4314,8 +4373,7 @@ abstract class _$AppDatabase extends GeneratedDatabase {
$AudioPlayerStateTableTable(this); $AudioPlayerStateTableTable(this);
late final $HistoryTableTable historyTable = $HistoryTableTable(this); late final $HistoryTableTable historyTable = $HistoryTableTable(this);
late final $LyricsTableTable lyricsTable = $LyricsTableTable(this); late final $LyricsTableTable lyricsTable = $LyricsTableTable(this);
late final $MetadataPluginsTableTable metadataPluginsTable = late final $PluginsTableTable pluginsTable = $PluginsTableTable(this);
$MetadataPluginsTableTable(this);
late final Index uniqueBlacklist = Index('unique_blacklist', late final Index uniqueBlacklist = Index('unique_blacklist',
'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)'); 'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)');
late final Index uniqTrackMatch = Index('uniq_track_match', late final Index uniqTrackMatch = Index('uniq_track_match',
@ -4334,7 +4392,7 @@ abstract class _$AppDatabase extends GeneratedDatabase {
audioPlayerStateTable, audioPlayerStateTable,
historyTable, historyTable,
lyricsTable, lyricsTable,
metadataPluginsTable, pluginsTable,
uniqueBlacklist, uniqueBlacklist,
uniqTrackMatch uniqTrackMatch
]; ];
@ -6280,8 +6338,8 @@ typedef $$LyricsTableTableProcessedTableManager = ProcessedTableManager<
), ),
LyricsTableData, LyricsTableData,
PrefetchHooks Function()>; PrefetchHooks Function()>;
typedef $$MetadataPluginsTableTableCreateCompanionBuilder typedef $$PluginsTableTableCreateCompanionBuilder = PluginsTableCompanion
= MetadataPluginsTableCompanion Function({ Function({
Value<int> id, Value<int> id,
required String name, required String name,
required String description, required String description,
@ -6290,12 +6348,13 @@ typedef $$MetadataPluginsTableTableCreateCompanionBuilder
required String entryPoint, required String entryPoint,
required List<String> apis, required List<String> apis,
required List<String> abilities, required List<String> abilities,
Value<bool> selected, Value<bool> selectedForMetadata,
Value<bool> selectedForAudioSource,
Value<String?> repository, Value<String?> repository,
Value<String> pluginApiVersion, Value<String> pluginApiVersion,
}); });
typedef $$MetadataPluginsTableTableUpdateCompanionBuilder typedef $$PluginsTableTableUpdateCompanionBuilder = PluginsTableCompanion
= MetadataPluginsTableCompanion Function({ Function({
Value<int> id, Value<int> id,
Value<String> name, Value<String> name,
Value<String> description, Value<String> description,
@ -6304,14 +6363,15 @@ typedef $$MetadataPluginsTableTableUpdateCompanionBuilder
Value<String> entryPoint, Value<String> entryPoint,
Value<List<String>> apis, Value<List<String>> apis,
Value<List<String>> abilities, Value<List<String>> abilities,
Value<bool> selected, Value<bool> selectedForMetadata,
Value<bool> selectedForAudioSource,
Value<String?> repository, Value<String?> repository,
Value<String> pluginApiVersion, Value<String> pluginApiVersion,
}); });
class $$MetadataPluginsTableTableFilterComposer class $$PluginsTableTableFilterComposer
extends Composer<_$AppDatabase, $MetadataPluginsTableTable> { extends Composer<_$AppDatabase, $PluginsTableTable> {
$$MetadataPluginsTableTableFilterComposer({ $$PluginsTableTableFilterComposer({
required super.$db, required super.$db,
required super.$table, required super.$table,
super.joinBuilder, super.joinBuilder,
@ -6346,8 +6406,13 @@ class $$MetadataPluginsTableTableFilterComposer
column: $table.abilities, column: $table.abilities,
builder: (column) => ColumnWithTypeConverterFilters(column)); builder: (column) => ColumnWithTypeConverterFilters(column));
ColumnFilters<bool> get selected => $composableBuilder( ColumnFilters<bool> get selectedForMetadata => $composableBuilder(
column: $table.selected, builder: (column) => ColumnFilters(column)); column: $table.selectedForMetadata,
builder: (column) => ColumnFilters(column));
ColumnFilters<bool> get selectedForAudioSource => $composableBuilder(
column: $table.selectedForAudioSource,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get repository => $composableBuilder( ColumnFilters<String> get repository => $composableBuilder(
column: $table.repository, builder: (column) => ColumnFilters(column)); column: $table.repository, builder: (column) => ColumnFilters(column));
@ -6357,9 +6422,9 @@ class $$MetadataPluginsTableTableFilterComposer
builder: (column) => ColumnFilters(column)); builder: (column) => ColumnFilters(column));
} }
class $$MetadataPluginsTableTableOrderingComposer class $$PluginsTableTableOrderingComposer
extends Composer<_$AppDatabase, $MetadataPluginsTableTable> { extends Composer<_$AppDatabase, $PluginsTableTable> {
$$MetadataPluginsTableTableOrderingComposer({ $$PluginsTableTableOrderingComposer({
required super.$db, required super.$db,
required super.$table, required super.$table,
super.joinBuilder, super.joinBuilder,
@ -6390,8 +6455,13 @@ class $$MetadataPluginsTableTableOrderingComposer
ColumnOrderings<String> get abilities => $composableBuilder( ColumnOrderings<String> get abilities => $composableBuilder(
column: $table.abilities, builder: (column) => ColumnOrderings(column)); column: $table.abilities, builder: (column) => ColumnOrderings(column));
ColumnOrderings<bool> get selected => $composableBuilder( ColumnOrderings<bool> get selectedForMetadata => $composableBuilder(
column: $table.selected, builder: (column) => ColumnOrderings(column)); column: $table.selectedForMetadata,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<bool> get selectedForAudioSource => $composableBuilder(
column: $table.selectedForAudioSource,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get repository => $composableBuilder( ColumnOrderings<String> get repository => $composableBuilder(
column: $table.repository, builder: (column) => ColumnOrderings(column)); column: $table.repository, builder: (column) => ColumnOrderings(column));
@ -6401,9 +6471,9 @@ class $$MetadataPluginsTableTableOrderingComposer
builder: (column) => ColumnOrderings(column)); builder: (column) => ColumnOrderings(column));
} }
class $$MetadataPluginsTableTableAnnotationComposer class $$PluginsTableTableAnnotationComposer
extends Composer<_$AppDatabase, $MetadataPluginsTableTable> { extends Composer<_$AppDatabase, $PluginsTableTable> {
$$MetadataPluginsTableTableAnnotationComposer({ $$PluginsTableTableAnnotationComposer({
required super.$db, required super.$db,
required super.$table, required super.$table,
super.joinBuilder, super.joinBuilder,
@ -6434,8 +6504,11 @@ class $$MetadataPluginsTableTableAnnotationComposer
GeneratedColumnWithTypeConverter<List<String>, String> get abilities => GeneratedColumnWithTypeConverter<List<String>, String> get abilities =>
$composableBuilder(column: $table.abilities, builder: (column) => column); $composableBuilder(column: $table.abilities, builder: (column) => column);
GeneratedColumn<bool> get selected => GeneratedColumn<bool> get selectedForMetadata => $composableBuilder(
$composableBuilder(column: $table.selected, builder: (column) => column); column: $table.selectedForMetadata, builder: (column) => column);
GeneratedColumn<bool> get selectedForAudioSource => $composableBuilder(
column: $table.selectedForAudioSource, builder: (column) => column);
GeneratedColumn<String> get repository => $composableBuilder( GeneratedColumn<String> get repository => $composableBuilder(
column: $table.repository, builder: (column) => column); column: $table.repository, builder: (column) => column);
@ -6444,35 +6517,31 @@ class $$MetadataPluginsTableTableAnnotationComposer
column: $table.pluginApiVersion, builder: (column) => column); column: $table.pluginApiVersion, builder: (column) => column);
} }
class $$MetadataPluginsTableTableTableManager extends RootTableManager< class $$PluginsTableTableTableManager extends RootTableManager<
_$AppDatabase, _$AppDatabase,
$MetadataPluginsTableTable, $PluginsTableTable,
MetadataPluginsTableData, PluginsTableData,
$$MetadataPluginsTableTableFilterComposer, $$PluginsTableTableFilterComposer,
$$MetadataPluginsTableTableOrderingComposer, $$PluginsTableTableOrderingComposer,
$$MetadataPluginsTableTableAnnotationComposer, $$PluginsTableTableAnnotationComposer,
$$MetadataPluginsTableTableCreateCompanionBuilder, $$PluginsTableTableCreateCompanionBuilder,
$$MetadataPluginsTableTableUpdateCompanionBuilder, $$PluginsTableTableUpdateCompanionBuilder,
( (
MetadataPluginsTableData, PluginsTableData,
BaseReferences<_$AppDatabase, $MetadataPluginsTableTable, BaseReferences<_$AppDatabase, $PluginsTableTable, PluginsTableData>
MetadataPluginsTableData>
), ),
MetadataPluginsTableData, PluginsTableData,
PrefetchHooks Function()> { PrefetchHooks Function()> {
$$MetadataPluginsTableTableTableManager( $$PluginsTableTableTableManager(_$AppDatabase db, $PluginsTableTable table)
_$AppDatabase db, $MetadataPluginsTableTable table)
: super(TableManagerState( : super(TableManagerState(
db: db, db: db,
table: table, table: table,
createFilteringComposer: () => createFilteringComposer: () =>
$$MetadataPluginsTableTableFilterComposer($db: db, $table: table), $$PluginsTableTableFilterComposer($db: db, $table: table),
createOrderingComposer: () => createOrderingComposer: () =>
$$MetadataPluginsTableTableOrderingComposer( $$PluginsTableTableOrderingComposer($db: db, $table: table),
$db: db, $table: table),
createComputedFieldComposer: () => createComputedFieldComposer: () =>
$$MetadataPluginsTableTableAnnotationComposer( $$PluginsTableTableAnnotationComposer($db: db, $table: table),
$db: db, $table: table),
updateCompanionCallback: ({ updateCompanionCallback: ({
Value<int> id = const Value.absent(), Value<int> id = const Value.absent(),
Value<String> name = const Value.absent(), Value<String> name = const Value.absent(),
@ -6482,11 +6551,12 @@ class $$MetadataPluginsTableTableTableManager extends RootTableManager<
Value<String> entryPoint = const Value.absent(), Value<String> entryPoint = const Value.absent(),
Value<List<String>> apis = const Value.absent(), Value<List<String>> apis = const Value.absent(),
Value<List<String>> abilities = const Value.absent(), Value<List<String>> abilities = const Value.absent(),
Value<bool> selected = const Value.absent(), Value<bool> selectedForMetadata = const Value.absent(),
Value<bool> selectedForAudioSource = const Value.absent(),
Value<String?> repository = const Value.absent(), Value<String?> repository = const Value.absent(),
Value<String> pluginApiVersion = const Value.absent(), Value<String> pluginApiVersion = const Value.absent(),
}) => }) =>
MetadataPluginsTableCompanion( PluginsTableCompanion(
id: id, id: id,
name: name, name: name,
description: description, description: description,
@ -6495,7 +6565,8 @@ class $$MetadataPluginsTableTableTableManager extends RootTableManager<
entryPoint: entryPoint, entryPoint: entryPoint,
apis: apis, apis: apis,
abilities: abilities, abilities: abilities,
selected: selected, selectedForMetadata: selectedForMetadata,
selectedForAudioSource: selectedForAudioSource,
repository: repository, repository: repository,
pluginApiVersion: pluginApiVersion, pluginApiVersion: pluginApiVersion,
), ),
@ -6508,11 +6579,12 @@ class $$MetadataPluginsTableTableTableManager extends RootTableManager<
required String entryPoint, required String entryPoint,
required List<String> apis, required List<String> apis,
required List<String> abilities, required List<String> abilities,
Value<bool> selected = const Value.absent(), Value<bool> selectedForMetadata = const Value.absent(),
Value<bool> selectedForAudioSource = const Value.absent(),
Value<String?> repository = const Value.absent(), Value<String?> repository = const Value.absent(),
Value<String> pluginApiVersion = const Value.absent(), Value<String> pluginApiVersion = const Value.absent(),
}) => }) =>
MetadataPluginsTableCompanion.insert( PluginsTableCompanion.insert(
id: id, id: id,
name: name, name: name,
description: description, description: description,
@ -6521,7 +6593,8 @@ class $$MetadataPluginsTableTableTableManager extends RootTableManager<
entryPoint: entryPoint, entryPoint: entryPoint,
apis: apis, apis: apis,
abilities: abilities, abilities: abilities,
selected: selected, selectedForMetadata: selectedForMetadata,
selectedForAudioSource: selectedForAudioSource,
repository: repository, repository: repository,
pluginApiVersion: pluginApiVersion, pluginApiVersion: pluginApiVersion,
), ),
@ -6532,22 +6605,20 @@ class $$MetadataPluginsTableTableTableManager extends RootTableManager<
)); ));
} }
typedef $$MetadataPluginsTableTableProcessedTableManager typedef $$PluginsTableTableProcessedTableManager = ProcessedTableManager<
= ProcessedTableManager<
_$AppDatabase, _$AppDatabase,
$MetadataPluginsTableTable, $PluginsTableTable,
MetadataPluginsTableData, PluginsTableData,
$$MetadataPluginsTableTableFilterComposer, $$PluginsTableTableFilterComposer,
$$MetadataPluginsTableTableOrderingComposer, $$PluginsTableTableOrderingComposer,
$$MetadataPluginsTableTableAnnotationComposer, $$PluginsTableTableAnnotationComposer,
$$MetadataPluginsTableTableCreateCompanionBuilder, $$PluginsTableTableCreateCompanionBuilder,
$$MetadataPluginsTableTableUpdateCompanionBuilder, $$PluginsTableTableUpdateCompanionBuilder,
( (
MetadataPluginsTableData, PluginsTableData,
BaseReferences<_$AppDatabase, $MetadataPluginsTableTable, BaseReferences<_$AppDatabase, $PluginsTableTable, PluginsTableData>
MetadataPluginsTableData>
), ),
MetadataPluginsTableData, PluginsTableData,
PrefetchHooks Function()>; PrefetchHooks Function()>;
class $AppDatabaseManager { class $AppDatabaseManager {
@ -6571,6 +6642,6 @@ class $AppDatabaseManager {
$$HistoryTableTableTableManager(_db, _db.historyTable); $$HistoryTableTableTableManager(_db, _db.historyTable);
$$LyricsTableTableTableManager get lyricsTable => $$LyricsTableTableTableManager get lyricsTable =>
$$LyricsTableTableTableManager(_db, _db.lyricsTable); $$LyricsTableTableTableManager(_db, _db.lyricsTable);
$$MetadataPluginsTableTableTableManager get metadataPluginsTable => $$PluginsTableTableTableManager get pluginsTable =>
$$MetadataPluginsTableTableTableManager(_db, _db.metadataPluginsTable); $$PluginsTableTableTableManager(_db, _db.pluginsTable);
} }

View File

@ -1,3 +1,4 @@
// dart format width=80
import 'package:drift/internal/versioned_schema.dart' as i0; import 'package:drift/internal/versioned_schema.dart' as i0;
import 'package:drift/drift.dart' as i1; import 'package:drift/drift.dart' as i1;
import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import
@ -1407,7 +1408,7 @@ final class Schema5 extends i0.VersionedSchema {
i1.GeneratedColumn<String> _column_55(String aliasedName) => i1.GeneratedColumn<String> _column_55(String aliasedName) =>
i1.GeneratedColumn<String>('accent_color_scheme', aliasedName, false, i1.GeneratedColumn<String>('accent_color_scheme', aliasedName, false,
type: i1.DriftSqlType.string, type: i1.DriftSqlType.string,
defaultValue: const Constant("Slate:0xff64748b")); defaultValue: const Constant("Orange:0xFFf97315"));
final class Schema6 extends i0.VersionedSchema { final class Schema6 extends i0.VersionedSchema {
Schema6({required super.database}) : super(version: 6); Schema6({required super.database}) : super(version: 6);
@ -2053,7 +2054,7 @@ final class Schema8 extends i0.VersionedSchema {
_column_13, _column_13,
_column_14, _column_14,
_column_15, _column_15,
_column_55, _column_69,
_column_17, _column_17,
_column_18, _column_18,
_column_19, _column_19,
@ -2188,7 +2189,7 @@ final class Schema8 extends i0.VersionedSchema {
_column_65, _column_65,
_column_66, _column_66,
_column_67, _column_67,
_column_69, _column_70,
], ],
attachedDatabase: database, attachedDatabase: database,
), ),
@ -2200,8 +2201,267 @@ final class Schema8 extends i0.VersionedSchema {
} }
i1.GeneratedColumn<String> _column_69(String aliasedName) => i1.GeneratedColumn<String> _column_69(String aliasedName) =>
i1.GeneratedColumn<String>('accent_color_scheme', aliasedName, false,
type: i1.DriftSqlType.string,
defaultValue: const Constant("Slate:0xff64748b"));
i1.GeneratedColumn<String> _column_70(String aliasedName) =>
i1.GeneratedColumn<String>('plugin_api_version', aliasedName, false, i1.GeneratedColumn<String>('plugin_api_version', aliasedName, false,
type: i1.DriftSqlType.string, defaultValue: const Constant('1.0.0')); type: i1.DriftSqlType.string, defaultValue: const Constant('1.0.0'));
final class Schema9 extends i0.VersionedSchema {
Schema9({required super.database}) : super(version: 9);
@override
late final List<i1.DatabaseSchemaEntity> entities = [
authenticationTable,
blacklistTable,
preferencesTable,
scrobblerTable,
skipSegmentTable,
sourceMatchTable,
audioPlayerStateTable,
historyTable,
lyricsTable,
pluginsTable,
uniqueBlacklist,
uniqTrackMatch,
];
late final Shape0 authenticationTable = Shape0(
source: i0.VersionedTable(
entityName: 'authentication_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_1,
_column_2,
_column_3,
],
attachedDatabase: database,
),
alias: null);
late final Shape1 blacklistTable = Shape1(
source: i0.VersionedTable(
entityName: 'blacklist_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_4,
_column_5,
_column_6,
],
attachedDatabase: database,
),
alias: null);
late final Shape13 preferencesTable = Shape13(
source: i0.VersionedTable(
entityName: 'preferences_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_7,
_column_8,
_column_9,
_column_10,
_column_11,
_column_12,
_column_13,
_column_14,
_column_15,
_column_69,
_column_17,
_column_18,
_column_19,
_column_20,
_column_21,
_column_22,
_column_23,
_column_24,
_column_25,
_column_26,
_column_54,
_column_27,
_column_28,
_column_29,
_column_30,
_column_31,
_column_56,
_column_53,
],
attachedDatabase: database,
),
alias: null);
late final Shape3 scrobblerTable = Shape3(
source: i0.VersionedTable(
entityName: 'scrobbler_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_32,
_column_33,
_column_34,
],
attachedDatabase: database,
),
alias: null);
late final Shape4 skipSegmentTable = Shape4(
source: i0.VersionedTable(
entityName: 'skip_segment_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_35,
_column_36,
_column_37,
_column_32,
],
attachedDatabase: database,
),
alias: null);
late final Shape5 sourceMatchTable = Shape5(
source: i0.VersionedTable(
entityName: 'source_match_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_37,
_column_38,
_column_39,
_column_32,
],
attachedDatabase: database,
),
alias: null);
late final Shape14 audioPlayerStateTable = Shape14(
source: i0.VersionedTable(
entityName: 'audio_player_state_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_40,
_column_41,
_column_42,
_column_43,
_column_57,
_column_58,
],
attachedDatabase: database,
),
alias: null);
late final Shape9 historyTable = Shape9(
source: i0.VersionedTable(
entityName: 'history_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_32,
_column_50,
_column_51,
_column_52,
],
attachedDatabase: database,
),
alias: null);
late final Shape10 lyricsTable = Shape10(
source: i0.VersionedTable(
entityName: 'lyrics_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_37,
_column_52,
],
attachedDatabase: database,
),
alias: null);
late final Shape16 pluginsTable = Shape16(
source: i0.VersionedTable(
entityName: 'plugins_table',
withoutRowId: false,
isStrict: false,
tableConstraints: [],
columns: [
_column_0,
_column_59,
_column_60,
_column_61,
_column_62,
_column_63,
_column_64,
_column_65,
_column_71,
_column_72,
_column_67,
_column_73,
],
attachedDatabase: database,
),
alias: null);
final i1.Index uniqueBlacklist = i1.Index('unique_blacklist',
'CREATE UNIQUE INDEX unique_blacklist ON blacklist_table (element_type, element_id)');
final i1.Index uniqTrackMatch = i1.Index('uniq_track_match',
'CREATE UNIQUE INDEX uniq_track_match ON source_match_table (track_id, source_id, source_type)');
}
class Shape16 extends i0.VersionedTable {
Shape16({required super.source, required super.alias}) : super.aliased();
i1.GeneratedColumn<int> get id =>
columnsByName['id']! as i1.GeneratedColumn<int>;
i1.GeneratedColumn<String> get name =>
columnsByName['name']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get description =>
columnsByName['description']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get version =>
columnsByName['version']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get author =>
columnsByName['author']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get entryPoint =>
columnsByName['entry_point']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get apis =>
columnsByName['apis']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get abilities =>
columnsByName['abilities']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<bool> get selectedForMetadata =>
columnsByName['selected_for_metadata']! as i1.GeneratedColumn<bool>;
i1.GeneratedColumn<bool> get selectedForAudioSource =>
columnsByName['selected_for_audio_source']! as i1.GeneratedColumn<bool>;
i1.GeneratedColumn<String> get repository =>
columnsByName['repository']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get pluginApiVersion =>
columnsByName['plugin_api_version']! as i1.GeneratedColumn<String>;
}
i1.GeneratedColumn<bool> _column_71(String aliasedName) =>
i1.GeneratedColumn<bool>('selected_for_metadata', aliasedName, false,
type: i1.DriftSqlType.bool,
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
'CHECK ("selected_for_metadata" IN (0, 1))'),
defaultValue: const Constant(false));
i1.GeneratedColumn<bool> _column_72(String aliasedName) =>
i1.GeneratedColumn<bool>('selected_for_audio_source', aliasedName, false,
type: i1.DriftSqlType.bool,
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
'CHECK ("selected_for_audio_source" IN (0, 1))'),
defaultValue: const Constant(false));
i1.GeneratedColumn<String> _column_73(String aliasedName) =>
i1.GeneratedColumn<String>('plugin_api_version', aliasedName, false,
type: i1.DriftSqlType.string, defaultValue: const Constant('2.0.0'));
i0.MigrationStepWithVersion migrationSteps({ i0.MigrationStepWithVersion migrationSteps({
required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2, required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3, required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3,
@ -2210,6 +2470,7 @@ i0.MigrationStepWithVersion migrationSteps({
required Future<void> Function(i1.Migrator m, Schema6 schema) from5To6, required Future<void> Function(i1.Migrator m, Schema6 schema) from5To6,
required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7, required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7,
required Future<void> Function(i1.Migrator m, Schema8 schema) from7To8, required Future<void> Function(i1.Migrator m, Schema8 schema) from7To8,
required Future<void> Function(i1.Migrator m, Schema9 schema) from8To9,
}) { }) {
return (currentVersion, database) async { return (currentVersion, database) async {
switch (currentVersion) { switch (currentVersion) {
@ -2248,6 +2509,11 @@ i0.MigrationStepWithVersion migrationSteps({
final migrator = i1.Migrator(database, schema); final migrator = i1.Migrator(database, schema);
await from7To8(migrator, schema); await from7To8(migrator, schema);
return 8; return 8;
case 8:
final schema = Schema9(database: database);
final migrator = i1.Migrator(database, schema);
await from8To9(migrator, schema);
return 9;
default: default:
throw ArgumentError.value('Unknown migration from $currentVersion'); throw ArgumentError.value('Unknown migration from $currentVersion');
} }
@ -2262,6 +2528,7 @@ i1.OnUpgrade stepByStep({
required Future<void> Function(i1.Migrator m, Schema6 schema) from5To6, required Future<void> Function(i1.Migrator m, Schema6 schema) from5To6,
required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7, required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7,
required Future<void> Function(i1.Migrator m, Schema8 schema) from7To8, required Future<void> Function(i1.Migrator m, Schema8 schema) from7To8,
required Future<void> Function(i1.Migrator m, Schema9 schema) from8To9,
}) => }) =>
i0.VersionedSchema.stepByStepHelper( i0.VersionedSchema.stepByStepHelper(
step: migrationSteps( step: migrationSteps(
@ -2272,4 +2539,5 @@ i1.OnUpgrade stepByStep({
from5To6: from5To6, from5To6: from5To6,
from6To7: from6To7, from6To7: from6To7,
from7To8: from7To8, from7To8: from7To8,
from8To9: from8To9,
)); ));

View File

@ -1,6 +1,6 @@
part of '../database.dart'; part of '../database.dart';
class MetadataPluginsTable extends Table { class PluginsTable extends Table {
IntColumn get id => integer().autoIncrement()(); IntColumn get id => integer().autoIncrement()();
TextColumn get name => text().withLength(min: 1, max: 50)(); TextColumn get name => text().withLength(min: 1, max: 50)();
TextColumn get description => text()(); TextColumn get description => text()();
@ -9,8 +9,11 @@ class MetadataPluginsTable extends Table {
TextColumn get entryPoint => text()(); TextColumn get entryPoint => text()();
TextColumn get apis => text().map(const StringListConverter())(); TextColumn get apis => text().map(const StringListConverter())();
TextColumn get abilities => text().map(const StringListConverter())(); TextColumn get abilities => text().map(const StringListConverter())();
BoolColumn get selected => boolean().withDefault(const Constant(false))(); BoolColumn get selectedForMetadata =>
boolean().withDefault(const Constant(false))();
BoolColumn get selectedForAudioSource =>
boolean().withDefault(const Constant(false))();
TextColumn get repository => text().nullable()(); TextColumn get repository => text().nullable()();
TextColumn get pluginApiVersion => TextColumn get pluginApiVersion =>
text().withDefault(const Constant('1.0.0'))(); text().withDefault(const Constant('2.0.0'))();
} }

View File

@ -3,9 +3,9 @@ import 'package:shadcn_flutter/shadcn_flutter.dart';
import 'package:shadcn_flutter/shadcn_flutter_extension.dart'; import 'package:shadcn_flutter/shadcn_flutter_extension.dart';
import 'package:spotube/collections/spotube_icons.dart'; import 'package:spotube/collections/spotube_icons.dart';
import 'package:spotube/components/markdown/markdown.dart'; import 'package:spotube/components/markdown/markdown.dart';
import 'package:spotube/extensions/constrains.dart';
import 'package:spotube/extensions/context.dart'; import 'package:spotube/extensions/context.dart';
import 'package:spotube/models/metadata/metadata.dart'; import 'package:spotube/models/metadata/metadata.dart';
import 'package:spotube/modules/metadata_plugins/plugin_repository.dart';
import 'package:spotube/modules/metadata_plugins/plugin_update_available_dialog.dart'; import 'package:spotube/modules/metadata_plugins/plugin_update_available_dialog.dart';
import 'package:spotube/provider/metadata_plugin/core/auth.dart'; import 'package:spotube/provider/metadata_plugin/core/auth.dart';
import 'package:spotube/provider/metadata_plugin/core/support.dart'; import 'package:spotube/provider/metadata_plugin/core/support.dart';
@ -20,27 +20,52 @@ final validAbilities = {
class MetadataInstalledPluginItem extends HookConsumerWidget { class MetadataInstalledPluginItem extends HookConsumerWidget {
final PluginConfiguration plugin; final PluginConfiguration plugin;
final bool isDefault; final bool isDefaultMetadata;
final bool isDefaultAudioSource;
const MetadataInstalledPluginItem({ const MetadataInstalledPluginItem({
super.key, super.key,
required this.plugin, required this.plugin,
required this.isDefault, required this.isDefaultMetadata,
required this.isDefaultAudioSource,
}); });
@override @override
Widget build(BuildContext context, ref) { Widget build(BuildContext context, ref) {
final mediaQuery = MediaQuery.sizeOf(context);
final metadataPlugin = ref.watch(metadataPluginProvider); final metadataPlugin = ref.watch(metadataPluginProvider);
final isAuthenticatedSnapshot = final audioSourcePlugin = ref.watch(audioSourcePluginProvider);
ref.watch(metadataPluginAuthenticatedProvider); final pluginSnapshot = switch ((isDefaultMetadata, isDefaultAudioSource)) {
(true, _) => metadataPlugin,
(false, true) => audioSourcePlugin,
_ => null,
};
final pluginsNotifier = ref.watch(metadataPluginsProvider.notifier); final pluginsNotifier = ref.watch(metadataPluginsProvider.notifier);
final requiresAuth =
isDefault && plugin.abilities.contains(PluginAbilities.authentication); final requiresAuth = (isDefaultMetadata || isDefaultAudioSource) &&
final supportsScrobbling = plugin.abilities.contains(PluginAbilities.authentication);
isDefault && plugin.abilities.contains(PluginAbilities.scrobbling); final supportsScrobbling = isDefaultMetadata &&
final isAuthenticated = isAuthenticatedSnapshot.asData?.value == true; plugin.abilities.contains(PluginAbilities.scrobbling);
final updateAvailable =
isDefault ? ref.watch(metadataPluginUpdateCheckerProvider) : null; final isMetadataAuthenticatedSnapshot =
final hasUpdate = isDefault && updateAvailable?.asData?.value != null; ref.watch(metadataPluginAuthenticatedProvider);
final isAudioSourceAuthenticatedSnapshot =
ref.watch(audioSourcePluginAuthenticatedProvider);
final isAuthenticated =
isMetadataAuthenticatedSnapshot.asData?.value == true ||
isAudioSourceAuthenticatedSnapshot.asData?.value == true;
final metadataUpdateAvailable =
ref.watch(metadataPluginUpdateCheckerProvider);
final audioSourceUpdateAvailable =
ref.watch(audioSourcePluginUpdateCheckerProvider);
final updateAvailable = switch ((isDefaultMetadata, isDefaultAudioSource)) {
(true, _) => metadataUpdateAvailable,
(false, true) => audioSourceUpdateAvailable,
_ => null,
};
final hasUpdate = updateAvailable?.asData?.value != null;
return Card( return Card(
child: Column( child: Column(
@ -218,34 +243,73 @@ class MetadataInstalledPluginItem extends HookConsumerWidget {
], ],
), ),
), ),
Row( Wrap(
spacing: 8, spacing: 8,
runSpacing: 8,
alignment: WrapAlignment.spaceBetween,
children: [ children: [
Wrap(
spacing: 8,
runSpacing: 8,
children: [
if (plugin.abilities.contains(PluginAbilities.metadata))
Button.secondary( Button.secondary(
enabled: !isDefault, enabled: !isDefaultMetadata,
onPressed: () async { onPressed: () async {
await pluginsNotifier.setDefaultPlugin(plugin); await pluginsNotifier.setDefaultMetadataPlugin(plugin);
}, },
child: Text( child: Text(
isDefault isDefaultMetadata
? context.l10n.default_plugin ? context.l10n.default_metadata_source
: context.l10n.set_default, : context.l10n.set_default_metadata_source,
), ),
), ),
if (isDefault) if (plugin.abilities.contains(PluginAbilities.audioSource))
Button.secondary(
enabled: !isDefaultAudioSource,
onPressed: () async {
await pluginsNotifier
.setDefaultAudioSourcePlugin(plugin);
},
child: Text(
isDefaultAudioSource
? context.l10n.default_audio_source
: context.l10n.set_default_audio_source,
),
),
],
),
Row(
mainAxisSize:
mediaQuery.smAndUp ? MainAxisSize.min : MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.end,
spacing: 8,
children: [
if (isDefaultMetadata || isDefaultAudioSource)
Consumer(builder: (context, ref, _) { Consumer(builder: (context, ref, _) {
final supportTextSnapshot = final metadataSupportTextSnapshot =
ref.watch(metadataPluginSupportTextProvider); ref.watch(metadataPluginSupportTextProvider);
final audioSourceSupportTextSnapshot =
ref.watch(audioSourcePluginSupportTextProvider);
if (supportTextSnapshot.hasValue && final supportTextSnapshot =
supportTextSnapshot.value == null) { switch ((isDefaultMetadata, isDefaultAudioSource)) {
(true, _) => metadataSupportTextSnapshot,
(false, true) => audioSourceSupportTextSnapshot,
_ => null,
};
if ((supportTextSnapshot?.hasValue ?? false) &&
supportTextSnapshot?.value == null) {
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
final bgColor = context.theme.brightness == Brightness.dark final bgColor =
context.theme.brightness == Brightness.dark
? const Color.fromARGB(255, 255, 145, 175) ? const Color.fromARGB(255, 255, 145, 175)
: Colors.pink[600]; : Colors.pink[600];
final textColor = context.theme.brightness == Brightness.dark final textColor =
context.theme.brightness == Brightness.dark
? Colors.pink[700] ? Colors.pink[700]
: Colors.pink[50]; : Colors.pink[50];
@ -276,8 +340,8 @@ class MetadataInstalledPluginItem extends HookConsumerWidget {
context: context, context: context,
builder: (context) { builder: (context) {
return AlertDialog( return AlertDialog(
title: title: Text(
Text(context.l10n.support_plugin_development), context.l10n.support_plugin_development),
content: ConstrainedBox( content: ConstrainedBox(
constraints: BoxConstraints( constraints: BoxConstraints(
maxHeight: mediaQuery.height * 0.8, maxHeight: mediaQuery.height * 0.8,
@ -287,7 +351,9 @@ class MetadataInstalledPluginItem extends HookConsumerWidget {
width: double.infinity, width: double.infinity,
child: SingleChildScrollView( child: SingleChildScrollView(
child: AppMarkdown( child: AppMarkdown(
data: supportTextSnapshot.value ?? "", data: supportTextSnapshot
?.asData?.value ??
"",
), ),
), ),
), ),
@ -306,22 +372,28 @@ class MetadataInstalledPluginItem extends HookConsumerWidget {
}, },
); );
}), }),
const Spacer(), if ((isDefaultMetadata || isDefaultAudioSource) &&
if (isDefault && requiresAuth && !isAuthenticated) requiresAuth &&
!isAuthenticated)
Button.primary( Button.primary(
onPressed: () async { onPressed: () async {
await metadataPlugin.asData?.value?.auth.authenticate(); await pluginSnapshot?.asData?.value?.auth
.authenticate();
}, },
leading: const Icon(SpotubeIcons.login), leading: const Icon(SpotubeIcons.login),
child: Text(context.l10n.login), child: Text(context.l10n.login),
) )
else if (isDefault && requiresAuth && isAuthenticated) else if ((isDefaultMetadata || isDefaultAudioSource) &&
requiresAuth &&
isAuthenticated)
Button.destructive( Button.destructive(
onPressed: () async { onPressed: () async {
await metadataPlugin.asData?.value?.auth.logout(); await pluginSnapshot?.asData?.value?.auth.logout();
}, },
leading: const Icon(SpotubeIcons.logout), leading: const Icon(SpotubeIcons.logout),
child: Text(context.l10n.logout), child: Text(context.l10n.logout),
),
],
) )
], ],
) )

View File

@ -31,7 +31,7 @@ void useGlobalSubscriptions(WidgetRef ref) {
showDialog( showDialog(
context: context, context: context,
builder: (context) => MetadataPluginUpdateAvailableDialog( builder: (context) => MetadataPluginUpdateAvailableDialog(
plugin: pluginConfig.defaultPluginConfig!, plugin: pluginConfig.defaultMetadataPluginConfig!,
update: pluginUpdate, update: pluginUpdate,
), ),
); );

View File

@ -56,15 +56,15 @@ class SettingsMetadataProviderPage extends HookConsumerWidget {
if (tabState.value != 0) { if (tabState.value != 0) {
// metadata only plugins // metadata only plugins
return availablePlugins return availablePlugins.where(
.where( (d) {
(d) => d.topics.contains( return d.topics.contains(
tabState.value == 1 tabState.value == 1
? "spotube-metadata-plugin" ? "spotube-metadata-plugin"
: "spotube-audio-source-plugin", : "spotube-audio-source-plugin",
), );
) },
.toList(); ).toList();
} }
return availablePlugins; // all plugins return availablePlugins; // all plugins
@ -76,6 +76,18 @@ class SettingsMetadataProviderPage extends HookConsumerWidget {
], ],
); );
final installedPlugins = useMemoized<List<PluginConfiguration>?>(() {
if (tabState.value == 0) return plugins.asData?.value.plugins;
return plugins.asData?.value.plugins.where((d) {
return d.abilities.contains(
tabState.value == 1
? PluginAbilities.metadata
: PluginAbilities.audioSource,
);
}).toList();
}, [tabState.value, plugins.asData?.value]);
return SafeArea( return SafeArea(
bottom: false, bottom: false,
child: Scaffold( child: Scaffold(
@ -241,15 +253,20 @@ class SettingsMetadataProviderPage extends HookConsumerWidget {
), ),
const SliverGap(20), const SliverGap(20),
SliverList.separated( SliverList.separated(
itemCount: plugins.asData?.value.plugins.length ?? 0, itemCount: installedPlugins?.length ?? 0,
separatorBuilder: (context, index) => const Gap(12), separatorBuilder: (context, index) => const Gap(12),
itemBuilder: (context, index) { itemBuilder: (context, index) {
final plugin = plugins.asData!.value.plugins[index]; final plugin = installedPlugins![index];
final isDefault = final isDefaultMetadata =
plugins.asData!.value.defaultPlugin == index; plugins.asData!.value.defaultMetadataPluginConfig?.slug ==
plugin.slug;
final isDefaultAudioSource = plugins
.asData!.value.defaultAudioSourcePluginConfig?.slug ==
plugin.slug;
return MetadataInstalledPluginItem( return MetadataInstalledPluginItem(
plugin: plugin, plugin: plugin,
isDefault: isDefault, isDefaultMetadata: isDefaultMetadata,
isDefaultAudioSource: isDefaultAudioSource,
); );
}, },
), ),

View File

@ -8,7 +8,7 @@ class MetadataPluginAuthenticatedNotifier extends AsyncNotifier<bool> {
@override @override
FutureOr<bool> build() async { FutureOr<bool> build() async {
final defaultPluginConfig = ref.watch(metadataPluginsProvider); final defaultPluginConfig = ref.watch(metadataPluginsProvider);
if (defaultPluginConfig.asData?.value.defaultPluginConfig?.abilities if (defaultPluginConfig.asData?.value.defaultMetadataPluginConfig?.abilities
.contains(PluginAbilities.authentication) != .contains(PluginAbilities.authentication) !=
true) { true) {
return false; return false;
@ -35,3 +35,36 @@ final metadataPluginAuthenticatedProvider =
AsyncNotifierProvider<MetadataPluginAuthenticatedNotifier, bool>( AsyncNotifierProvider<MetadataPluginAuthenticatedNotifier, bool>(
MetadataPluginAuthenticatedNotifier.new, MetadataPluginAuthenticatedNotifier.new,
); );
class AudioSourcePluginAuthenticatedNotifier extends AsyncNotifier<bool> {
@override
FutureOr<bool> build() async {
final defaultPluginConfig = ref.watch(metadataPluginsProvider);
if (defaultPluginConfig
.asData?.value.defaultAudioSourcePluginConfig?.abilities
.contains(PluginAbilities.authentication) !=
true) {
return false;
}
final defaultPlugin = await ref.watch(audioSourcePluginProvider.future);
if (defaultPlugin == null) {
return false;
}
final sub = defaultPlugin.auth.authStateStream.listen((event) {
state = AsyncData(defaultPlugin.auth.isAuthenticated());
});
ref.onDispose(() {
sub.cancel();
});
return defaultPlugin.auth.isAuthenticated();
}
}
final audioSourcePluginAuthenticatedProvider =
AsyncNotifierProvider<MetadataPluginAuthenticatedNotifier, bool>(
MetadataPluginAuthenticatedNotifier.new,
);

View File

@ -10,8 +10,10 @@ class MetadataPluginScrobbleNotifier
@override @override
build() { build() {
final metadataPlugin = ref.watch(metadataPluginProvider); final metadataPlugin = ref.watch(metadataPluginProvider);
final pluginConfig = final pluginConfig = ref
ref.watch(metadataPluginsProvider).valueOrNull?.defaultPluginConfig; .watch(metadataPluginsProvider)
.valueOrNull
?.defaultMetadataPluginConfig;
if (metadataPlugin.valueOrNull == null || if (metadataPlugin.valueOrNull == null ||
pluginConfig == null || pluginConfig == null ||

View File

@ -9,3 +9,13 @@ final metadataPluginSupportTextProvider = FutureProvider<String>((ref) async {
} }
return await metadataPlugin.core.support; return await metadataPlugin.core.support;
}); });
final audioSourcePluginSupportTextProvider =
FutureProvider<String>((ref) async {
final audioSourcePlugin = await ref.watch(audioSourcePluginProvider.future);
if (audioSourcePlugin == null) {
throw 'No metadata plugin available';
}
return await audioSourcePlugin.core.support;
});

View File

@ -25,18 +25,28 @@ final allowedDomainsRegex = RegExp(
class MetadataPluginState { class MetadataPluginState {
final List<PluginConfiguration> plugins; final List<PluginConfiguration> plugins;
final int defaultPlugin; final int defaultMetadataPlugin;
final int defaultAudioSourcePlugin;
const MetadataPluginState({ const MetadataPluginState({
this.plugins = const [], this.plugins = const [],
this.defaultPlugin = -1, this.defaultMetadataPlugin = -1,
this.defaultAudioSourcePlugin = -1,
}); });
PluginConfiguration? get defaultPluginConfig { PluginConfiguration? get defaultMetadataPluginConfig {
if (defaultPlugin < 0 || defaultPlugin >= plugins.length) { if (defaultMetadataPlugin < 0 || defaultMetadataPlugin >= plugins.length) {
return null; return null;
} }
return plugins[defaultPlugin]; return plugins[defaultMetadataPlugin];
}
PluginConfiguration? get defaultAudioSourcePluginConfig {
if (defaultAudioSourcePlugin < 0 ||
defaultAudioSourcePlugin >= plugins.length) {
return null;
}
return plugins[defaultAudioSourcePlugin];
} }
factory MetadataPluginState.fromJson(Map<String, dynamic> json) { factory MetadataPluginState.fromJson(Map<String, dynamic> json) {
@ -44,24 +54,30 @@ class MetadataPluginState {
plugins: (json["plugins"] as List<dynamic>) plugins: (json["plugins"] as List<dynamic>)
.map((e) => PluginConfiguration.fromJson(e)) .map((e) => PluginConfiguration.fromJson(e))
.toList(), .toList(),
defaultPlugin: json["default_plugin"] ?? -1, defaultMetadataPlugin: json["default_metadata_plugin"] ?? -1,
defaultAudioSourcePlugin: json['default_audio_source_plugin'],
); );
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return { return {
"plugins": plugins.map((e) => e.toJson()).toList(), "plugins": plugins.map((e) => e.toJson()).toList(),
"default_plugin": defaultPlugin, "default_metadata_plugin": defaultMetadataPlugin,
"default_audio_source_plugin": defaultAudioSourcePlugin
}; };
} }
MetadataPluginState copyWith({ MetadataPluginState copyWith({
List<PluginConfiguration>? plugins, List<PluginConfiguration>? plugins,
int? defaultPlugin, int? defaultMetadataPlugin,
int? defaultAudioSourcePlugin,
}) { }) {
return MetadataPluginState( return MetadataPluginState(
plugins: plugins ?? this.plugins, plugins: plugins ?? this.plugins,
defaultPlugin: defaultPlugin ?? this.defaultPlugin, defaultMetadataPlugin:
defaultMetadataPlugin ?? this.defaultMetadataPlugin,
defaultAudioSourcePlugin:
defaultAudioSourcePlugin ?? this.defaultAudioSourcePlugin,
); );
} }
} }
@ -73,7 +89,7 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
build() async { build() async {
final database = ref.watch(databaseProvider); final database = ref.watch(databaseProvider);
final subscription = database.metadataPluginsTable.select().watch().listen( final subscription = database.pluginsTable.select().watch().listen(
(event) async { (event) async {
state = AsyncValue.data(await toStatePlugins(event)); state = AsyncValue.data(await toStatePlugins(event));
}, },
@ -83,15 +99,16 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
subscription.cancel(); subscription.cancel();
}); });
final plugins = await database.metadataPluginsTable.select().get(); final plugins = await database.pluginsTable.select().get();
return await toStatePlugins(plugins); return await toStatePlugins(plugins);
} }
Future<MetadataPluginState> toStatePlugins( Future<MetadataPluginState> toStatePlugins(
List<MetadataPluginsTableData> plugins, List<PluginsTableData> plugins,
) async { ) async {
int defaultPlugin = -1; int defaultMetadataPlugin = -1;
int defaultAudioSourcePlugin = -1;
final pluginConfigs = <PluginConfiguration>[]; final pluginConfigs = <PluginConfiguration>[];
for (int i = 0; i < plugins.length; i++) { for (int i = 0; i < plugins.length; i++) {
@ -133,20 +150,24 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
!await pluginJsonFile.exists() || !await pluginJsonFile.exists() ||
!await pluginBinaryFile.exists()) { !await pluginBinaryFile.exists()) {
// Delete the plugin entry from DB if the plugin files are not there. // Delete the plugin entry from DB if the plugin files are not there.
await database.metadataPluginsTable.deleteOne(plugin); await database.pluginsTable.deleteOne(plugin);
continue; continue;
} }
pluginConfigs.add(pluginConfig); pluginConfigs.add(pluginConfig);
if (plugin.selected) { if (plugin.selectedForMetadata) {
defaultPlugin = pluginConfigs.length - 1; defaultMetadataPlugin = pluginConfigs.length - 1;
}
if (plugin.selectedForAudioSource) {
defaultAudioSourcePlugin = pluginConfigs.length - 1;
} }
} }
return MetadataPluginState( return MetadataPluginState(
plugins: pluginConfigs, plugins: pluginConfigs,
defaultPlugin: defaultPlugin, defaultMetadataPlugin: defaultMetadataPlugin,
defaultAudioSourcePlugin: defaultAudioSourcePlugin,
); );
} }
@ -327,7 +348,7 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
Future<void> addPlugin(PluginConfiguration plugin) async { Future<void> addPlugin(PluginConfiguration plugin) async {
_assertPluginApiCompatibility(plugin); _assertPluginApiCompatibility(plugin);
final pluginRes = await (database.metadataPluginsTable.select() final pluginRes = await (database.pluginsTable.select()
..where( ..where(
(tbl) => (tbl) =>
tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author), tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author),
@ -339,8 +360,8 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
throw MetadataPluginException.duplicatePlugin(); throw MetadataPluginException.duplicatePlugin();
} }
await database.metadataPluginsTable.insertOne( await database.pluginsTable.insertOne(
MetadataPluginsTableCompanion.insert( PluginsTableCompanion.insert(
name: plugin.name, name: plugin.name,
author: plugin.author, author: plugin.author,
description: plugin.description, description: plugin.description,
@ -351,7 +372,14 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
pluginApiVersion: Value(plugin.pluginApiVersion), pluginApiVersion: Value(plugin.pluginApiVersion),
repository: Value(plugin.repository), repository: Value(plugin.repository),
// Setting the very first plugin as the default plugin // Setting the very first plugin as the default plugin
selected: Value(state.valueOrNull?.plugins.isEmpty ?? true), selectedForMetadata: Value(
(state.valueOrNull?.plugins.isEmpty ?? true) &&
plugin.abilities.contains(PluginAbilities.metadata),
),
selectedForAudioSource: Value(
(state.valueOrNull?.plugins.isEmpty ?? true) &&
plugin.abilities.contains(PluginAbilities.audioSource),
),
), ),
); );
} }
@ -362,17 +390,32 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
if (pluginExtractionDir.existsSync()) { if (pluginExtractionDir.existsSync()) {
await pluginExtractionDir.delete(recursive: true); await pluginExtractionDir.delete(recursive: true);
} }
await database.metadataPluginsTable.deleteWhere((tbl) => await database.pluginsTable.deleteWhere((tbl) =>
tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author)); tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author));
// Same here, if the removed plugin is the default plugin // Same here, if the removed plugin is the default plugin
// set the first available plugin as the default plugin // set the first available plugin as the default plugin
// only when there is 1 remaining plugin // only when there is 1 remaining plugin
if (state.valueOrNull?.defaultPluginConfig == plugin) { if (state.valueOrNull?.defaultMetadataPluginConfig == plugin) {
final remainingPlugins = final remainingPlugins = state.valueOrNull?.plugins.where(
state.valueOrNull?.plugins.where((p) => p != plugin) ?? []; (p) =>
p != plugin && p.abilities.contains(PluginAbilities.metadata),
) ??
[];
if (remainingPlugins.length == 1) { if (remainingPlugins.length == 1) {
await setDefaultPlugin(remainingPlugins.first); await setDefaultMetadataPlugin(remainingPlugins.first);
}
}
if (state.valueOrNull?.defaultAudioSourcePluginConfig == plugin) {
final remainingPlugins = state.valueOrNull?.plugins.where(
(p) =>
p != plugin &&
p.abilities.contains(PluginAbilities.audioSource),
) ??
[];
if (remainingPlugins.length == 1) {
await setDefaultAudioSourcePlugin(remainingPlugins.first);
} }
} }
} }
@ -381,7 +424,10 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
PluginConfiguration plugin, PluginConfiguration plugin,
PluginUpdateAvailable update, PluginUpdateAvailable update,
) async { ) async {
final isDefault = plugin == state.valueOrNull?.defaultPluginConfig; final isDefaultMetadata =
plugin == state.valueOrNull?.defaultMetadataPluginConfig;
final isDefaultAudioSource =
plugin == state.valueOrNull?.defaultAudioSourcePluginConfig;
final pluginUpdatedConfig = final pluginUpdatedConfig =
await downloadAndCachePlugin(update.downloadUrl); await downloadAndCachePlugin(update.downloadUrl);
@ -394,21 +440,46 @@ class MetadataPluginNotifier extends AsyncNotifier<MetadataPluginState> {
await removePlugin(plugin); await removePlugin(plugin);
await addPlugin(pluginUpdatedConfig); await addPlugin(pluginUpdatedConfig);
if (isDefault) { if (isDefaultMetadata) {
await setDefaultPlugin(pluginUpdatedConfig); await setDefaultMetadataPlugin(pluginUpdatedConfig);
}
if (isDefaultAudioSource) {
await setDefaultAudioSourcePlugin(pluginUpdatedConfig);
} }
} }
Future<void> setDefaultPlugin(PluginConfiguration plugin) async { Future<void> setDefaultMetadataPlugin(PluginConfiguration plugin) async {
await database.metadataPluginsTable assert(
plugin.abilities.contains(PluginAbilities.metadata),
"Must be a metadata plugin",
);
await database.pluginsTable
.update() .update()
.write(const MetadataPluginsTableCompanion(selected: Value(false))); .write(const PluginsTableCompanion(selectedForMetadata: Value(false)));
await (database.metadataPluginsTable.update() await (database.pluginsTable.update()
..where((tbl) => ..where((tbl) =>
tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author))) tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author)))
.write( .write(
const MetadataPluginsTableCompanion(selected: Value(true)), const PluginsTableCompanion(selectedForMetadata: Value(true)),
);
}
Future<void> setDefaultAudioSourcePlugin(PluginConfiguration plugin) async {
assert(
plugin.abilities.contains(PluginAbilities.audioSource),
"Must be an audio-source plugin",
);
await database.pluginsTable.update().write(
const PluginsTableCompanion(selectedForAudioSource: Value(false)));
await (database.pluginsTable.update()
..where((tbl) =>
tbl.name.equals(plugin.name) & tbl.author.equals(plugin.author)))
.write(
const PluginsTableCompanion(selectedForAudioSource: Value(true)),
); );
} }
@ -445,7 +516,32 @@ final metadataPluginsProvider =
final metadataPluginProvider = FutureProvider<MetadataPlugin?>( final metadataPluginProvider = FutureProvider<MetadataPlugin?>(
(ref) async { (ref) async {
final defaultPlugin = await ref.watch( final defaultPlugin = await ref.watch(
metadataPluginsProvider.selectAsync((data) => data.defaultPluginConfig), metadataPluginsProvider
.selectAsync((data) => data.defaultMetadataPluginConfig),
);
final youtubeEngine = ref.read(youtubeEngineProvider);
if (defaultPlugin == null) {
return null;
}
final pluginsNotifier = ref.read(metadataPluginsProvider.notifier);
final pluginByteCode =
await pluginsNotifier.getPluginByteCode(defaultPlugin);
return await MetadataPlugin.create(
youtubeEngine,
defaultPlugin,
pluginByteCode,
);
},
);
final audioSourcePluginProvider = FutureProvider<MetadataPlugin?>(
(ref) async {
final defaultPlugin = await ref.watch(
metadataPluginsProvider
.selectAsync((data) => data.defaultAudioSourcePluginConfig),
); );
final youtubeEngine = ref.read(youtubeEngineProvider); final youtubeEngine = ref.read(youtubeEngineProvider);

View File

@ -8,10 +8,25 @@ final metadataPluginUpdateCheckerProvider =
final metadataPlugin = await ref.watch(metadataPluginProvider.future); final metadataPlugin = await ref.watch(metadataPluginProvider.future);
if (metadataPlugin == null || if (metadataPlugin == null ||
metadataPluginConfigs.defaultPluginConfig == null) { metadataPluginConfigs.defaultMetadataPluginConfig == null) {
return null; return null;
} }
return metadataPlugin.core return metadataPlugin.core
.checkUpdate(metadataPluginConfigs.defaultPluginConfig!); .checkUpdate(metadataPluginConfigs.defaultMetadataPluginConfig!);
});
final audioSourcePluginUpdateCheckerProvider =
FutureProvider<PluginUpdateAvailable?>((ref) async {
final audioSourcePluginConfigs =
await ref.watch(metadataPluginsProvider.future);
final audioSourcePlugin = await ref.watch(audioSourcePluginProvider.future);
if (audioSourcePlugin == null ||
audioSourcePluginConfigs.defaultAudioSourcePluginConfig == null) {
return null;
}
return audioSourcePlugin.core
.checkUpdate(audioSourcePluginConfigs.defaultAudioSourcePluginConfig!);
}); });

View File

@ -1,41 +1,44 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
import 'package:drift/internal/migrations.dart'; import 'package:drift/internal/migrations.dart';
import 'schema_v5.dart' as v5;
import 'schema_v4.dart' as v4;
import 'schema_v8.dart' as v8;
import 'schema_v3.dart' as v3;
import 'schema_v2.dart' as v2;
import 'schema_v1.dart' as v1; import 'schema_v1.dart' as v1;
import 'schema_v7.dart' as v7; import 'schema_v2.dart' as v2;
import 'schema_v3.dart' as v3;
import 'schema_v4.dart' as v4;
import 'schema_v5.dart' as v5;
import 'schema_v6.dart' as v6; import 'schema_v6.dart' as v6;
import 'schema_v7.dart' as v7;
import 'schema_v8.dart' as v8;
import 'schema_v9.dart' as v9;
class GeneratedHelper implements SchemaInstantiationHelper { class GeneratedHelper implements SchemaInstantiationHelper {
@override @override
GeneratedDatabase databaseForVersion(QueryExecutor db, int version) { GeneratedDatabase databaseForVersion(QueryExecutor db, int version) {
switch (version) { switch (version) {
case 5:
return v5.DatabaseAtV5(db);
case 4:
return v4.DatabaseAtV4(db);
case 8:
return v8.DatabaseAtV8(db);
case 3:
return v3.DatabaseAtV3(db);
case 2:
return v2.DatabaseAtV2(db);
case 1: case 1:
return v1.DatabaseAtV1(db); return v1.DatabaseAtV1(db);
case 7: case 2:
return v7.DatabaseAtV7(db); return v2.DatabaseAtV2(db);
case 3:
return v3.DatabaseAtV3(db);
case 4:
return v4.DatabaseAtV4(db);
case 5:
return v5.DatabaseAtV5(db);
case 6: case 6:
return v6.DatabaseAtV6(db); return v6.DatabaseAtV6(db);
case 7:
return v7.DatabaseAtV7(db);
case 8:
return v8.DatabaseAtV8(db);
case 9:
return v9.DatabaseAtV9(db);
default: default:
throw MissingSchemaException(version, versions); throw MissingSchemaException(version, versions);
} }
} }
static const versions = const [1, 2, 3, 4, 5, 6, 7, 8]; static const versions = const [1, 2, 3, 4, 5, 6, 7, 8, 9];
} }

View File

@ -1,6 +1,6 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
class AuthenticationTable extends Table class AuthenticationTable extends Table

View File

@ -1,6 +1,6 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
class AuthenticationTable extends Table class AuthenticationTable extends Table

View File

@ -1,6 +1,6 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
class AuthenticationTable extends Table class AuthenticationTable extends Table

View File

@ -1,6 +1,6 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
class AuthenticationTable extends Table class AuthenticationTable extends Table

View File

@ -1,6 +1,6 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
class AuthenticationTable extends Table class AuthenticationTable extends Table

View File

@ -1,6 +1,6 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
class AuthenticationTable extends Table class AuthenticationTable extends Table

View File

@ -1,6 +1,6 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
class AuthenticationTable extends Table class AuthenticationTable extends Table

View File

@ -1,6 +1,6 @@
// dart format width=80
// GENERATED CODE, DO NOT EDIT BY HAND. // GENERATED CODE, DO NOT EDIT BY HAND.
// ignore_for_file: type=lint // ignore_for_file: type=lint
//@dart=2.12
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
class AuthenticationTable extends Table class AuthenticationTable extends Table

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,9 @@
{ {
"ar": [ "ar": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -8,6 +12,10 @@
], ],
"bn": [ "bn": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -16,6 +24,10 @@
], ],
"ca": [ "ca": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -24,6 +36,10 @@
], ],
"cs": [ "cs": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -32,6 +48,10 @@
], ],
"de": [ "de": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -40,6 +60,10 @@
], ],
"es": [ "es": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -48,6 +72,10 @@
], ],
"eu": [ "eu": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -56,6 +84,10 @@
], ],
"fa": [ "fa": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -64,6 +96,10 @@
], ],
"fi": [ "fi": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -72,6 +108,10 @@
], ],
"fr": [ "fr": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -80,6 +120,10 @@
], ],
"hi": [ "hi": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -88,6 +132,10 @@
], ],
"id": [ "id": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -96,6 +144,10 @@
], ],
"it": [ "it": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -104,6 +156,10 @@
], ],
"ja": [ "ja": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -112,6 +168,10 @@
], ],
"ka": [ "ka": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -120,6 +180,10 @@
], ],
"ko": [ "ko": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -128,6 +192,10 @@
], ],
"ne": [ "ne": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -137,6 +205,10 @@
"nl": [ "nl": [
"audio_source", "audio_source",
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -145,6 +217,10 @@
], ],
"pl": [ "pl": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -153,6 +229,10 @@
], ],
"pt": [ "pt": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -161,6 +241,10 @@
], ],
"ru": [ "ru": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -169,6 +253,10 @@
], ],
"ta": [ "ta": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -177,6 +265,10 @@
], ],
"th": [ "th": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -185,6 +277,10 @@
], ],
"tl": [ "tl": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -193,6 +289,10 @@
], ],
"tr": [ "tr": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -201,6 +301,10 @@
], ],
"uk": [ "uk": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -209,6 +313,10 @@
], ],
"vi": [ "vi": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -217,6 +325,10 @@
], ],
"zh": [ "zh": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",
@ -225,6 +337,10 @@
], ],
"zh_TW": [ "zh_TW": [
"default_metadata_source",
"set_default_metadata_source",
"default_audio_source",
"set_default_audio_source",
"plugins", "plugins",
"configure_plugins", "configure_plugins",
"source", "source",