aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/StreamingHelpers.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2023-02-20 11:09:54 +0100
committerGitHub <noreply@github.com>2023-02-20 11:09:54 +0100
commit720852f7087e32053407cd849470d3f13f57159c (patch)
treea3c8d8aff92aeb5f107b724513a3ed775d71b3be /Jellyfin.Api/Helpers/StreamingHelpers.cs
parent69379d80a1f3352972a80b06815038ee853622eb (diff)
parentb119c6d868c24212300285c501f43af91b31d404 (diff)
Merge pull request #9356 from Bond-009/tryparse
Diffstat (limited to 'Jellyfin.Api/Helpers/StreamingHelpers.cs')
-rw-r--r--Jellyfin.Api/Helpers/StreamingHelpers.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs
index d867df86e..9b5a14c4d 100644
--- a/Jellyfin.Api/Helpers/StreamingHelpers.cs
+++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs
@@ -337,10 +337,10 @@ public static class StreamingHelpers
value = index == -1
? value.Slice(npt.Length)
: value.Slice(npt.Length, index - npt.Length);
- if (value.IndexOf(':') == -1)
+ if (!value.Contains(':'))
{
// Parses npt times in the format of '417.33'
- if (double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var seconds))
+ if (double.TryParse(value, CultureInfo.InvariantCulture, out var seconds))
{
return TimeSpan.FromSeconds(seconds).Ticks;
}