Ugly patch to avoid exception in GetAlbumCover

This commit is contained in:
Théo Marchal 2022-10-29 23:46:43 +02:00
parent cabfb165da
commit cb741349fa

View File

@ -390,7 +390,7 @@ namespace unison
if (_connection == null) if (_connection == null)
return; return;
IMpdMessage<MpdBinaryData> albumReq = await _connection.SendAsync(new ReadPictureCommand(path, currentSize)); IMpdMessage<MpdBinaryData> albumReq = await _connection.SendAsync(new AlbumArtCommand(path, currentSize));
if (!albumReq.IsResponseValid) if (!albumReq.IsResponseValid)
break; break;
@ -412,7 +412,7 @@ namespace unison
if (_connection == null) if (_connection == null)
return; return;
IMpdMessage<MpdBinaryData> albumReq = await _connection.SendAsync(new AlbumArtCommand(path, currentSize)); IMpdMessage<MpdBinaryData> albumReq = await _connection.SendAsync(new ReadPictureCommand(path, currentSize));
if (!albumReq.IsResponseValid) if (!albumReq.IsResponseValid)
break; break;
@ -441,7 +441,7 @@ namespace unison
{ {
_cover = BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad); _cover = BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
} }
catch (System.NotSupportedException) catch
{ {
_cover = null; _cover = null;
} }