aboutsummaryrefslogtreecommitdiffstats
path: root/lib/data
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-10-22 16:55:25 -0400
committerScott Murray <scott.murray@konsulko.com>2024-10-22 16:58:56 -0400
commit87c4e34f16555c70d590a56b522366599209b991 (patch)
tree8d2beba83a4c736740ee64be5201d21b4cb5bbe0 /lib/data
parentf8b39a2902e73422259965e724a44c56f49ce103 (diff)
Update album art readingHEADmaster
Changes: - Remove escaping of filename in readpicture call to dart-mpd's MpdClient. Upstream changed the API so that it is no longer required. - Refresh pubspec.lock for the new Flutter SDK version, as that had not previously been checked in. Bug-AGL: SPEC-5269 Change-Id: Ied2947b852bea940ee74be517b835ef12d11280d Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'lib/data')
-rw-r--r--lib/data/data_providers/mpd_client.dart11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/data/data_providers/mpd_client.dart b/lib/data/data_providers/mpd_client.dart
index 98d8918..daafab6 100644
--- a/lib/data/data_providers/mpd_client.dart
+++ b/lib/data/data_providers/mpd_client.dart
@@ -266,14 +266,17 @@ class MpdClient {
artState[position] = ArtStateEntry(reading: true, read: false);
}
debugPrint("Reading art for \"$file\"");
- // Work around dart_mpd not escaping spaced strings itself
- String escapedFile = file.replaceAll(RegExp(r" "), "\\ ");
- escapedFile = "\"$file\"";
bool first = true;
do {
//debugPrint("Reading, offset = $offset, size = $size");
- var chunk = await client.readpicture(escapedFile, offset);
+ api.MpdImage? chunk = null;
+ try {
+ chunk = await client.readpicture(file, offset);
+ } catch (e) {
+ debugPrint(e.toString());
+ chunk = null;
+ }
if (chunk != null) {
if (chunk.size != null) {
if (chunk.size == 0) {