diff options
| author | Bond_009 <Bond.009@outlook.com> | 2019-03-27 16:31:26 +0100 |
|---|---|---|
| committer | Bond_009 <Bond.009@outlook.com> | 2019-03-27 17:05:08 +0100 |
| commit | 9aaeb19418616283de00cdb0d00699ab93d84415 (patch) | |
| tree | 0ad0c7905dc28247a963ff834798ffab535e6e66 | |
| parent | b647959ec41373c513ee55075e4c973bfb68dbcd (diff) | |
Self-documenting code
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 7 |
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) |
