Backport pull request #12025 from jellyfin/release-10.9.z

Fix empty image folder removal for legacy locations

Original-merge: 476dc01f4d

Merged-by: Bond-009 <bond.009@outlook.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
Shadowghost
2024-06-24 20:28:58 -04:00
committed by Joshua M. Boniface
parent ac114b27a9
commit 6734450d40
9 changed files with 118 additions and 118 deletions

View File

@@ -1949,14 +1949,15 @@ namespace MediaBrowser.Controller.Entities
return;
}
// Remove it from the item
RemoveImage(info);
// Remove from file system
if (info.IsLocalFile)
{
FileSystem.DeleteFile(info.Path);
}
// Remove from item
RemoveImage(info);
await UpdateToRepositoryAsync(ItemUpdateType.ImageUpdate, CancellationToken.None).ConfigureAwait(false);
}