mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-08-07 09:01:36 -04:00
Self-documenting code
This commit is contained in:
parent
b647959ec4
commit
9aaeb19418
@ -622,18 +622,19 @@ namespace MediaBrowser.Api.Playback
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!value.StartsWith("npt=", StringComparison.OrdinalIgnoreCase))
|
const string Npt = "npt=";
|
||||||
|
if (!value.StartsWith(Npt, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Invalid timeseek header");
|
throw new ArgumentException("Invalid timeseek header");
|
||||||
}
|
}
|
||||||
int index = value.IndexOf('-');
|
int index = value.IndexOf('-');
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
{
|
{
|
||||||
value = value.Substring(4);
|
value = value.Substring(Npt.Length);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
value = value.Substring(4, index);
|
value = value.Substring(Npt.Length, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.IndexOf(':') == -1)
|
if (value.IndexOf(':') == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user