summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-10-23 17:09:02 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-10-24 09:22:56 +0000
commita54d15ce395b32ac2ca977160668b94162e31102 (patch)
treedf661b069e7017cbb84cc856f41710833d2eac9f /lib
parent448b089dabd6a4f2729c7478edb1536ae4d47222 (diff)
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: Ic89ac59693e0792b62c431b5841d47f3f7c215ef Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'lib')
-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) {