From 5855820569dfad7cd26f1e0f0c985babd0d9485d Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Sat, 15 Apr 2023 17:22:19 +0600 Subject: [PATCH] fix: local tracks not working when there's a invalid music file in the folder --- android/app/build.gradle | 2 ++ lib/components/library/user_local_tracks.dart | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 1d519014f..40de810cb 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -34,6 +34,8 @@ if (keystorePropertiesFile.exists()) { android { compileSdkVersion 33 + ndkVersion "21.4.7075529" + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/lib/components/library/user_local_tracks.dart b/lib/components/library/user_local_tracks.dart index bd0df9a43..28fa97c1d 100644 --- a/lib/components/library/user_local_tracks.dart +++ b/lib/components/library/user_local_tracks.dart @@ -94,12 +94,10 @@ final localTracksProvider = FutureProvider>((ref) async { } return {"metadata": metadata, "file": f, "art": imageFile.path}; - } on FfiException catch (e) { - if (e.message != "NoTag: reader does not contain an id3 tag") { - rethrow; - } - return {}; } catch (e, stack) { + if (e is FfiException) { + return {}; + } Catcher.reportCheckedError(e, stack); return {}; }