mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-03 12:52:56 +01:00
Merge remote-tracking branch 'upstream/master' into http-exception
This commit is contained in:
@@ -391,7 +391,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
||||
item.Genres = Array.Empty<string>();
|
||||
|
||||
foreach (var genre in result.Genre
|
||||
.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(i => i.Trim())
|
||||
.Where(i => !string.IsNullOrWhiteSpace(i)))
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
||||
_logger.LogError(e, "Failed to retrieve series with remote id {RemoteId}", id);
|
||||
}
|
||||
|
||||
return result?.Data.First().Id.ToString();
|
||||
return result?.Data[0].Id.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user