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>
pull/12832/head^2
revam 3 months ago committed by Joshua M. Boniface
parent 600a09f1fc
commit 510312045a

@ -193,6 +193,7 @@
- [oxixes](https://github.com/oxixes) - [oxixes](https://github.com/oxixes)
- [elfalem](https://github.com/elfalem) - [elfalem](https://github.com/elfalem)
- [benedikt257](https://github.com/benedikt257) - [benedikt257](https://github.com/benedikt257)
- [revam](https://github.com/revam)
# Emby Contributors # Emby Contributors

@ -387,8 +387,8 @@ namespace MediaBrowser.Providers.Manager
item.RemoveImages(images); item.RemoveImages(images);
// Cleanup old metadata directory for episodes if empty // Cleanup old metadata directory for episodes if empty, as long as it's not a virtual item
if (item is Episode) if (item is Episode && !item.IsVirtualItem)
{ {
var oldLocalMetadataDirectory = Path.Combine(item.ContainingFolderPath, "metadata"); var oldLocalMetadataDirectory = Path.Combine(item.ContainingFolderPath, "metadata");
if (_fileSystem.DirectoryExists(oldLocalMetadataDirectory) && !_fileSystem.GetFiles(oldLocalMetadataDirectory).Any()) if (_fileSystem.DirectoryExists(oldLocalMetadataDirectory) && !_fileSystem.GetFiles(oldLocalMetadataDirectory).Any())

Loading…
Cancel
Save