Cleanup extracted files (#13760)

* Cleanup extracted files

* Pagination and fixes

* Add migration for attachments to MigrateLibraryDb

* Unify attachment handling

* Don't extract again if files were already extracted

* Fix MKS attachment extraction

* Always run full extraction on mks

* Don't try to extract mjpeg streams as attachments

* Fallback to check if attachments were extracted to cache folder

* Fixup
This commit is contained in:
Tim Eisele
2025-04-03 17:17:14 +02:00
committed by GitHub
parent 0bde7bae05
commit 596b635511
17 changed files with 2397 additions and 416 deletions

View File

@@ -492,7 +492,24 @@ namespace Emby.Server.Implementations.Library
if (item is Video video)
{
// Trickplay
list.Add(_pathManager.GetTrickplayDirectory(video));
// Subtitles and attachments
foreach (var mediaSource in item.GetMediaSources(false))
{
var subtitleFolder = _pathManager.GetSubtitleFolderPath(mediaSource.Id);
if (subtitleFolder is not null)
{
list.Add(subtitleFolder);
}
var attachmentFolder = _pathManager.GetAttachmentFolderPath(mediaSource.Id);
if (attachmentFolder is not null)
{
list.Add(attachmentFolder);
}
}
}
return list;