From 9aaeb19418616283de00cdb0d00699ab93d84415 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 27 Mar 2019 16:31:26 +0100 Subject: [PATCH] Self-documenting code --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index cde6f725aa..efbb17fd2a 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)