diff --git a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs
index f28944945..2a8c958b2 100644
--- a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs
+++ b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs
@@ -49,6 +49,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
trackInfo.TrackEvents.Add(subEvent);
}
}
+ RemoteNativeFormatting(trackInfo);
return trackInfo;
}
@@ -69,5 +70,50 @@ namespace MediaBrowser.MediaEncoding.Subtitles
};
return result;
}
+
+ ///
+ /// Credit: https://github.com/SubtitleEdit/subtitleedit/blob/master/src/Logic/SubtitleFormats/AdvancedSubStationAlpha.cs
+ ///
+ private void RemoteNativeFormatting(SubtitleTrackInfo subtitle)
+ {
+ foreach (var p in subtitle.TrackEvents)
+ {
+ int indexOfBegin = p.Text.IndexOf('{');
+ string pre = string.Empty;
+ while (indexOfBegin >= 0 && p.Text.IndexOf('}') > indexOfBegin)
+ {
+ string s = p.Text.Substring(indexOfBegin);
+ if (s.StartsWith("{\\an1}", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an2}", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an3}", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an4}", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an5}", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an6}", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an7}", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an8}", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an9}", StringComparison.Ordinal))
+ {
+ pre = s.Substring(0, 6);
+ }
+ else if (s.StartsWith("{\\an1\\", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an2\\", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an3\\", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an4\\", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an5\\", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an6\\", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an7\\", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an8\\", StringComparison.Ordinal) ||
+ s.StartsWith("{\\an9\\", StringComparison.Ordinal))
+ {
+ pre = s.Substring(0, 5) + "}";
+ }
+ int indexOfEnd = p.Text.IndexOf('}');
+ p.Text = p.Text.Remove(indexOfBegin, (indexOfEnd - indexOfBegin) + 1);
+
+ indexOfBegin = p.Text.IndexOf('{');
+ }
+ p.Text = pre + p.Text;
+ }
+ }
}
}
diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs
index c32155a33..ef99e444f 100644
--- a/MediaBrowser.Model/ApiClient/IApiClient.cs
+++ b/MediaBrowser.Model/ApiClient/IApiClient.cs
@@ -1479,6 +1479,12 @@ namespace MediaBrowser.Model.ApiClient
/// Task<SyncOptions>.
Task GetSyncOptions(SyncJobRequest jobInfo);
///
+ /// Gets the synchronize options.
+ ///
+ /// The job information.
+ /// Task<SyncDialogOptions>.
+ Task GetSyncOptions(SyncJob jobInfo);
+ ///
/// Gets the movie recommendations.
///
/// The query.
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
index b8eade109..5941a2a15 100644
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ b/Nuget/MediaBrowser.Common.Internal.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common.Internal
- 3.0.590
+ 3.0.591
MediaBrowser.Common.Internal
Luke
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.
Copyright © Media Browser 2013
-
+
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index 2185c2c04..dd0e8602d 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common
- 3.0.590
+ 3.0.591
MediaBrowser.Common
Media Browser Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspec
index 9b9996baf..2e09e01fd 100644
--- a/Nuget/MediaBrowser.Model.Signed.nuspec
+++ b/Nuget/MediaBrowser.Model.Signed.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Model.Signed
- 3.0.590
+ 3.0.591
MediaBrowser.Model - Signed Edition
Media Browser Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index ad2e38ab2..ce2248e09 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Server.Core
- 3.0.590
+ 3.0.591
Media Browser.Server.Core
Media Browser Team
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains core components required to build plugins for Media Browser Server.
Copyright © Media Browser 2013
-
+