fix encoding escape quotes

This commit is contained in:
Luke Pulverenti
2015-06-07 23:16:42 -04:00
parent fa62f163c6
commit a31cc81487
4 changed files with 8 additions and 8 deletions

View File

@@ -690,7 +690,7 @@ namespace MediaBrowser.Api.Playback
// TODO: Perhaps also use original_size=1920x800 ??
return string.Format("subtitles=filename='{0}'{1},setpts=PTS -{2}/TB",
subtitlePath.Replace("'", "\\'").Replace('\\', '/').Replace(":/", "\\:/"),
subtitlePath.Replace('\\', '/').Replace("'", "\\'").Replace(":/", "\\:/"),
charsetParam,
seconds.ToString(UsCulture));
}
@@ -698,7 +698,7 @@ namespace MediaBrowser.Api.Playback
var mediaPath = state.MediaPath ?? string.Empty;
return string.Format("subtitles='{0}:si={1}',setpts=PTS -{2}/TB",
mediaPath.Replace("'", "\\'").Replace('\\', '/').Replace(":/", "\\:/"),
mediaPath.Replace('\\', '/').Replace("'", "\\'").Replace(":/", "\\:/"),
state.InternalSubtitleStreamOffset.ToString(UsCulture),
seconds.ToString(UsCulture));
}