Browse Source

factor srt date modified into subtitle cache path

Luke Pulverenti 12 years ago
parent
commit
f57cec4cff
1 changed files with 7 additions and 0 deletions
  1. 7 0
      MediaBrowser.Controller/MediaInfo/FFMpegManager.cs

+ 7 - 0
MediaBrowser.Controller/MediaInfo/FFMpegManager.cs

@@ -230,6 +230,13 @@ namespace MediaBrowser.Controller.MediaInfo
         {
             var ticksParam = offset.HasValue ? "_" + offset.Value.Ticks : "";
 
+            var stream = input.MediaStreams[subtitleStreamIndex];
+
+            if (stream.IsExternal)
+            {
+                ticksParam += File.GetLastWriteTimeUtc(stream.Path).Ticks;
+            }
+
             return SubtitleCache.GetResourcePath(input.Id + "_" + subtitleStreamIndex + "_" + input.DateModified.Ticks + ticksParam, outputExtension);
         }
     }