diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-11-14 15:47:34 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-11-14 20:27:48 +0100 |
| commit | bc7359f87dafb972dfe79667128f307643015bac (patch) | |
| tree | 8d5b4c968e9b793496bf454316beea4cbd45d96f /MediaBrowser.Providers/Subtitles | |
| parent | 569874a212e550d034d7c4ded5d95b6b770bf07a (diff) | |
Use string.Split(char) where possible instead of string.Split(char[])
Diffstat (limited to 'MediaBrowser.Providers/Subtitles')
| -rw-r--r-- | MediaBrowser.Providers/Subtitles/SubtitleManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs index f3fbe2d12..6ec7c163f 100644 --- a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs +++ b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs @@ -147,7 +147,7 @@ namespace MediaBrowser.Providers.Subtitles string subtitleId, CancellationToken cancellationToken) { - var parts = subtitleId.Split(new[] { '_' }, 2); + var parts = subtitleId.Split('_', 2); var provider = GetProvider(parts[0]); try @@ -329,7 +329,7 @@ namespace MediaBrowser.Providers.Subtitles Index = index, ItemId = item.Id, Type = MediaStreamType.Subtitle - }).First(); + })[0]; var path = stream.Path; _monitor.ReportFileSystemChangeBeginning(path); @@ -349,10 +349,10 @@ namespace MediaBrowser.Providers.Subtitles /// <inheritdoc /> public Task<SubtitleResponse> GetRemoteSubtitles(string id, CancellationToken cancellationToken) { - var parts = id.Split(new[] { '_' }, 2); + var parts = id.Split('_', 2); var provider = GetProvider(parts[0]); - id = parts.Last(); + id = parts[1]; return provider.GetSubtitles(id, cancellationToken); } |
