fix: local tracks not working when there's a invalid music file in the folder

This commit is contained in:
Kingkor Roy Tirtho 2023-04-15 17:22:19 +06:00
parent 28ff3216ef
commit 5855820569
2 changed files with 5 additions and 5 deletions

View File

@ -34,6 +34,8 @@ if (keystorePropertiesFile.exists()) {
android { android {
compileSdkVersion 33 compileSdkVersion 33
ndkVersion "21.4.7075529"
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8

View File

@ -94,12 +94,10 @@ final localTracksProvider = FutureProvider<List<LocalTrack>>((ref) async {
} }
return {"metadata": metadata, "file": f, "art": imageFile.path}; 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) { } catch (e, stack) {
if (e is FfiException) {
return {};
}
Catcher.reportCheckedError(e, stack); Catcher.reportCheckedError(e, stack);
return {}; return {};
} }