The Free Software Media System - Server Backend & API
Backport pull request #15112 from jellyfin/release-10.11.z
Shadowghost14e819458150
diff --git a/Jellyfin.Server/Migrations/Routines/MoveExtractedFiles.cs b/Jellyfin.Server/Migrations/Routines/MoveExtractedFiles.csindex 8b394dd7aa..fbf9c16377 100644--- a/Jellyfin.Server/Migrations/Routines/MoveExtractedFiles.cs+++ b/Jellyfin.Server/Migrations/Routines/MoveExtractedFiles.cs@@ -224,6 +224,18 @@ public class MoveExtractedFiles : IAsyncMigrationRoutinereturn null;}+ catch (UnauthorizedAccessException e)+ {+ _logger.LogDebug("Skipping subtitle at index {Index} for {Path}: {Exception}", attachmentStreamIndex, mediaPath, e.Message);++ return null;+ }+ catch (ArgumentOutOfRangeException e)+ {+ _logger.LogDebug("Skipping attachment at index {Index} for {Path}: {Exception}", attachmentStreamIndex, mediaPath, e.Message);++ return null;+ }filename = (mediaPath + attachmentStreamIndex.ToString(CultureInfo.InvariantCulture) + "_" + date.Value.Ticks.ToString(CultureInfo.InvariantCulture)).GetMD5().ToString("D", CultureInfo.InvariantCulture);}@@ -263,6 +275,18 @@ public class MoveExtractedFiles : IAsyncMigrationRoutine{date = File.GetLastWriteTimeUtc(path);}+ catch (ArgumentOutOfRangeException e)+ {+ _logger.LogDebug("Skipping subtitle at index {Index} for {Path}: {Exception}", streamIndex, path, e.Message);++ return null;+ }+ catch (UnauthorizedAccessException e)+ {+ _logger.LogDebug("Skipping subtitle at index {Index} for {Path}: {Exception}", streamIndex, path, e.Message);++ return null;+ }catch (IOException e){_logger.LogDebug("Skipping subtitle at index {Index} for {Path}: {Exception}", streamIndex, path, e.Message);