commit
fb91e4fc23
|
@ -164,7 +164,7 @@ namespace Emby.Dlna.Profiles
|
|||
|
||||
public void AddXmlRootAttribute(string name, string value)
|
||||
{
|
||||
var atts = XmlRootAttributes ?? new XmlAttribute[] { };
|
||||
var atts = XmlRootAttributes ?? System.Array.Empty<XmlAttribute>();
|
||||
var list = atts.ToList();
|
||||
|
||||
list.Add(new XmlAttribute
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Emby.Dlna.Profiles
|
|||
},
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = System.Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace Emby.Dlna.Profiles
|
|||
}
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = System.Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace Emby.Dlna.Profiles
|
|||
}
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = System.Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Emby.Dlna.Profiles
|
|||
},
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = System.Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
||||
namespace Emby.Dlna.Profiles
|
||||
|
@ -37,7 +38,7 @@ namespace Emby.Dlna.Profiles
|
|||
}
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
||||
namespace Emby.Dlna.Profiles
|
||||
|
@ -223,7 +224,7 @@ namespace Emby.Dlna.Profiles
|
|||
}
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
||||
namespace Emby.Dlna.Profiles
|
||||
|
@ -223,7 +224,7 @@ namespace Emby.Dlna.Profiles
|
|||
}
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
||||
namespace Emby.Dlna.Profiles
|
||||
|
@ -211,7 +212,7 @@ namespace Emby.Dlna.Profiles
|
|||
}
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
||||
namespace Emby.Dlna.Profiles
|
||||
|
@ -211,7 +212,7 @@ namespace Emby.Dlna.Profiles
|
|||
}
|
||||
};
|
||||
|
||||
ResponseProfiles = new ResponseProfile[] { };
|
||||
ResponseProfiles = Array.Empty<ResponseProfile>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ namespace MediaBrowser.Api
|
|||
IncludeItemTypes = request.GetIncludeItemTypes(),
|
||||
DtoOptions = new Controller.Dto.DtoOptions
|
||||
{
|
||||
Fields = new ItemFields[] { },
|
||||
Fields = Array.Empty<ItemFields>(),
|
||||
EnableImages = false,
|
||||
EnableUserData = false
|
||||
},
|
||||
|
|
|
@ -613,7 +613,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
if (!IsFileProtocol)
|
||||
{
|
||||
return new string[] { };
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
|
||||
return new[] { Path };
|
||||
|
|
|
@ -198,7 +198,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||
|
||||
public Guid[] GetLibraryFolderIds()
|
||||
{
|
||||
var expandedFolders = new List<Guid>() { };
|
||||
var expandedFolders = new List<Guid>();
|
||||
|
||||
return FlattenItems(this, expandedFolders)
|
||||
.SelectMany(i => LibraryManager.GetCollectionFolders(i))
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace MediaBrowser.Controller.Library
|
|||
};
|
||||
}
|
||||
|
||||
return new DayOfWeek[] { };
|
||||
return Array.Empty<DayOfWeek>();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace MediaBrowser.MediaEncoding.BdInfo
|
|||
|
||||
var outputStream = new BlurayDiscInfo
|
||||
{
|
||||
MediaStreams = new MediaStream[] { }
|
||||
MediaStreams = Array.Empty<MediaStream>()
|
||||
};
|
||||
|
||||
if (playlist == null)
|
||||
|
|
|
@ -1008,7 +1008,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
|||
var artist = FFProbeHelpers.GetDictionaryValue(tags, "artist");
|
||||
if (string.IsNullOrWhiteSpace(artist))
|
||||
{
|
||||
audio.Artists = new string[] { };
|
||||
audio.Artists = Array.Empty<string>();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1031,7 +1031,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
|||
|
||||
if (string.IsNullOrWhiteSpace(albumArtist))
|
||||
{
|
||||
audio.AlbumArtists = new string[] { };
|
||||
audio.AlbumArtists = Array.Empty<string>();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -206,7 +206,7 @@ namespace MediaBrowser.Model.Dlna
|
|||
}
|
||||
}
|
||||
|
||||
return new MediaFormatProfile[] { };
|
||||
return Array.Empty<MediaFormatProfile>();
|
||||
}
|
||||
|
||||
private MediaFormatProfile ValueOf(string value)
|
||||
|
|
|
@ -813,18 +813,18 @@ namespace MediaBrowser.Model.Dlna
|
|||
{
|
||||
var stream = TargetAudioStream;
|
||||
|
||||
string inputCodec = stream == null ? null : stream.Codec;
|
||||
string inputCodec = stream?.Codec;
|
||||
|
||||
if (IsDirectStream)
|
||||
{
|
||||
return string.IsNullOrEmpty(inputCodec) ? new string[] { } : new[] { inputCodec };
|
||||
return string.IsNullOrEmpty(inputCodec) ? Array.Empty<string>() : new[] { inputCodec };
|
||||
}
|
||||
|
||||
foreach (string codec in AudioCodecs)
|
||||
{
|
||||
if (string.Equals(codec, inputCodec, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return string.IsNullOrEmpty(codec) ? new string[] { } : new[] { codec };
|
||||
return string.IsNullOrEmpty(codec) ? Array.Empty<string>() : new[] { codec };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -838,18 +838,18 @@ namespace MediaBrowser.Model.Dlna
|
|||
{
|
||||
var stream = TargetVideoStream;
|
||||
|
||||
string inputCodec = stream == null ? null : stream.Codec;
|
||||
string inputCodec = stream?.Codec;
|
||||
|
||||
if (IsDirectStream)
|
||||
{
|
||||
return string.IsNullOrEmpty(inputCodec) ? new string[] { } : new[] { inputCodec };
|
||||
return string.IsNullOrEmpty(inputCodec) ? Array.Empty<string>() : new[] { inputCodec };
|
||||
}
|
||||
|
||||
foreach (string codec in VideoCodecs)
|
||||
{
|
||||
if (string.Equals(codec, inputCodec, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return string.IsNullOrEmpty(codec) ? new string[] { } : new[] { codec };
|
||||
return string.IsNullOrEmpty(codec) ? Array.Empty<string>() : new[] { codec };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Querying
|
||||
|
@ -54,7 +55,7 @@ namespace MediaBrowser.Model.Querying
|
|||
|
||||
public UpcomingEpisodesQuery()
|
||||
{
|
||||
EnableImageTypes = new ImageType[] { };
|
||||
EnableImageTypes = Array.Empty<ImageType>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -723,7 +723,7 @@ namespace MediaBrowser.Providers.Manager
|
|||
userDataList.AddRange(localItem.UserDataList);
|
||||
}
|
||||
|
||||
MergeData(localItem, temp, new MetadataField[] { }, !options.ReplaceAllMetadata, true);
|
||||
MergeData(localItem, temp, Array.Empty<MetadataField>(), !options.ReplaceAllMetadata, true);
|
||||
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport;
|
||||
|
||||
// Only one local provider allowed per item
|
||||
|
@ -849,7 +849,7 @@ namespace MediaBrowser.Providers.Manager
|
|||
{
|
||||
result.Provider = provider.Name;
|
||||
|
||||
MergeData(result, temp, new MetadataField[] { }, false, false);
|
||||
MergeData(result, temp, Array.Empty<MetadataField>(), false, false);
|
||||
MergeNewData(temp.Item, id);
|
||||
|
||||
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataDownload;
|
||||
|
|
Loading…
Reference in New Issue
Block a user