From e3dcb57aee7211f2142e998da1abf624d08e32ab Mon Sep 17 00:00:00 2001 From: Feichtmeier Date: Sun, 8 Dec 2024 11:40:30 +0100 Subject: [PATCH] fix: Make local music genre menu case insensitive Ref #1081 --- lib/common/data/audio.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/common/data/audio.dart b/lib/common/data/audio.dart index 87a5fd4e..9fecb137 100644 --- a/lib/common/data/audio.dart +++ b/lib/common/data/audio.dart @@ -284,10 +284,8 @@ class Audio { final fileName = File(path).uri.pathSegments.lastOrNull; final genre = data.genres.firstOrNull?.startsWith('(') == true && data.genres.firstOrNull?.endsWith(')') == true - ? tagGenres[data.genres.firstOrNull - ?.replaceAll('(', '') - .replaceAll(')', '')] - ?.everyWordCapitalized + ? tagGenres[ + data.genres.firstOrNull?.replaceAll('(', '').replaceAll(')', '')] : data.genres.firstOrNull; return Audio( @@ -302,7 +300,7 @@ class Audio { discTotal: data.totalDisc, durationMs: data.duration?.inMilliseconds.toDouble(), // fileSize: data., - genre: genre, + genre: genre?.everyWordCapitalized, pictureData: data.pictures.firstWhereOrNull((e) => e.bytes.isNotEmpty)?.bytes, pictureMimeType: data.pictures.firstOrNull?.mimetype,