Only extract attachments from external .mks file

This commit is contained in:
Nils Fürniß 2022-03-12 13:49:23 +01:00
parent 90463d5e4f
commit eb44f892b8
No known key found for this signature in database
GPG Key ID: 79CB1318699409FF

View File

@ -532,7 +532,7 @@ namespace Jellyfin.Api.Helpers
var attachmentPath = Path.Combine(_appPaths.CachePath, "attachments", state.MediaSource.Id);
await _attachmentExtractor.ExtractAllAttachments(state.MediaPath, state.MediaSource, attachmentPath, cancellationTokenSource.Token).ConfigureAwait(false);
if (state.SubtitleStream.IsExternal)
if (state.SubtitleStream.IsExternal && string.Equals(Path.GetExtension(state.SubtitleStream.Path), ".mks", StringComparison.OrdinalIgnoreCase))
{
string subtitlePath = state.SubtitleStream.Path;
string subtitlePathArgument = string.Format(CultureInfo.InvariantCulture, "file:\"{0}\"", subtitlePath.Replace("\"", "\\\"", StringComparison.Ordinal));