sync updates

This commit is contained in:
Luke Pulverenti
2015-03-30 15:57:37 -04:00
parent 5f044cfd68
commit 07de09f350
9 changed files with 97 additions and 70 deletions

View File

@@ -227,6 +227,11 @@ namespace MediaBrowser.Server.Implementations.Sync
{
Format = "srt",
Method = SubtitleDeliveryMethod.External
},
new SubtitleProfile
{
Format = "vtt",
Method = SubtitleDeliveryMethod.External
}
};

View File

@@ -495,7 +495,7 @@ namespace MediaBrowser.Server.Implementations.Sync
// No sense creating external subs if we're already burning one into the video
var externalSubs = streamInfo.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode ?
new List<SubtitleStreamInfo>() :
streamInfo.GetExternalSubtitles(false);
streamInfo.GetExternalSubtitles(false, null, null);
// Mark as requiring conversion if transcoding the video, or if any subtitles need to be extracted
var requiresVideoTranscoding = streamInfo.PlayMethod == PlayMethod.Transcode && jobOptions.IsConverting;

View File

@@ -677,7 +677,6 @@ namespace MediaBrowser.Server.Implementations.Sync
syncedItem.Item.MediaSources = new List<MediaSourceInfo>();
syncedItem.OriginalFileName = Path.GetFileName(libraryItem.Path);
if (string.IsNullOrWhiteSpace(syncedItem.OriginalFileName))
{
syncedItem.OriginalFileName = Path.GetFileName(mediaSource.Path);
@@ -686,6 +685,7 @@ namespace MediaBrowser.Server.Implementations.Sync
// This will be null for items that are not audio/video
if (mediaSource != null)
{
syncedItem.OriginalFileName = Path.ChangeExtension(syncedItem.OriginalFileName, Path.GetExtension(mediaSource.Path));
syncedItem.Item.MediaSources.Add(mediaSource);
}