aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index cde6f725a..efbb17fd2 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -622,18 +622,19 @@ namespace MediaBrowser.Api.Playback
return null;
}
- if (!value.StartsWith("npt=", StringComparison.OrdinalIgnoreCase))
+ const string Npt = "npt=";
+ if (!value.StartsWith(Npt, StringComparison.OrdinalIgnoreCase))
{
throw new ArgumentException("Invalid timeseek header");
}
int index = value.IndexOf('-');
if (index == -1)
{
- value = value.Substring(4);
+ value = value.Substring(Npt.Length);
}
else
{
- value = value.Substring(4, index);
+ value = value.Substring(Npt.Length, index);
}
if (value.IndexOf(':') == -1)