diff --git a/lib/API/musify.dart b/lib/API/musify.dart index 455f9d75..69dc9020 100644 --- a/lib/API/musify.dart +++ b/lib/API/musify.dart @@ -190,12 +190,18 @@ Future addUserPlaylist(String input, BuildContext context) async { } try { - await _yt.playlists.get(playlistId); + final _playlist = await _yt.playlists.get(playlistId); if (userPlaylists.contains(playlistId)) { return '${context.l10n!.playlistAlreadyExists}!'; } + if (_playlist.title == '' && + _playlist.author == '' && + _playlist.videoCount == null) { + return '${context.l10n!.invalidYouTubePlaylist}!'; + } + userPlaylists.add(playlistId); addOrUpdateData('user', 'playlists', userPlaylists); return '${context.l10n!.addedSuccess}!'; diff --git a/lib/localization/app_ar.arb b/lib/localization/app_ar.arb index 90e79fff..2a7cebcb 100644 --- a/lib/localization/app_ar.arb +++ b/lib/localization/app_ar.arb @@ -39,6 +39,7 @@ "error": "حدث خطأ ما", "folderRestrictions": "نظرًا للقيود الجديدة على Android، فإنه من الضروري اختيار مجلدات محددة ومناسبة لأنواع الملفات المختلفة. يرجى التأكد من اختيار مجلد 'المستندات' أو 'التنزيلات' لنسخة احتياطية للتطبيق.", "home": "الرئيسية", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "اللغة", "languageMsg": "تم تغيير اللغة", "library": "Library", diff --git a/lib/localization/app_de.arb b/lib/localization/app_de.arb index 118f5e62..20ebc86d 100644 --- a/lib/localization/app_de.arb +++ b/lib/localization/app_de.arb @@ -39,6 +39,7 @@ "error": "Etwas ist schiefgelaufen", "folderRestrictions": "Aufgrund neuer Beschränkungen auf Android ist es wichtig, spezifische und geeignete Ordner für verschiedene Dateitypen auszuwählen. Stelle sicher, dass du entweder den Ordner 'Dokumente' oder 'Downloads' für das App-Backup auswählst.", "home": "Startseite", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Sprache", "languageMsg": "Sprache geändert", "library": "Bibliothek", @@ -89,4 +90,4 @@ "useSquigglySlider": "Wellenförmiger Playback-Balken", "userPlaylists": "Deine Playlists", "youtubePlaylistLinkOrId": "Youtube-Playlist-Link oder ID einer Youtube-Playlist" -} +} \ No newline at end of file diff --git a/lib/localization/app_el.arb b/lib/localization/app_el.arb index 38592e9d..8d77a059 100644 --- a/lib/localization/app_el.arb +++ b/lib/localization/app_el.arb @@ -39,6 +39,7 @@ "error": "Παρουσιάστηκε κάποιο πρόβλημα", "folderRestrictions": "Λόγω νέων περιορισμών στο Android, είναι απαραίτητο να επιλέξετε συγκεκριμένους και κατάλληλους φακέλους για διάφορους τύπους αρχείων. Βεβαιωθείτε ότι επιλέγετε είτε τον φάκελο 'Έγγραφα' είτε τον φάκελο 'Λήψεις' για τη δημιουργία αντιγράφου ασφαλείας της εφαρμογής.", "home": "Κεντρική", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Γλώσσα", "languageMsg": "Η γλώσσα έχει αλλάξει", "library": "Library", diff --git a/lib/localization/app_en.arb b/lib/localization/app_en.arb index 86a18a83..b8c77418 100644 --- a/lib/localization/app_en.arb +++ b/lib/localization/app_en.arb @@ -39,6 +39,7 @@ "error": "An error occurred. Please try again.", "folderRestrictions": "Android restrictions require selecting specific folders (e.g., Documents or Downloads) for backup.", "home": "Home", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Language", "languageMsg": "Language updated", "library": "Library", diff --git a/lib/localization/app_fr.arb b/lib/localization/app_fr.arb index 12a109ae..d69d41a0 100644 --- a/lib/localization/app_fr.arb +++ b/lib/localization/app_fr.arb @@ -39,6 +39,7 @@ "error": "Une erreur s'est produite", "folderRestrictions": "En raison des nouvelles restrictions sur Android, il est essentiel de sélectionner des dossiers spécifiques et appropriés pour différents types de fichiers. Assurez-vous de choisir soit le dossier 'Documents' soit le dossier 'Téléchargements' pour la sauvegarde de l'application.", "home": "Accueil", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Langue", "languageMsg": "Langue modifiée", "library": "Library", diff --git a/lib/localization/app_id.arb b/lib/localization/app_id.arb index 0b00e754..89750bfa 100644 --- a/lib/localization/app_id.arb +++ b/lib/localization/app_id.arb @@ -39,6 +39,7 @@ "error": "Kesalahan", "folderRestrictions": "Karena adanya pembatasan baru pada Android, penting untuk memilih folder yang spesifik dan sesuai untuk berbagai jenis file. Pastikan Anda memilih folder 'Dokumen' atau 'Unduhan' untuk pencadangan aplikasi.", "home": "Beranda", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Bahasa", "languageMsg": "Bahasa berhasil diubah", "library": "Library", diff --git a/lib/localization/app_it.arb b/lib/localization/app_it.arb index 3534483e..a09f85e9 100644 --- a/lib/localization/app_it.arb +++ b/lib/localization/app_it.arb @@ -39,6 +39,7 @@ "error": "Qualcosa è andato storto", "folderRestrictions": "A causa delle nuove restrizioni su Android, è necessario selezionare cartelle specifiche e appropriate per diversi tipi di file. Assicurati di scegliere la cartella 'Documents' o 'Downloads' per il backup dell'app.", "home": "Home", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Lingua", "languageMsg": "Lingua cambiata con successo", "library": "Library", diff --git a/lib/localization/app_ja.arb b/lib/localization/app_ja.arb index 8a970862..9cc60b50 100644 --- a/lib/localization/app_ja.arb +++ b/lib/localization/app_ja.arb @@ -39,6 +39,7 @@ "error": "不明のエラーが発生", "folderRestrictions": "Androidの新しい制約により、ファイルの種類に対して適切なフォルダを選択する必要があります。本アプリのバックアップには、「Documents」か「Downloads」フォルダを必ず選択してください。", "home": "ホーム", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "言語", "languageMsg": "言語を変更しました", "library": "Library", diff --git a/lib/localization/app_ka.arb b/lib/localization/app_ka.arb index bfc9cea4..3a8ad4c9 100644 --- a/lib/localization/app_ka.arb +++ b/lib/localization/app_ka.arb @@ -39,6 +39,7 @@ "error": "დაფიქსირდა შეცდომა", "folderRestrictions": "Android-ის ახალი შეზღუდვებიდან გამომდინარე, საჭიროა რომ აირჩიოთ კონკრეტული და შესაბამისი საქაღალდეები განსხვავებული ფაილის ტიპებისთვის. გთხოვთ დარწმუნდით რომ ირჩევთ 'Documents' ან 'Downloads' საქაღალდეს აპლიკაციის ინფორმაციის რეზერვისთვის.", "home": "მთავარი", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "ენა", "languageMsg": "ენა შეიცვალა", "library": "Library", diff --git a/lib/localization/app_ko.arb b/lib/localization/app_ko.arb index d665e94b..1468318f 100644 --- a/lib/localization/app_ko.arb +++ b/lib/localization/app_ko.arb @@ -39,6 +39,7 @@ "error": "오류가 발생했습니다. 다시 시도해 주세요.", "folderRestrictions": "안드로이드 제한으로 인해 백업할 특정 폴더(예: 문서 또는 다운로드)를 선택해야 합니다.", "home": "홈", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "언어", "languageMsg": "언어가 성공적으로 변경되었음", "library": "라이브러리", @@ -89,4 +90,4 @@ "useSquigglySlider": "굴곡 슬라이더", "userPlaylists": "사용자 재생목록", "youtubePlaylistLinkOrId": "유튜브 재생목록 링크 또는 ID " -} +} \ No newline at end of file diff --git a/lib/localization/app_pl.arb b/lib/localization/app_pl.arb index 08ce5666..53319fa4 100644 --- a/lib/localization/app_pl.arb +++ b/lib/localization/app_pl.arb @@ -39,6 +39,7 @@ "error": "Coś poszło nie tak", "folderRestrictions": "Ze względu na nowe ograniczenia w systemie Android konieczne jest wybranie określonych i odpowiednich folderów dla różnych typów plików. Upewnij się, że wybrałeś folder „Dokumenty” lub „Pobrane” dla kopii zapasowej aplikacji.", "home": "Dom", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Język", "languageMsg": "Język został zmieniony", "library": "Library", diff --git a/lib/localization/app_pt.arb b/lib/localization/app_pt.arb index d4ccd1f5..ff6c6640 100644 --- a/lib/localization/app_pt.arb +++ b/lib/localization/app_pt.arb @@ -39,6 +39,7 @@ "error": "Algo deu errado", "folderRestrictions": "Devido às novas restrições no Android, é essencial selecionar pastas específicas e apropriadas para diferentes tipos de arquivo. Por favor, certifique-se de escolher a pasta 'Documentos' ou 'Downloads' para o backup do aplicativo.", "home": "Início", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Idioma", "languageMsg": "O idioma foi alterado", "library": "Library", diff --git a/lib/localization/app_tr.arb b/lib/localization/app_tr.arb index ab9cc5d2..b1431310 100644 --- a/lib/localization/app_tr.arb +++ b/lib/localization/app_tr.arb @@ -39,6 +39,7 @@ "error": "Bir hata oluştu", "folderRestrictions": "Android üzerindeki yeni kısıtlamalar nedeniyle, farklı dosya türleri için belirli ve uygun klasörleri seçmek önemlidir. Lütfen uygulama yedekleme için 'Belgeler' veya 'İndirilenler' klasörlerinden birini seçtiğinizden emin olun.", "home": "Ana Sayfa", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Dil", "languageMsg": "Dil değiştirildi", "library": "Library", diff --git a/lib/localization/app_uk.arb b/lib/localization/app_uk.arb index 05b70bc3..b4973fed 100644 --- a/lib/localization/app_uk.arb +++ b/lib/localization/app_uk.arb @@ -39,6 +39,7 @@ "error": "Щось пішло не так", "folderRestrictions": "У зв'язку з новими обмеженнями на Android, обирається конкретні та відповідні теки для різних типів файлів. Будь ласка, переконайтеся, що ви вибрали теку 'Документи' або 'Завантаження' для резервного копіювання програми", "home": "Головна", + "invalidYouTubePlaylist": "Invalid Youtube playlist", "language": "Мова", "languageMsg": "Мову змінено", "library": "Library", diff --git a/no_translations.txt b/no_translations.txt index 9e26dfee..25e0f155 100644 --- a/no_translations.txt +++ b/no_translations.txt @@ -1 +1,5 @@ -{} \ No newline at end of file +{ + "ru": [ + "invalidYouTubePlaylist" + ] +}