From cd35e05461e04f761c45a5ecf6757cafd71fc202 Mon Sep 17 00:00:00 2001 From: ema Date: Sun, 15 Dec 2024 04:06:19 +0800 Subject: [PATCH] Fix multiple covers check method --- .../QuickLook.Plugin.CsvViewer.csproj | 2 +- .../QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/QuickLook.Plugin/QuickLook.Plugin.CsvViewer/QuickLook.Plugin.CsvViewer.csproj b/QuickLook.Plugin/QuickLook.Plugin.CsvViewer/QuickLook.Plugin.CsvViewer.csproj index 88aba7af..65c22ec3 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.CsvViewer/QuickLook.Plugin.CsvViewer.csproj +++ b/QuickLook.Plugin/QuickLook.Plugin.CsvViewer/QuickLook.Plugin.CsvViewer.csproj @@ -53,7 +53,7 @@ - + diff --git a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs index 52bcdcf5..1b268f82 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs @@ -276,9 +276,9 @@ private void UpdateMeta(string path, MediaInfo.MediaInfo info) { var coverBytes = Convert.FromBase64String ( - coverData.Length % 4 == 0 // MediaInfo may will return multiple covers - ? coverData - : coverData.Split(" / ")[0] // Get the first cover only + coverData.Contains(' ') // MediaInfo may will return multiple covers + ? coverData.Split(" / ")[0] // Get the first cover only + : coverData ); using var ms = new MemoryStream(coverBytes);