Backport pull request #12909 from jellyfin/release-10.10.z

Don't try to prune images for virtual episodes.

Original-merge: f99e0407fd

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
revam 2024-11-03 10:55:49 -05:00 committed by Joshua M. Boniface
parent 600a09f1fc
commit 510312045a
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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())