Ejemplo n.º 1
0
        /// <summary>
        /// Gets the subtitle cache path.
        /// </summary>
        /// <param name="input">The input.</param>
        /// <param name="subtitleStreamIndex">Index of the subtitle stream.</param>
        /// <param name="offset">The offset.</param>
        /// <param name="outputExtension">The output extension.</param>
        /// <returns>System.String.</returns>
        public string GetSubtitleCachePath(Video input, int subtitleStreamIndex, TimeSpan?offset, string outputExtension)
        {
            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));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the subtitle cache path.
 /// </summary>
 /// <param name="input">The input.</param>
 /// <param name="subtitleStreamIndex">Index of the subtitle stream.</param>
 /// <param name="outputExtension">The output extension.</param>
 /// <returns>System.String.</returns>
 public string GetSubtitleCachePath(Video input, int subtitleStreamIndex, string outputExtension)
 {
     return(SubtitleCache.GetResourcePath(input.Id + "_" + subtitleStreamIndex + "_" + input.DateModified.Ticks, outputExtension));
 }