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