mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
Missed some stuff
This commit is contained in:
parent
c4bb32f259
commit
ff49a3bb61
@ -31,7 +31,7 @@ namespace DvdLib.Ifo
|
||||
continue;
|
||||
}
|
||||
|
||||
var nums = ifo.Name.Split(new[] { '_' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var nums = ifo.Name.Split('_', StringSplitOptions.RemoveEmptyEntries);
|
||||
if (nums.Length >= 2 && ushort.TryParse(nums[1], out var ifoNumber))
|
||||
{
|
||||
ReadVTS(ifoNumber, ifo.FullName);
|
||||
|
@ -2705,7 +2705,7 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
var videos = videoListResolver.Resolve(fileSystemChildren);
|
||||
|
||||
var currentVideo = videos.FirstOrDefault(i => string.Equals(owner.Path, i.Files.First().Path, StringComparison.OrdinalIgnoreCase));
|
||||
var currentVideo = videos.FirstOrDefault(i => string.Equals(owner.Path, i.Files[0].Path, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (currentVideo != null)
|
||||
{
|
||||
|
@ -201,7 +201,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
||||
continue;
|
||||
}
|
||||
|
||||
var firstMedia = resolvedItem.Files.First();
|
||||
var firstMedia = resolvedItem.Files[0];
|
||||
|
||||
var libraryItem = new T
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
try
|
||||
{
|
||||
previouslyFailedImages = File.ReadAllText(failHistoryPath)
|
||||
.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Split('|', StringSplitOptions.RemoveEmptyEntries)
|
||||
.ToList();
|
||||
}
|
||||
catch (IOException)
|
||||
|
@ -78,8 +78,8 @@ namespace Jellyfin.Api.Controllers
|
||||
var query = new InternalItemsQuery
|
||||
{
|
||||
User = user,
|
||||
MediaTypes = (mediaTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries),
|
||||
IncludeItemTypes = (includeItemTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries),
|
||||
MediaTypes = (mediaTypes ?? string.Empty).Split(',', StringSplitOptions.RemoveEmptyEntries),
|
||||
IncludeItemTypes = (includeItemTypes ?? string.Empty).Split(',', StringSplitOptions.RemoveEmptyEntries),
|
||||
Recursive = true,
|
||||
EnableTotalRecordCount = false,
|
||||
DtoOptions = new DtoOptions
|
||||
@ -168,7 +168,7 @@ namespace Jellyfin.Api.Controllers
|
||||
var genreQuery = new InternalItemsQuery(user)
|
||||
{
|
||||
IncludeItemTypes =
|
||||
(includeItemTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries),
|
||||
(includeItemTypes ?? string.Empty).Split(',', StringSplitOptions.RemoveEmptyEntries),
|
||||
DtoOptions = new DtoOptions
|
||||
{
|
||||
Fields = Array.Empty<ItemFields>(),
|
||||
|
@ -149,7 +149,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
var iTunEXTC = FFProbeHelpers.GetDictionaryValue(tags, "iTunEXTC");
|
||||
if (!string.IsNullOrWhiteSpace(iTunEXTC))
|
||||
{
|
||||
var parts = iTunEXTC.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var parts = iTunEXTC.Split('|', StringSplitOptions.RemoveEmptyEntries);
|
||||
// Example
|
||||
// mpaa|G|100|For crude humor
|
||||
if (parts.Length > 1)
|
||||
@ -1139,7 +1139,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
return null;
|
||||
}
|
||||
|
||||
return value.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
return value.Split('/', StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(i => i.Trim())
|
||||
.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
|
||||
return value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
return value.Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
|
||||
public bool ContainsContainer(string container)
|
||||
|
@ -186,7 +186,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (mediaProfile != null && !string.IsNullOrEmpty(mediaProfile.OrgPn))
|
||||
{
|
||||
orgPnValues.AddRange(mediaProfile.OrgPn.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
|
||||
orgPnValues.AddRange(mediaProfile.OrgPn.Split(',', StringSplitOptions.RemoveEmptyEntries));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1647,7 +1647,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
// strip spaces to avoid having to encode
|
||||
var values = value
|
||||
.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
.Split('|', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (condition.Condition == ProfileConditionType.Equals || condition.Condition == ProfileConditionType.EqualsAny)
|
||||
{
|
||||
|
@ -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>
|
||||
|
@ -119,7 +119,7 @@ namespace Rssdp.Infrastructure
|
||||
}
|
||||
else
|
||||
{
|
||||
headersToAddTo.TryAddWithoutValidation(headerName, values.First());
|
||||
headersToAddTo.TryAddWithoutValidation(headerName, values[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ namespace Rssdp.Infrastructure
|
||||
return lineIndex;
|
||||
}
|
||||
|
||||
private IList<string> ParseValues(string headerValue)
|
||||
private List<string> ParseValues(string headerValue)
|
||||
{
|
||||
// This really should be better and match the HTTP 1.1 spec,
|
||||
// but this should actually be good enough for SSDP implementations
|
||||
@ -160,7 +160,7 @@ namespace Rssdp.Infrastructure
|
||||
|
||||
if (headerValue == "\"\"")
|
||||
{
|
||||
values.Add(String.Empty);
|
||||
values.Add(string.Empty);
|
||||
return values;
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ namespace Rssdp.Infrastructure
|
||||
else
|
||||
{
|
||||
var segments = headerValue.Split(SeparatorCharacters);
|
||||
if (headerValue.Contains("\""))
|
||||
if (headerValue.Contains('"'))
|
||||
{
|
||||
for (int segmentIndex = 0; segmentIndex < segments.Length; segmentIndex++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user