diff options
| author | Bond-009 <bond.009@outlook.com> | 2024-04-24 16:35:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-24 08:35:15 -0600 |
| commit | ac108690a84a2087811e50018a3f8fa52cbc914d (patch) | |
| tree | 1a4166c08ab46180ad9d93aa322bfbd16181aa0f /src | |
| parent | 428283f78751df30b44992c883e14babd6b3ce27 (diff) | |
Use StringSplitOptions.TrimEntries where possible (#11421)
Diffstat (limited to 'src')
| -rw-r--r-- | src/Jellyfin.LiveTv/TunerHosts/M3uParser.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Jellyfin.LiveTv/TunerHosts/M3uParser.cs b/src/Jellyfin.LiveTv/TunerHosts/M3uParser.cs index 5900d1c5b..c8d678e2f 100644 --- a/src/Jellyfin.LiveTv/TunerHosts/M3uParser.cs +++ b/src/Jellyfin.LiveTv/TunerHosts/M3uParser.cs @@ -273,12 +273,12 @@ namespace Jellyfin.LiveTv.TunerHosts var numberIndex = nameInExtInf.IndexOf(' ', StringComparison.Ordinal); if (numberIndex > 0) { - var numberPart = nameInExtInf.Substring(0, numberIndex).Trim(new[] { ' ', '.' }); + var numberPart = nameInExtInf.AsSpan(0, numberIndex).Trim(new[] { ' ', '.' }); if (double.TryParse(numberPart, CultureInfo.InvariantCulture, out _)) { // channel.Number = number.ToString(); - nameInExtInf = nameInExtInf.Substring(numberIndex + 1).Trim(new[] { ' ', '-' }); + nameInExtInf = nameInExtInf.AsSpan(numberIndex + 1).Trim(new[] { ' ', '-' }).ToString(); } } } |
