From 510312045a4af2bd0478b3f6542e2c4884fa5d57 Mon Sep 17 00:00:00 2001 From: revam Date: Sun, 3 Nov 2024 10:55:49 -0500 Subject: [PATCH] Backport pull request #12909 from jellyfin/release-10.10.z Don't try to prune images for virtual episodes. Original-merge: f99e0407fd67358fc07c30ac4cbfa736be5f4daa Merged-by: crobibero Backported-by: Joshua M. Boniface --- CONTRIBUTORS.md | 1 + MediaBrowser.Providers/Manager/ItemImageProvider.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index bcc428abbd..e44608135c 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -193,6 +193,7 @@ - [oxixes](https://github.com/oxixes) - [elfalem](https://github.com/elfalem) - [benedikt257](https://github.com/benedikt257) + - [revam](https://github.com/revam) # Emby Contributors diff --git a/MediaBrowser.Providers/Manager/ItemImageProvider.cs b/MediaBrowser.Providers/Manager/ItemImageProvider.cs index 36a7c2fabe..9b738ce6f3 100644 --- a/MediaBrowser.Providers/Manager/ItemImageProvider.cs +++ b/MediaBrowser.Providers/Manager/ItemImageProvider.cs @@ -387,8 +387,8 @@ namespace MediaBrowser.Providers.Manager item.RemoveImages(images); - // Cleanup old metadata directory for episodes if empty - if (item is Episode) + // Cleanup old metadata directory for episodes if empty, as long as it's not a virtual item + if (item is Episode && !item.IsVirtualItem) { var oldLocalMetadataDirectory = Path.Combine(item.ContainingFolderPath, "metadata"); if (_fileSystem.DirectoryExists(oldLocalMetadataDirectory) && !_fileSystem.GetFiles(oldLocalMetadataDirectory).Any())