From 4a83c35a6d3572d41b1883fb1fffb6bbf5cff20f Mon Sep 17 00:00:00 2001 From: Royce551 Date: Mon, 7 Jun 2021 15:24:43 -0500 Subject: [PATCH] fix mpris check not working --- .../Handlers/Integrations/MPRISIntegration.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FRESHMusicPlayer/FRESHMusicPlayer-Avalonia/Handlers/Integrations/MPRISIntegration.cs b/FRESHMusicPlayer/FRESHMusicPlayer-Avalonia/Handlers/Integrations/MPRISIntegration.cs index 41a2f82..8e03c60 100644 --- a/FRESHMusicPlayer/FRESHMusicPlayer-Avalonia/Handlers/Integrations/MPRISIntegration.cs +++ b/FRESHMusicPlayer/FRESHMusicPlayer-Avalonia/Handlers/Integrations/MPRISIntegration.cs @@ -149,7 +149,7 @@ namespace FRESHMusicPlayer.Handlers.Integrations {"xesam:trackNumber", track.TrackNumber } }; - if (viewModel.Config.MPRISShowCoverArt && track.EmbeddedPictures.Count <= 0) + if (viewModel.Config.MPRISShowCoverArt && track.EmbeddedPictures.Count >= 0) { var tempPath = Path.Combine(Path.GetTempPath(), "FMP-CoverArt.png"); @@ -157,6 +157,7 @@ namespace FRESHMusicPlayer.Handlers.Integrations using var z = System.Drawing.Image.FromStream(new MemoryStream(embeddedPicture.PictureData)); z.Save(tempPath, System.Drawing.Imaging.ImageFormat.Png); x.Add("mpris:artUrl", $"file://{tempPath}"); + Console.WriteLine($"file://{tempPath}"); } OnPropertiesChanged?.Invoke(PropertyChanges.ForProperty("Metadata", x));