mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 14:08:44 -04:00
Post GPL cleanup
This commit is contained in:
parent
c6618d0a5f
commit
340a2c6512
99 changed files with 327 additions and 1053 deletions
|
@ -2,7 +2,6 @@
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Connect;
|
|
||||||
using MediaBrowser.Controller.Drawing;
|
using MediaBrowser.Controller.Drawing;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
|
|
@ -55,12 +55,11 @@ namespace MediaBrowser.Api
|
||||||
return Request.Headers[name];
|
return Request.Headers[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly string[] EmptyStringArray = Array.Empty<string>();
|
|
||||||
public static string[] SplitValue(string value, char delim)
|
public static string[] SplitValue(string value, char delim)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(value))
|
if (string.IsNullOrWhiteSpace(value))
|
||||||
{
|
{
|
||||||
return EmptyStringArray;
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return value.Split(new[] { delim }, StringSplitOptions.RemoveEmptyEntries);
|
return value.Split(new[] { delim }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Controller.Authentication;
|
||||||
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Devices;
|
using MediaBrowser.Controller.Devices;
|
||||||
|
@ -10,11 +11,9 @@ using MediaBrowser.Model.Connect;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Model.Services;
|
using MediaBrowser.Model.Services;
|
||||||
using MediaBrowser.Controller.Authentication;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Api
|
namespace MediaBrowser.Api
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Threading.Tasks;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Chapters
|
namespace MediaBrowser.Controller.Chapters
|
||||||
|
@ -9,12 +8,6 @@ namespace MediaBrowser.Controller.Chapters
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IChapterManager
|
public interface IChapterManager
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets the chapters.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="itemId">The item identifier.</param>
|
|
||||||
/// <returns>List{ChapterInfo}.</returns>
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves the chapters.
|
/// Saves the chapters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -20,8 +20,8 @@ namespace MediaBrowser.Controller.Collections
|
||||||
public CollectionCreationOptions()
|
public CollectionCreationOptions()
|
||||||
{
|
{
|
||||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
ItemIdList = new string[] {};
|
ItemIdList = Array.Empty<string>();
|
||||||
UserIds = new Guid[] {};
|
UserIds = Array.Empty<Guid>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
|
||||||
using MediaBrowser.Model.Connect;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Connect
|
|
||||||
{
|
|
||||||
public interface IConnectManager
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the wan API address.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The wan API address.</value>
|
|
||||||
string WanApiAddress { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Links the user.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userId">The user identifier.</param>
|
|
||||||
/// <param name="connectUsername">The connect username.</param>
|
|
||||||
/// <returns>Task.</returns>
|
|
||||||
Task<UserLinkResult> LinkUser(string userId, string connectUsername);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Removes the link.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userId">The user identifier.</param>
|
|
||||||
/// <returns>Task.</returns>
|
|
||||||
Task RemoveConnect(string userId);
|
|
||||||
|
|
||||||
User GetUserFromExchangeToken(string token);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Authenticates the specified username.
|
|
||||||
/// </summary>
|
|
||||||
Task<ConnectAuthenticationResult> Authenticate(string username, string password, string passwordMd5);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Determines whether [is authorization token valid] [the specified token].
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="token">The token.</param>
|
|
||||||
/// <returns><c>true</c> if [is authorization token valid] [the specified token]; otherwise, <c>false</c>.</returns>
|
|
||||||
bool IsAuthorizationTokenValid(string token);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,7 +2,6 @@
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MediaBrowser.Controller.Sync;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Dto
|
namespace MediaBrowser.Controller.Dto
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public AggregateFolder()
|
public AggregateFolder()
|
||||||
{
|
{
|
||||||
PhysicalLocationsList = new string[] { };
|
PhysicalLocationsList = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -2,13 +2,8 @@
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using MediaBrowser.Common.Extensions;
|
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
|
|
||||||
|
@ -36,8 +31,8 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
|
|
||||||
public Audio()
|
public Audio()
|
||||||
{
|
{
|
||||||
Artists = new string[] {};
|
Artists = Array.Empty<string>();
|
||||||
AlbumArtists = new string[] {};
|
AlbumArtists = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
|
|
|
@ -23,8 +23,8 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
|
|
||||||
public MusicAlbum()
|
public MusicAlbum()
|
||||||
{
|
{
|
||||||
Artists = new string[] {};
|
Artists = Array.Empty<string>();
|
||||||
AlbumArtists = new string[] {};
|
AlbumArtists = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -129,13 +129,12 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
return base.IsSaveLocalMetadataEnabled();
|
return base.IsSaveLocalMetadataEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly Task _cachedTask = Task.FromResult(true);
|
|
||||||
protected override Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
|
protected override Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
if (IsAccessedByName)
|
if (IsAccessedByName)
|
||||||
{
|
{
|
||||||
// Should never get in here anyway
|
// Should never get in here anyway
|
||||||
return _cachedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.ValidateChildrenInternal(progress, cancellationToken, recursive, refreshChildMetadata, refreshOptions, directoryService);
|
return base.ValidateChildrenInternal(progress, cancellationToken, recursive, refreshChildMetadata, refreshOptions, directoryService);
|
||||||
|
|
|
@ -35,24 +35,24 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class BaseItem : IHasProviderIds, IHasLookupInfo<ItemLookupInfo>
|
public abstract class BaseItem : IHasProviderIds, IHasLookupInfo<ItemLookupInfo>
|
||||||
{
|
{
|
||||||
protected static MetadataFields[] EmptyMetadataFieldsArray = new MetadataFields[] { };
|
protected static MetadataFields[] EmptyMetadataFieldsArray = Array.Empty<MetadataFields>();
|
||||||
protected static MediaUrl[] EmptyMediaUrlArray = new MediaUrl[] { };
|
protected static MediaUrl[] EmptyMediaUrlArray = Array.Empty<MediaUrl>();
|
||||||
protected static ItemImageInfo[] EmptyItemImageInfoArray = new ItemImageInfo[] { };
|
protected static ItemImageInfo[] EmptyItemImageInfoArray = Array.Empty<ItemImageInfo>();
|
||||||
public static readonly LinkedChild[] EmptyLinkedChildArray = new LinkedChild[] { };
|
public static readonly LinkedChild[] EmptyLinkedChildArray = Array.Empty<LinkedChild>();
|
||||||
|
|
||||||
protected BaseItem()
|
protected BaseItem()
|
||||||
{
|
{
|
||||||
ThemeSongIds = new Guid[] {};
|
ThemeSongIds = Array.Empty<Guid>();
|
||||||
ThemeVideoIds = new Guid[] {};
|
ThemeVideoIds = Array.Empty<Guid>();
|
||||||
Tags = new string[] {};
|
Tags = Array.Empty<string>();
|
||||||
Genres = new string[] {};
|
Genres = Array.Empty<string>();
|
||||||
Studios = new string[] {};
|
Studios = Array.Empty<string>();
|
||||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
LockedFields = EmptyMetadataFieldsArray;
|
LockedFields = EmptyMetadataFieldsArray;
|
||||||
ImageInfos = EmptyItemImageInfoArray;
|
ImageInfos = EmptyItemImageInfoArray;
|
||||||
ProductionLocations = new string[] {};
|
ProductionLocations = Array.Empty<string>();
|
||||||
RemoteTrailers = new MediaUrl[] { };
|
RemoteTrailers = Array.Empty<MediaUrl>();
|
||||||
ExtraIds = new Guid[] {};
|
ExtraIds = Array.Empty<Guid>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly char[] SlugReplaceChars = { '?', '/', '&' };
|
public static readonly char[] SlugReplaceChars = { '?', '/', '&' };
|
||||||
|
@ -62,7 +62,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// The supported image extensions
|
/// The supported image extensions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly string[] SupportedImageExtensions = { ".png", ".jpg", ".jpeg", ".tbn", ".gif" };
|
public static readonly string[] SupportedImageExtensions = { ".png", ".jpg", ".jpeg", ".tbn", ".gif" };
|
||||||
public static readonly List<string> SupportedImageExtensionsList = SupportedImageExtensions.ToList();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The trailer folder name
|
/// The trailer folder name
|
||||||
|
@ -2895,6 +2894,10 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return ThemeVideoIds.Select(LibraryManager.GetItemById).Where(i => i.ExtraType.Equals(Model.Entities.ExtraType.ThemeVideo)).OrderBy(i => i.SortName);
|
return ThemeVideoIds.Select(LibraryManager.GetItemById).Where(i => i.ExtraType.Equals(Model.Entities.ExtraType.ThemeVideo)).OrderBy(i => i.SortName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the remote trailers.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The remote trailers.</value>
|
||||||
public MediaUrl[] RemoteTrailers { get; set; }
|
public MediaUrl[] RemoteTrailers { get; set; }
|
||||||
|
|
||||||
public IEnumerable<BaseItem> GetExtras()
|
public IEnumerable<BaseItem> GetExtras()
|
||||||
|
@ -2913,21 +2916,24 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool IsHD {
|
public virtual bool IsHD {
|
||||||
get{
|
get
|
||||||
|
{
|
||||||
return Height >= 720;
|
return Height >= 720;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool IsShortcut{ get; set;}
|
public bool IsShortcut{ get; set;}
|
||||||
public string ShortcutPath{ get; set;}
|
public string ShortcutPath{ get; set;}
|
||||||
public int Width { get; set; }
|
public int Width { get; set; }
|
||||||
public int Height { get; set; }
|
public int Height { get; set; }
|
||||||
public Guid[] ExtraIds { get; set; }
|
public Guid[] ExtraIds { get; set; }
|
||||||
public virtual long GetRunTimeTicksForPlayState() {
|
public virtual long GetRunTimeTicksForPlayState()
|
||||||
|
{
|
||||||
return RunTimeTicks ?? 0;
|
return RunTimeTicks ?? 0;
|
||||||
}
|
}
|
||||||
// what does this do?
|
// what does this do?
|
||||||
public static ExtraType[] DisplayExtraTypes = new[] {Model.Entities.ExtraType.ThemeSong, Model.Entities.ExtraType.ThemeVideo };
|
public static ExtraType[] DisplayExtraTypes = new[] {Model.Entities.ExtraType.ThemeSong, Model.Entities.ExtraType.ThemeVideo };
|
||||||
public virtual bool SupportsExternalTransfer {
|
public virtual bool SupportsExternalTransfer
|
||||||
|
{
|
||||||
get {
|
get {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,18 +31,10 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public CollectionFolder()
|
public CollectionFolder()
|
||||||
{
|
{
|
||||||
PhysicalLocationsList = new string[] { };
|
PhysicalLocationsList = Array.Empty<string>();
|
||||||
PhysicalFolderIds = new Guid[] { };
|
PhysicalFolderIds = Array.Empty<Guid>();
|
||||||
}
|
}
|
||||||
|
|
||||||
//public override double? GetDefaultPrimaryImageAspectRatio()
|
|
||||||
//{
|
|
||||||
// double value = 16;
|
|
||||||
// value /= 9;
|
|
||||||
|
|
||||||
// return value;
|
|
||||||
//}
|
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override bool SupportsPlayedStatus
|
public override bool SupportsPlayedStatus
|
||||||
{
|
{
|
||||||
|
@ -339,7 +331,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
protected override Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
|
protected override Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
return Task.FromResult(true);
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -12,10 +12,10 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public Game()
|
public Game()
|
||||||
{
|
{
|
||||||
MultiPartGameFiles = new string[] {};
|
MultiPartGameFiles = Array.Empty<string>();
|
||||||
RemoteTrailers = EmptyMediaUrlArray;
|
RemoteTrailers = EmptyMediaUrlArray;
|
||||||
LocalTrailerIds = new Guid[] {};
|
LocalTrailerIds = Array.Empty<Guid>();
|
||||||
RemoteTrailerIds = new Guid[] {};
|
RemoteTrailerIds = Array.Empty<Guid>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Guid[] LocalTrailerIds { get; set; }
|
public Guid[] LocalTrailerIds { get; set; }
|
||||||
|
@ -38,12 +38,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
get { return false; }
|
get { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the remote trailers.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The remote trailers.</value>
|
|
||||||
public MediaUrl[] RemoteTrailers { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of the media.
|
/// Gets the type of the media.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
using MediaBrowser.Model.Querying;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
|
@ -48,7 +47,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public string PresentationUniqueKey { get; set; }
|
public string PresentationUniqueKey { get; set; }
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public string PathNotStartsWith { get; set; }
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public string Person { get; set; }
|
public string Person { get; set; }
|
||||||
|
@ -160,8 +158,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
public bool EnableGroupByMetadataKey { get; set; }
|
public bool EnableGroupByMetadataKey { get; set; }
|
||||||
public bool? HasChapterImages { get; set; }
|
public bool? HasChapterImages { get; set; }
|
||||||
|
|
||||||
// why tuple vs value tuple?
|
|
||||||
//public Tuple<string, SortOrder>[] OrderBy { get; set; }
|
|
||||||
public ValueTuple<string, SortOrder>[] OrderBy { get; set; }
|
public ValueTuple<string, SortOrder>[] OrderBy { get; set; }
|
||||||
|
|
||||||
public DateTime? MinDateCreated { get; set; }
|
public DateTime? MinDateCreated { get; set; }
|
||||||
|
@ -180,44 +176,44 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public InternalItemsQuery()
|
public InternalItemsQuery()
|
||||||
{
|
{
|
||||||
AlbumArtistIds = new Guid[] {};
|
AlbumArtistIds = Array.Empty<Guid>();
|
||||||
AlbumIds = new Guid[] {};
|
AlbumIds = Array.Empty<Guid>();
|
||||||
AncestorIds = new Guid[] {};
|
AncestorIds = Array.Empty<Guid>();
|
||||||
ArtistIds = new Guid[] {};
|
ArtistIds = Array.Empty<Guid>();
|
||||||
BlockUnratedItems = new UnratedItem[] { };
|
BlockUnratedItems = Array.Empty<UnratedItem>();
|
||||||
BoxSetLibraryFolders = new Guid[] {};
|
BoxSetLibraryFolders = Array.Empty<Guid>();
|
||||||
ChannelIds = new Guid[] {};
|
ChannelIds = Array.Empty<Guid>();
|
||||||
ContributingArtistIds = new Guid[] {};
|
ContributingArtistIds = Array.Empty<Guid>();
|
||||||
DtoOptions = new DtoOptions();
|
DtoOptions = new DtoOptions();
|
||||||
EnableTotalRecordCount = true;
|
EnableTotalRecordCount = true;
|
||||||
ExcludeArtistIds = new Guid[] {};
|
ExcludeArtistIds = Array.Empty<Guid>();
|
||||||
ExcludeInheritedTags = new string[] {};
|
ExcludeInheritedTags = Array.Empty<string>();
|
||||||
ExcludeItemIds = new Guid[] {};
|
ExcludeItemIds = Array.Empty<Guid>();
|
||||||
ExcludeItemTypes = new string[] {};
|
ExcludeItemTypes = Array.Empty<string>();
|
||||||
ExcludeProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
ExcludeProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
ExcludeTags = new string[] {};
|
ExcludeTags = Array.Empty<string>();
|
||||||
GenreIds = new Guid[] {};
|
GenreIds = Array.Empty<Guid>();
|
||||||
Genres = new string[] {};
|
Genres = Array.Empty<string>();
|
||||||
GroupByPresentationUniqueKey = true;
|
GroupByPresentationUniqueKey = true;
|
||||||
HasAnyProviderId = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
HasAnyProviderId = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
ImageTypes = new ImageType[] { };
|
ImageTypes = Array.Empty<ImageType>();
|
||||||
IncludeItemTypes = new string[] {};
|
IncludeItemTypes = Array.Empty<string>();
|
||||||
ItemIds = new Guid[] {};
|
ItemIds = Array.Empty<Guid>();
|
||||||
MediaTypes = new string[] {};
|
MediaTypes = Array.Empty<string>();
|
||||||
MinSimilarityScore = 20;
|
MinSimilarityScore = 20;
|
||||||
OfficialRatings = new string[] {};
|
OfficialRatings = Array.Empty<string>();
|
||||||
OrderBy = Array.Empty<ValueTuple<string, SortOrder>>();
|
OrderBy = Array.Empty<ValueTuple<string, SortOrder>>();
|
||||||
PersonIds = new Guid[] {};
|
PersonIds = Array.Empty<Guid>();
|
||||||
PersonTypes = new string[] {};
|
PersonTypes = Array.Empty<string>();
|
||||||
PresetViews = new string[] {};
|
PresetViews = Array.Empty<string>();
|
||||||
SeriesStatuses = new SeriesStatus[] { };
|
SeriesStatuses = Array.Empty<SeriesStatus>();
|
||||||
SourceTypes = new SourceType[] { };
|
SourceTypes = Array.Empty<SourceType>();
|
||||||
StudioIds = new Guid[] {};
|
StudioIds = Array.Empty<Guid>();
|
||||||
Tags = new string[] {};
|
Tags = Array.Empty<string>();
|
||||||
TopParentIds = new Guid[] {};
|
TopParentIds = Array.Empty<Guid>();
|
||||||
TrailerTypes = new TrailerType[] { };
|
TrailerTypes = Array.Empty<TrailerType>();
|
||||||
VideoTypes = new VideoType[] { };
|
VideoTypes = Array.Empty<VideoType>();
|
||||||
Years = new int[] { };
|
Years = Array.Empty<int>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public InternalItemsQuery(User user)
|
public InternalItemsQuery(User user)
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public InternalPeopleQuery()
|
public InternalPeopleQuery()
|
||||||
{
|
{
|
||||||
PersonTypes = new string[] { };
|
PersonTypes = Array.Empty<string>();
|
||||||
ExcludePersonTypes = new string[] { };
|
ExcludePersonTypes = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,8 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||||
public BoxSet()
|
public BoxSet()
|
||||||
{
|
{
|
||||||
RemoteTrailers = EmptyMediaUrlArray;
|
RemoteTrailers = EmptyMediaUrlArray;
|
||||||
LocalTrailerIds = new Guid[] { };
|
LocalTrailerIds = Array.Empty<Guid>();
|
||||||
RemoteTrailerIds = new Guid[] { };
|
RemoteTrailerIds = Array.Empty<Guid>();
|
||||||
|
|
||||||
DisplayOrder = ItemSortBy.PremiereDate;
|
DisplayOrder = ItemSortBy.PremiereDate;
|
||||||
}
|
}
|
||||||
|
@ -52,12 +52,6 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||||
public Guid[] LocalTrailerIds { get; set; }
|
public Guid[] LocalTrailerIds { get; set; }
|
||||||
public Guid[] RemoteTrailerIds { get; set; }
|
public Guid[] RemoteTrailerIds { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the remote trailers.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The remote trailers.</value>
|
|
||||||
public MediaUrl[] RemoteTrailers { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the display order.
|
/// Gets or sets the display order.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -70,12 +64,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||||
}
|
}
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
{
|
=> 2 / 3;
|
||||||
double value = 2;
|
|
||||||
value /= 3;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override UnratedItem GetBlockUnratedType()
|
public override UnratedItem GetBlockUnratedType()
|
||||||
{
|
{
|
||||||
|
@ -254,7 +243,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||||
return FlattenItems(boxset.GetLinkedChildren(), expandedFolders);
|
return FlattenItems(boxset.GetLinkedChildren(), expandedFolders);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new BaseItem[] { };
|
return Array.Empty<BaseItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new[] { item };
|
return new[] { item };
|
||||||
|
|
|
@ -6,8 +6,6 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
|
@ -32,8 +30,6 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||||
public Guid[] LocalTrailerIds { get; set; }
|
public Guid[] LocalTrailerIds { get; set; }
|
||||||
public Guid[] RemoteTrailerIds { get; set; }
|
public Guid[] RemoteTrailerIds { get; set; }
|
||||||
|
|
||||||
public MediaUrl[] RemoteTrailers { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the TMDB collection.
|
/// Gets or sets the name of the TMDB collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -55,10 +51,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
double value = 2;
|
return 2 / 3;
|
||||||
value /= 3;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
|
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public MusicVideo()
|
public MusicVideo()
|
||||||
{
|
{
|
||||||
Artists = new string[] {};
|
Artists = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -58,6 +58,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
{
|
{
|
||||||
|
// REVIEW: @bond
|
||||||
if (Width.HasValue && Height.HasValue)
|
if (Width.HasValue && Height.HasValue)
|
||||||
{
|
{
|
||||||
double width = Width.Value;
|
double width = Width.Value;
|
||||||
|
@ -85,8 +86,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return base.GetDefaultPrimaryImageAspectRatio();
|
return base.GetDefaultPrimaryImageAspectRatio();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int? Width { get; set; }
|
public new int? Width { get; set; }
|
||||||
public int? Height { get; set; }
|
public new int? Height { get; set; }
|
||||||
public string CameraMake { get; set; }
|
public string CameraMake { get; set; }
|
||||||
public string CameraModel { get; set; }
|
public string CameraModel { get; set; }
|
||||||
public string Software { get; set; }
|
public string Software { get; set; }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using System;
|
using System;
|
||||||
|
@ -19,13 +19,12 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
public Episode()
|
public Episode()
|
||||||
{
|
{
|
||||||
RemoteTrailers = EmptyMediaUrlArray;
|
RemoteTrailers = EmptyMediaUrlArray;
|
||||||
LocalTrailerIds = new Guid[] {};
|
LocalTrailerIds = Array.Empty<Guid>();
|
||||||
RemoteTrailerIds = new Guid[] {};
|
RemoteTrailerIds = Array.Empty<Guid>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Guid[] LocalTrailerIds { get; set; }
|
public Guid[] LocalTrailerIds { get; set; }
|
||||||
public Guid[] RemoteTrailerIds { get; set; }
|
public Guid[] RemoteTrailerIds { get; set; }
|
||||||
public MediaUrl[] RemoteTrailers { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the season in which it aired.
|
/// Gets the season in which it aired.
|
||||||
|
@ -112,10 +111,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
double value = 16;
|
return 16 / 9;
|
||||||
value /= 9;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<string> GetUserDataKeys()
|
public override List<string> GetUserDataKeys()
|
||||||
|
|
|
@ -102,10 +102,11 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var seriesId = SeriesId;
|
var seriesId = SeriesId;
|
||||||
if (seriesId.Equals(Guid.Empty)) {
|
if (seriesId == Guid.Empty)
|
||||||
|
{
|
||||||
seriesId = FindSeriesId();
|
seriesId = FindSeriesId();
|
||||||
}
|
}
|
||||||
return !seriesId.Equals(Guid.Empty) ? (LibraryManager.GetItemById(seriesId) as Series) : null;
|
return seriesId == Guid.Empty ? null : (LibraryManager.GetItemById(seriesId) as Series);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +228,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
public Guid FindSeriesId()
|
public Guid FindSeriesId()
|
||||||
{
|
{
|
||||||
var series = FindParent<Series>();
|
var series = FindParent<Series>();
|
||||||
return series == null ? Guid.Empty: series.Id;
|
return series == null ? Guid.Empty : series.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -23,9 +23,9 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
public Series()
|
public Series()
|
||||||
{
|
{
|
||||||
RemoteTrailers = EmptyMediaUrlArray;
|
RemoteTrailers = EmptyMediaUrlArray;
|
||||||
LocalTrailerIds = new Guid[] {};
|
LocalTrailerIds = Array.Empty<Guid>();
|
||||||
RemoteTrailerIds = new Guid[] {};
|
RemoteTrailerIds = Array.Empty<Guid>();
|
||||||
AirDays = new DayOfWeek[] { };
|
AirDays = Array.Empty<DayOfWeek>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DayOfWeek[] AirDays { get; set; }
|
public DayOfWeek[] AirDays { get; set; }
|
||||||
|
@ -73,8 +73,6 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
public Guid[] LocalTrailerIds { get; set; }
|
public Guid[] LocalTrailerIds { get; set; }
|
||||||
public Guid[] RemoteTrailerIds { get; set; }
|
public Guid[] RemoteTrailerIds { get; set; }
|
||||||
|
|
||||||
public MediaUrl[] RemoteTrailers { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// airdate, dvd or absolute
|
/// airdate, dvd or absolute
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -15,18 +15,13 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public Trailer()
|
public Trailer()
|
||||||
{
|
{
|
||||||
TrailerTypes = new TrailerType[] { };
|
TrailerTypes = Array.Empty<TrailerType>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TrailerType[] TrailerTypes { get; set; }
|
public TrailerType[] TrailerTypes { get; set; }
|
||||||
|
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
{
|
=> 2 / 3;
|
||||||
double value = 2;
|
|
||||||
value /= 3;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override UnratedItem GetBlockUnratedType()
|
public override UnratedItem GetBlockUnratedType()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
using MediaBrowser.Controller.Playlists;
|
using MediaBrowser.Controller.Playlists;
|
||||||
using MediaBrowser.Controller.TV;
|
using MediaBrowser.Controller.TV;
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Dto;
|
|
||||||
using MediaBrowser.Controller.Collections;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public class UserView : Folder, IHasCollectionType
|
public class UserView : Folder, IHasCollectionType
|
||||||
{
|
{
|
||||||
public string ViewType { get; set; }
|
public string ViewType { get; set; }
|
||||||
public Guid DisplayParentId { get; set; }
|
public new Guid DisplayParentId { get; set; }
|
||||||
|
|
||||||
public Guid? UserId { get; set; }
|
public Guid? UserId { get; set; }
|
||||||
|
|
||||||
|
@ -68,14 +65,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//public override double? GetDefaultPrimaryImageAspectRatio()
|
|
||||||
//{
|
|
||||||
// double value = 16;
|
|
||||||
// value /= 9;
|
|
||||||
|
|
||||||
// return value;
|
|
||||||
//}
|
|
||||||
|
|
||||||
public override int GetChildCount(User user)
|
public override int GetChildCount(User user)
|
||||||
{
|
{
|
||||||
return GetChildren(user, true).Count;
|
return GetChildren(user, true).Count;
|
||||||
|
@ -161,8 +150,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public static bool IsEligibleForGrouping(Folder folder)
|
public static bool IsEligibleForGrouping(Folder folder)
|
||||||
{
|
{
|
||||||
var collectionFolder = folder as ICollectionFolder;
|
return folder is ICollectionFolder collectionFolder
|
||||||
return collectionFolder != null && IsEligibleForGrouping(collectionFolder.CollectionType);
|
&& IsEligibleForGrouping(collectionFolder.CollectionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string[] ViewTypesEligibleForGrouping = new string[]
|
private static string[] ViewTypesEligibleForGrouping = new string[]
|
||||||
|
@ -195,7 +184,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
protected override Task ValidateChildrenInternal(IProgress<double> progress, System.Threading.CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, Providers.MetadataRefreshOptions refreshOptions, Providers.IDirectoryService directoryService)
|
protected override Task ValidateChildrenInternal(IProgress<double> progress, System.Threading.CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, Providers.MetadataRefreshOptions refreshOptions, Providers.IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
return Task.FromResult(true);
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -10,7 +10,6 @@ using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Extensions;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
|
@ -132,8 +131,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
public bool HasSubtitles { get; set; }
|
public bool HasSubtitles { get; set; }
|
||||||
|
|
||||||
public bool IsPlaceHolder { get; set; }
|
public bool IsPlaceHolder { get; set; }
|
||||||
public bool IsShortcut { get; set; }
|
|
||||||
public string ShortcutPath { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the default index of the video stream.
|
/// Gets or sets the default index of the video stream.
|
||||||
|
@ -173,7 +170,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return new string[] {};
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
return mediaEncoder.GetPlayableStreamFileNames(Path, videoType);
|
return mediaEncoder.GetPlayableStreamFileNames(Path, videoType);
|
||||||
}
|
}
|
||||||
|
@ -186,9 +183,9 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public Video()
|
public Video()
|
||||||
{
|
{
|
||||||
AdditionalParts = new string[] {};
|
AdditionalParts = Array.Empty<string>();
|
||||||
LocalAlternateVersions = new string[] {};
|
LocalAlternateVersions = Array.Empty<string>();
|
||||||
SubtitleFiles = new string[] {};
|
SubtitleFiles = Array.Empty<string>();
|
||||||
LinkedAlternateVersions = EmptyLinkedChildArray;
|
LinkedAlternateVersions = EmptyLinkedChildArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,10 +212,10 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(PrimaryVersionId))
|
if (!string.IsNullOrEmpty(PrimaryVersionId))
|
||||||
{
|
{
|
||||||
var item = LibraryManager.GetItemById(PrimaryVersionId) as Video;
|
var item = LibraryManager.GetItemById(PrimaryVersionId);
|
||||||
if (item != null)
|
if (item is Video video)
|
||||||
{
|
{
|
||||||
return item.MediaSourceCount;
|
return video.MediaSourceCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return LinkedAlternateVersions.Length + LocalAlternateVersions.Length + 1;
|
return LinkedAlternateVersions.Length + LocalAlternateVersions.Length + 1;
|
||||||
|
@ -366,7 +363,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
/// Gets the additional parts.
|
/// Gets the additional parts.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>IEnumerable{Video}.</returns>
|
/// <returns>IEnumerable{Video}.</returns>
|
||||||
public IEnumerable<Video> GetAdditionalParts()
|
public IOrderedEnumerable<Video> GetAdditionalParts()
|
||||||
{
|
{
|
||||||
return GetAdditionalPartIds()
|
return GetAdditionalPartIds()
|
||||||
.Select(i => LibraryManager.GetItemById(i))
|
.Select(i => LibraryManager.GetItemById(i))
|
||||||
|
@ -420,8 +417,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
var updateType = base.UpdateFromResolvedItem(newItem);
|
var updateType = base.UpdateFromResolvedItem(newItem);
|
||||||
|
|
||||||
var newVideo = newItem as Video;
|
if (newItem is Video newVideo)
|
||||||
if (newVideo != null)
|
|
||||||
{
|
{
|
||||||
if (!AdditionalParts.SequenceEqual(newVideo.AdditionalParts, StringComparer.Ordinal))
|
if (!AdditionalParts.SequenceEqual(newVideo.AdditionalParts, StringComparer.Ordinal))
|
||||||
{
|
{
|
||||||
|
@ -463,7 +459,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
.Select(i => i.FullName)
|
.Select(i => i.FullName)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
}
|
}
|
||||||
return new string[] {};
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -618,9 +614,5 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsHD (Video video) {
|
|
||||||
return video.Height >= 720;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MediaBrowser.Model.Querying;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Library
|
namespace MediaBrowser.Controller.Library
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Controller.Configuration;
|
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
|
||||||
|
@ -169,6 +166,7 @@ namespace MediaBrowser.Controller.Library
|
||||||
AdditionalLocations.Add(path);
|
AdditionalLocations.Add(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// REVIEW: @bond
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the physical locations.
|
/// Gets the physical locations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -177,7 +175,7 @@ namespace MediaBrowser.Controller.Library
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var paths = string.IsNullOrEmpty(Path) ? new string[] { } : new[] { Path };
|
var paths = string.IsNullOrEmpty(Path) ? Array.Empty<string>() : new[] { Path };
|
||||||
return AdditionalLocations == null ? paths : paths.Concat(AdditionalLocations).ToArray();
|
return AdditionalLocations == null ? paths : paths.Concat(AdditionalLocations).ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -261,7 +259,7 @@ namespace MediaBrowser.Controller.Library
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Equalses the specified args.
|
/// Equals the specified args.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="args">The args.</param>
|
/// <param name="args">The args.</param>
|
||||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
||||||
|
|
|
@ -47,50 +47,19 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double GetDefaultPrimaryImageAspectRatio(IHasProgramAttributes item)
|
|
||||||
{
|
|
||||||
var serviceName = item.ServiceName;
|
|
||||||
|
|
||||||
if (item.IsMovie)
|
|
||||||
{
|
|
||||||
if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
double value = 2;
|
|
||||||
value /= 3;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
double value = 16;
|
|
||||||
value /= 9;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
double value = 2;
|
|
||||||
value /= 3;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
double value = 16;
|
|
||||||
value /= 9;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string EmbyServiceName = "Emby";
|
private static string EmbyServiceName = "Emby";
|
||||||
public override double GetDefaultPrimaryImageAspectRatio()
|
public override double GetDefaultPrimaryImageAspectRatio()
|
||||||
{
|
{
|
||||||
return GetDefaultPrimaryImageAspectRatio(this);
|
var serviceName = ServiceName;
|
||||||
|
|
||||||
|
if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return 2 / 3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 16 / 9;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -10,11 +10,11 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
{
|
{
|
||||||
public TimerInfo()
|
public TimerInfo()
|
||||||
{
|
{
|
||||||
Genres = new string[] { };
|
Genres = Array.Empty<string>();
|
||||||
KeepUntil = KeepUntil.UntilDeleted;
|
KeepUntil = KeepUntil.UntilDeleted;
|
||||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
Tags = new string[] { };
|
Tags = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, string> ProviderIds { get; set; }
|
public Dictionary<string, string> ProviderIds { get; set; }
|
||||||
|
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Dlna;
|
using MediaBrowser.Model.Dlna;
|
||||||
|
@ -12,8 +11,6 @@ using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
using MediaBrowser.Common.Configuration;
|
|
||||||
using MediaBrowser.Model.Reflection;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.MediaEncoding
|
namespace MediaBrowser.Controller.MediaEncoding
|
||||||
{
|
{
|
||||||
|
@ -343,19 +340,19 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
public int GetVideoProfileScore(string profile)
|
public int GetVideoProfileScore(string profile)
|
||||||
{
|
{
|
||||||
var list = new []
|
string[] list =
|
||||||
{
|
{
|
||||||
"Constrained Baseline",
|
"ConstrainedBaseline",
|
||||||
"Baseline",
|
"Baseline",
|
||||||
"Extended",
|
"Extended",
|
||||||
"Main",
|
"Main",
|
||||||
"High",
|
"High",
|
||||||
"Progressive High",
|
"ProgressiveHigh",
|
||||||
"Constrained High"
|
"ConstrainedHigh"
|
||||||
};
|
};
|
||||||
|
|
||||||
// strip spaces because they may be stripped out on the query string
|
// strip spaces because they may be stripped out on the query string
|
||||||
return Array.FindIndex(list, t => string.Equals(t.Replace(" ", ""), profile.Replace(" ", ""), StringComparison.OrdinalIgnoreCase));
|
return Array.FindIndex(list, t => string.Equals(t, profile.Replace(" ", ""), StringComparison.OrdinalIgnoreCase));
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetInputPathArgument(EncodingJobInfo state)
|
public string GetInputPathArgument(EncodingJobInfo state)
|
||||||
|
@ -516,18 +513,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
public string NormalizeTranscodingLevel(string videoCodec, string level)
|
public string NormalizeTranscodingLevel(string videoCodec, string level)
|
||||||
{
|
{
|
||||||
double requestLevel;
|
|
||||||
|
|
||||||
// Clients may direct play higher than level 41, but there's no reason to transcode higher
|
// Clients may direct play higher than level 41, but there's no reason to transcode higher
|
||||||
if (double.TryParse(level, NumberStyles.Any, _usCulture, out requestLevel))
|
if (double.TryParse(level, NumberStyles.Any, _usCulture, out double requestLevel)
|
||||||
|
&& string.Equals(videoCodec, "h264", StringComparison.OrdinalIgnoreCase)
|
||||||
|
&& requestLevel > 41)
|
||||||
{
|
{
|
||||||
if (string.Equals(videoCodec, "h264", StringComparison.OrdinalIgnoreCase))
|
return "41";
|
||||||
{
|
|
||||||
if (requestLevel > 41)
|
|
||||||
{
|
|
||||||
return "41";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return level;
|
return level;
|
||||||
|
@ -623,7 +614,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
// h264 (h264_qsv)
|
// h264 (h264_qsv)
|
||||||
else if (string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
string[] valid_h264_qsv = new string[] { "veryslow", "slower", "slow", "medium", "fast", "faster", "veryfast" };
|
string[] valid_h264_qsv = { "veryslow", "slower", "slow", "medium", "fast", "faster", "veryfast" };
|
||||||
|
|
||||||
if (valid_h264_qsv.Contains(encodingOptions.H264Preset, StringComparer.OrdinalIgnoreCase))
|
if (valid_h264_qsv.Contains(encodingOptions.H264Preset, StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
@ -1958,12 +1949,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
state.PlayableStreamFileNames = new string[] { };
|
state.PlayableStreamFileNames = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
state.PlayableStreamFileNames = new string[] { };
|
state.PlayableStreamFileNames = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaSource.Timestamp.HasValue)
|
if (mediaSource.Timestamp.HasValue)
|
||||||
|
|
|
@ -207,7 +207,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new string[] { };
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetRequestedLevel(string codec)
|
public string GetRequestedLevel(string codec)
|
||||||
|
@ -317,10 +317,10 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
TranscodingType = jobType;
|
TranscodingType = jobType;
|
||||||
RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
PlayableStreamFileNames = new string[] { };
|
PlayableStreamFileNames = Array.Empty<string>();
|
||||||
SupportedAudioCodecs = new string[] { };
|
SupportedAudioCodecs = Array.Empty<string>();
|
||||||
SupportedVideoCodecs = new string[] { };
|
SupportedVideoCodecs = Array.Empty<string>();
|
||||||
SupportedSubtitleCodecs = new string[] { };
|
SupportedSubtitleCodecs = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSegmentedLiveStream
|
public bool IsSegmentedLiveStream
|
||||||
|
|
|
@ -10,7 +10,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
public class EncodingJobOptions : BaseEncodingJobOptions
|
public class EncodingJobOptions : BaseEncodingJobOptions
|
||||||
{
|
{
|
||||||
public string OutputDirectory { get; set; }
|
public string OutputDirectory { get; set; }
|
||||||
|
|
||||||
public string ItemId { get; set; }
|
public string ItemId { get; set; }
|
||||||
public string MediaSourceId { get; set; }
|
public string MediaSourceId { get; set; }
|
||||||
public string AudioCodec { get; set; }
|
public string AudioCodec { get; set; }
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
public MediaInfoRequest()
|
public MediaInfoRequest()
|
||||||
{
|
{
|
||||||
PlayableStreamFileNames = new string[] {};
|
PlayableStreamFileNames = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Net
|
namespace MediaBrowser.Controller.Net
|
||||||
{
|
{
|
||||||
public class AuthorizationInfo
|
public class AuthorizationInfo
|
||||||
|
@ -12,12 +11,7 @@ namespace MediaBrowser.Controller.Net
|
||||||
/// <value>The user identifier.</value>
|
/// <value>The user identifier.</value>
|
||||||
public Guid UserId {
|
public Guid UserId {
|
||||||
get {
|
get {
|
||||||
if (User == null) {
|
return User == null ? Guid.Empty : User.Id;
|
||||||
return Guid.Empty;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return User.Id;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Specialized;
|
|
||||||
using MediaBrowser.Model.Services;
|
using MediaBrowser.Model.Services;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Net
|
namespace MediaBrowser.Controller.Net
|
||||||
|
@ -7,7 +6,6 @@ namespace MediaBrowser.Controller.Net
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class WebSocketConnectEventArgs
|
/// Class WebSocketConnectEventArgs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class WebSocketConnectingEventArgs : EventArgs
|
public class WebSocketConnectingEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Playlists
|
namespace MediaBrowser.Controller.Playlists
|
||||||
{
|
{
|
||||||
public interface IPlaylistManager
|
public interface IPlaylistManager
|
||||||
|
|
|
@ -15,14 +15,14 @@ namespace MediaBrowser.Controller.Playlists
|
||||||
{
|
{
|
||||||
public class Playlist : Folder, IHasShares
|
public class Playlist : Folder, IHasShares
|
||||||
{
|
{
|
||||||
public static string[] SupportedExtensions = new string[] {
|
public static string[] SupportedExtensions =
|
||||||
|
{
|
||||||
".m3u",
|
".m3u",
|
||||||
".m3u8",
|
".m3u8",
|
||||||
".pls",
|
".pls",
|
||||||
".wpl",
|
".wpl",
|
||||||
".zpl"
|
".zpl"
|
||||||
};
|
};
|
||||||
|
|
||||||
public Guid OwnerUserId { get; set; }
|
public Guid OwnerUserId { get; set; }
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||||
|
|
||||||
public Playlist()
|
public Playlist()
|
||||||
{
|
{
|
||||||
Shares = new Share[] { };
|
Shares = Array.Empty<Share>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
@ -131,7 +131,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||||
|
|
||||||
protected override Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
|
protected override Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
return Task.FromResult(true);
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<BaseItem> GetChildren(User user, bool includeLinkedChildren, InternalItemsQuery query)
|
public override List<BaseItem> GetChildren(User user, bool includeLinkedChildren, InternalItemsQuery query)
|
||||||
|
@ -186,8 +186,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||||
|
|
||||||
private static IEnumerable<BaseItem> GetPlaylistItems(BaseItem item, User user, string mediaType, DtoOptions options)
|
private static IEnumerable<BaseItem> GetPlaylistItems(BaseItem item, User user, string mediaType, DtoOptions options)
|
||||||
{
|
{
|
||||||
var musicGenre = item as MusicGenre;
|
if (item is MusicGenre musicGenre)
|
||||||
if (musicGenre != null)
|
|
||||||
{
|
{
|
||||||
return LibraryManager.GetItemList(new InternalItemsQuery(user)
|
return LibraryManager.GetItemList(new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
|
@ -199,8 +198,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var musicArtist = item as MusicArtist;
|
if (item is MusicArtist musicArtist)
|
||||||
if (musicArtist != null)
|
|
||||||
{
|
{
|
||||||
return LibraryManager.GetItemList(new InternalItemsQuery(user)
|
return LibraryManager.GetItemList(new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
|
@ -212,8 +210,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var folder = item as Folder;
|
if (item is Folder folder)
|
||||||
if (folder != null)
|
|
||||||
{
|
{
|
||||||
var query = new InternalItemsQuery(user)
|
var query = new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace MediaBrowser.Controller.Providers
|
||||||
{
|
{
|
||||||
ArtistProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
ArtistProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
SongInfos = new List<SongInfo>();
|
SongInfos = new List<SongInfo>();
|
||||||
AlbumArtists = EmptyStringArray;
|
AlbumArtists = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace MediaBrowser.Controller.Providers
|
||||||
ImageRefreshMode = MetadataRefreshMode.Default;
|
ImageRefreshMode = MetadataRefreshMode.Default;
|
||||||
DirectoryService = directoryService;
|
DirectoryService = directoryService;
|
||||||
|
|
||||||
ReplaceImages = new ImageType[] { };
|
ReplaceImages = Array.Empty<ImageType>();
|
||||||
IsAutomated = true;
|
IsAutomated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,4 +30,4 @@ namespace MediaBrowser.Controller.Providers
|
||||||
(ReplaceAllImages || ReplaceImages.Contains(type));
|
(ReplaceAllImages || ReplaceImages.Contains(type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,6 @@ namespace MediaBrowser.Controller.Providers
|
||||||
{
|
{
|
||||||
public class ItemLookupInfo : IHasProviderIds
|
public class ItemLookupInfo : IHasProviderIds
|
||||||
{
|
{
|
||||||
protected static string[] EmptyStringArray = new string[] { };
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name.
|
/// Gets or sets the name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
|
@ -47,7 +45,7 @@ namespace MediaBrowser.Controller.Providers
|
||||||
{
|
{
|
||||||
if (RefreshPaths == null)
|
if (RefreshPaths == null)
|
||||||
{
|
{
|
||||||
RefreshPaths = new string[] { };
|
RefreshPaths = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshPaths = copy.RefreshPaths.ToArray();
|
RefreshPaths = copy.RefreshPaths.ToArray();
|
||||||
|
|
|
@ -74,4 +74,4 @@ namespace MediaBrowser.Controller.Providers
|
||||||
return userData;
|
return userData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Providers
|
namespace MediaBrowser.Controller.Providers
|
||||||
{
|
{
|
||||||
|
@ -9,8 +10,8 @@ namespace MediaBrowser.Controller.Providers
|
||||||
|
|
||||||
public SongInfo()
|
public SongInfo()
|
||||||
{
|
{
|
||||||
Artists = EmptyStringArray;
|
Artists = Array.Empty<string>();
|
||||||
AlbumArtists = EmptyStringArray;
|
AlbumArtists = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Session
|
namespace MediaBrowser.Controller.Session
|
||||||
{
|
{
|
||||||
public class AuthenticationRequest
|
public class AuthenticationRequest
|
||||||
|
@ -9,7 +8,6 @@ namespace MediaBrowser.Controller.Session
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
public string PasswordSha1 { get; set; }
|
public string PasswordSha1 { get; set; }
|
||||||
public string PasswordMd5 { get; set; }
|
|
||||||
public string App { get; set; }
|
public string App { get; set; }
|
||||||
public string AppVersion { get; set; }
|
public string AppVersion { get; set; }
|
||||||
public string DeviceId { get; set; }
|
public string DeviceId { get; set; }
|
||||||
|
|
|
@ -5,7 +5,6 @@ using MediaBrowser.Controller.Security;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Events;
|
using MediaBrowser.Model.Events;
|
||||||
using MediaBrowser.Model.Session;
|
using MediaBrowser.Model.Session;
|
||||||
using MediaBrowser.Model.Users;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
|
@ -22,9 +22,9 @@ namespace MediaBrowser.Controller.Session
|
||||||
_sessionManager = sessionManager;
|
_sessionManager = sessionManager;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
|
||||||
AdditionalUsers = new SessionUserInfo[] { };
|
AdditionalUsers = Array.Empty<SessionUserInfo>();
|
||||||
PlayState = new PlayerStateInfo();
|
PlayState = new PlayerStateInfo();
|
||||||
SessionControllers = new ISessionController[] { };
|
SessionControllers = Array.Empty<ISessionController>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerStateInfo PlayState { get; set; }
|
public PlayerStateInfo PlayState { get; set; }
|
||||||
|
@ -49,7 +49,7 @@ namespace MediaBrowser.Controller.Session
|
||||||
{
|
{
|
||||||
if (Capabilities == null)
|
if (Capabilities == null)
|
||||||
{
|
{
|
||||||
return new string[] {};
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
return Capabilities.PlayableMediaTypes;
|
return Capabilities.PlayableMediaTypes;
|
||||||
}
|
}
|
||||||
|
@ -363,7 +363,7 @@ namespace MediaBrowser.Controller.Session
|
||||||
StopAutomaticProgress();
|
StopAutomaticProgress();
|
||||||
|
|
||||||
var controllers = SessionControllers.ToList();
|
var controllers = SessionControllers.ToList();
|
||||||
SessionControllers = new ISessionController[] { };
|
SessionControllers = Array.Empty<ISessionController>();
|
||||||
|
|
||||||
foreach (var controller in controllers)
|
foreach (var controller in controllers)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,8 +32,8 @@ namespace MediaBrowser.Controller.Subtitles
|
||||||
SearchAllProviders = true;
|
SearchAllProviders = true;
|
||||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
DisabledSubtitleFetchers = new string[] {};
|
DisabledSubtitleFetchers = Array.Empty<string>();
|
||||||
SubtitleFetcherOrder = new string[] {};
|
SubtitleFetcherOrder = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,12 +77,12 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||||
return directoryService.GetFileSystemEntries(path)
|
return directoryService.GetFileSystemEntries(path)
|
||||||
.Where(i => BaseItem.SupportedImageExtensions.Contains(i.Extension, StringComparer.OrdinalIgnoreCase) || i.IsDirectory)
|
.Where(i => BaseItem.SupportedImageExtensions.Contains(i.Extension, StringComparer.OrdinalIgnoreCase) || i.IsDirectory)
|
||||||
|
|
||||||
.OrderBy(i => BaseItem.SupportedImageExtensionsList.IndexOf(i.Extension ?? string.Empty));
|
.OrderBy(i => Array.IndexOf(BaseItem.SupportedImageExtensions, i.Extension ?? string.Empty));
|
||||||
}
|
}
|
||||||
|
|
||||||
return directoryService.GetFiles(path)
|
return directoryService.GetFiles(path)
|
||||||
.Where(i => BaseItem.SupportedImageExtensions.Contains(i.Extension, StringComparer.OrdinalIgnoreCase))
|
.Where(i => BaseItem.SupportedImageExtensions.Contains(i.Extension, StringComparer.OrdinalIgnoreCase))
|
||||||
.OrderBy(i => BaseItem.SupportedImageExtensionsList.IndexOf(i.Extension ?? string.Empty));
|
.OrderBy(i => Array.IndexOf(BaseItem.SupportedImageExtensions, i.Extension ?? string.Empty));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService)
|
public List<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService)
|
||||||
|
@ -106,7 +106,7 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||||
IEnumerable<FileSystemMetadata> files = paths.SelectMany(i => _fileSystem.GetFiles(i, BaseItem.SupportedImageExtensions, true, false));
|
IEnumerable<FileSystemMetadata> files = paths.SelectMany(i => _fileSystem.GetFiles(i, BaseItem.SupportedImageExtensions, true, false));
|
||||||
|
|
||||||
files = files
|
files = files
|
||||||
.OrderBy(i => BaseItem.SupportedImageExtensionsList.IndexOf(i.Extension ?? string.Empty));
|
.OrderBy(i => Array.IndexOf(BaseItem.SupportedImageExtensions, i.Extension ?? string.Empty));
|
||||||
|
|
||||||
var list = new List<LocalImageInfo>();
|
var list = new List<LocalImageInfo>();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Channels
|
namespace MediaBrowser.Model.Channels
|
||||||
{
|
{
|
||||||
|
@ -76,10 +76,9 @@ namespace MediaBrowser.Model.Channels
|
||||||
|
|
||||||
public ChannelFeatures()
|
public ChannelFeatures()
|
||||||
{
|
{
|
||||||
MediaTypes = new ChannelMediaType[] { };
|
MediaTypes = Array.Empty<ChannelMediaType>();
|
||||||
ContentTypes = new ChannelMediaContentType[] { };
|
ContentTypes = Array.Empty<ChannelMediaContentType>();
|
||||||
|
DefaultSortFields = Array.Empty<ChannelItemSortField>();
|
||||||
DefaultSortFields = new ChannelItemSortField[] { };
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
{
|
{
|
||||||
public class LibraryOptions
|
public class LibraryOptions
|
||||||
{
|
{
|
||||||
public bool EnableArchiveMediaFiles { get; set; }
|
|
||||||
public bool EnablePhotos { get; set; }
|
public bool EnablePhotos { get; set; }
|
||||||
public bool EnableRealtimeMonitor { get; set; }
|
public bool EnableRealtimeMonitor { get; set; }
|
||||||
public bool EnableChapterImageExtraction { get; set; }
|
public bool EnableChapterImageExtraction { get; set; }
|
||||||
|
@ -65,10 +64,10 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
public LibraryOptions()
|
public LibraryOptions()
|
||||||
{
|
{
|
||||||
TypeOptions = new TypeOptions[] { };
|
TypeOptions = Array.Empty<TypeOptions>();
|
||||||
DisabledSubtitleFetchers = new string[] { };
|
DisabledSubtitleFetchers = Array.Empty<string>();
|
||||||
SubtitleFetcherOrder = new string[] { };
|
SubtitleFetcherOrder = Array.Empty<string>();
|
||||||
DisabledLocalMetadataReaders = new string[] { };
|
DisabledLocalMetadataReaders = Array.Empty<string>();
|
||||||
|
|
||||||
SkipSubtitlesIfAudioTrackMatches = true;
|
SkipSubtitlesIfAudioTrackMatches = true;
|
||||||
RequirePerfectSubtitleMatch = true;
|
RequirePerfectSubtitleMatch = true;
|
||||||
|
@ -76,7 +75,7 @@ namespace MediaBrowser.Model.Configuration
|
||||||
EnablePhotos = true;
|
EnablePhotos = true;
|
||||||
SaveSubtitlesWithMedia = true;
|
SaveSubtitlesWithMedia = true;
|
||||||
EnableRealtimeMonitor = true;
|
EnableRealtimeMonitor = true;
|
||||||
PathInfos = new MediaPathInfo[] { };
|
PathInfos = Array.Empty<MediaPathInfo>();
|
||||||
EnableInternetProviders = true;
|
EnableInternetProviders = true;
|
||||||
EnableAutomaticSeriesGrouping = true;
|
EnableAutomaticSeriesGrouping = true;
|
||||||
SeasonZeroDisplayName = "Specials";
|
SeasonZeroDisplayName = "Specials";
|
||||||
|
@ -141,11 +140,11 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
public TypeOptions()
|
public TypeOptions()
|
||||||
{
|
{
|
||||||
MetadataFetchers = new string[] { };
|
MetadataFetchers = Array.Empty<string>();
|
||||||
MetadataFetcherOrder = new string[] { };
|
MetadataFetcherOrder = Array.Empty<string>();
|
||||||
ImageFetchers = new string[] { };
|
ImageFetchers = Array.Empty<string>();
|
||||||
ImageFetcherOrder = new string[] { };
|
ImageFetcherOrder = Array.Empty<string>();
|
||||||
ImageOptions = new ImageOption[] { };
|
ImageOptions = Array.Empty<ImageOption>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Dictionary<string, ImageOption[]> DefaultImageOptions = new Dictionary<string, ImageOption[]>
|
public static Dictionary<string, ImageOption[]> DefaultImageOptions = new Dictionary<string, ImageOption[]>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using MediaBrowser.Model.Extensions;
|
using System;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Configuration
|
namespace MediaBrowser.Model.Configuration
|
||||||
{
|
{
|
||||||
|
@ -21,18 +20,12 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
public MetadataOptions()
|
public MetadataOptions()
|
||||||
{
|
{
|
||||||
DisabledMetadataSavers = new string[] { };
|
DisabledMetadataSavers = Array.Empty<string>();
|
||||||
LocalMetadataReaderOrder = new string[] { };
|
LocalMetadataReaderOrder = Array.Empty<string>();
|
||||||
|
DisabledMetadataFetchers = Array.Empty<string>();
|
||||||
DisabledMetadataFetchers = new string[] { };
|
MetadataFetcherOrder = Array.Empty<string>();
|
||||||
MetadataFetcherOrder = new string[] { };
|
DisabledImageFetchers = Array.Empty<string>();
|
||||||
DisabledImageFetchers = new string[] { };
|
ImageFetcherOrder = Array.Empty<string>();
|
||||||
ImageFetcherOrder = new string[] { };
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMetadataSaverEnabled(string name)
|
|
||||||
{
|
|
||||||
return !ListHelper.ContainsIgnoreCase(DisabledMetadataSavers, name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Configuration
|
namespace MediaBrowser.Model.Configuration
|
||||||
|
@ -25,8 +25,8 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
public MetadataPluginSummary()
|
public MetadataPluginSummary()
|
||||||
{
|
{
|
||||||
SupportedImageTypes = new ImageType[] { };
|
SupportedImageTypes = Array.Empty<ImageType>();
|
||||||
Plugins = new MetadataPlugin[] { };
|
Plugins = Array.Empty<MetadataPlugin>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,8 +173,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
public int RemoteClientBitrateLimit { get; set; }
|
public int RemoteClientBitrateLimit { get; set; }
|
||||||
|
|
||||||
public int SchemaVersion { get; set; }
|
|
||||||
|
|
||||||
public bool EnableFolderView { get; set; }
|
public bool EnableFolderView { get; set; }
|
||||||
public bool EnableGroupingIntoCollections { get; set; }
|
public bool EnableGroupingIntoCollections { get; set; }
|
||||||
public bool DisplaySpecialsWithinSeasons { get; set; }
|
public bool DisplaySpecialsWithinSeasons { get; set; }
|
||||||
|
@ -201,13 +199,13 @@ namespace MediaBrowser.Model.Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ServerConfiguration()
|
public ServerConfiguration()
|
||||||
{
|
{
|
||||||
UninstalledPlugins = new string[] { };
|
UninstalledPlugins = Array.Empty<string>();
|
||||||
RemoteIPFilter = new string[] { };
|
RemoteIPFilter = Array.Empty<string>();
|
||||||
LocalNetworkSubnets = new string[] { };
|
LocalNetworkSubnets = Array.Empty<string>();
|
||||||
LocalNetworkAddresses = new string[] { };
|
LocalNetworkAddresses = Array.Empty<string>();
|
||||||
CodecsUsed = new string[] { };
|
CodecsUsed = Array.Empty<string>();
|
||||||
ImageExtractionTimeoutMs = 0;
|
ImageExtractionTimeoutMs = 0;
|
||||||
PathSubstitutions = new PathSubstitution[] { };
|
PathSubstitutions = Array.Empty<PathSubstitution>();
|
||||||
EnableSimpleArtistDetection = true;
|
EnableSimpleArtistDetection = true;
|
||||||
|
|
||||||
DisplaySpecialsWithinSeasons = true;
|
DisplaySpecialsWithinSeasons = true;
|
||||||
|
@ -235,7 +233,7 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
LibraryMonitorDelay = 60;
|
LibraryMonitorDelay = 60;
|
||||||
|
|
||||||
ContentTypes = new NameValuePair[] { };
|
ContentTypes = Array.Empty<NameValuePair>();
|
||||||
|
|
||||||
PreferredMetadataLanguage = "en";
|
PreferredMetadataLanguage = "en";
|
||||||
MetadataCountryCode = "US";
|
MetadataCountryCode = "US";
|
||||||
|
@ -248,56 +246,51 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
MetadataOptions = new[]
|
MetadataOptions = new[]
|
||||||
{
|
{
|
||||||
new MetadataOptions {ItemType = "Book"},
|
new MetadataOptions()
|
||||||
|
{
|
||||||
new MetadataOptions
|
ItemType = "Book"
|
||||||
|
},
|
||||||
|
new MetadataOptions()
|
||||||
{
|
{
|
||||||
ItemType = "Movie"
|
ItemType = "Movie"
|
||||||
},
|
},
|
||||||
|
|
||||||
new MetadataOptions
|
new MetadataOptions
|
||||||
{
|
{
|
||||||
ItemType = "MusicVideo",
|
ItemType = "MusicVideo",
|
||||||
DisabledMetadataFetchers = new []{ "The Open Movie Database" },
|
DisabledMetadataFetchers = new [] { "The Open Movie Database" },
|
||||||
DisabledImageFetchers = new []{ "The Open Movie Database", "FanArt" }
|
DisabledImageFetchers = new [] { "The Open Movie Database", "FanArt" }
|
||||||
},
|
},
|
||||||
|
|
||||||
new MetadataOptions
|
new MetadataOptions
|
||||||
{
|
{
|
||||||
ItemType = "Series",
|
ItemType = "Series",
|
||||||
DisabledMetadataFetchers = new []{ "TheMovieDb" },
|
DisabledMetadataFetchers = new [] { "TheMovieDb" },
|
||||||
DisabledImageFetchers = new []{ "TheMovieDb" }
|
DisabledImageFetchers = new [] { "TheMovieDb" }
|
||||||
},
|
},
|
||||||
|
|
||||||
new MetadataOptions
|
new MetadataOptions
|
||||||
{
|
{
|
||||||
ItemType = "MusicAlbum",
|
ItemType = "MusicAlbum",
|
||||||
DisabledMetadataFetchers = new []{ "TheAudioDB" }
|
DisabledMetadataFetchers = new [] { "TheAudioDB" }
|
||||||
},
|
},
|
||||||
|
|
||||||
new MetadataOptions
|
new MetadataOptions
|
||||||
{
|
{
|
||||||
ItemType = "MusicArtist",
|
ItemType = "MusicArtist",
|
||||||
DisabledMetadataFetchers = new []{ "TheAudioDB" }
|
DisabledMetadataFetchers = new [] { "TheAudioDB" }
|
||||||
},
|
},
|
||||||
|
|
||||||
new MetadataOptions
|
new MetadataOptions
|
||||||
{
|
{
|
||||||
ItemType = "BoxSet"
|
ItemType = "BoxSet"
|
||||||
},
|
},
|
||||||
|
|
||||||
new MetadataOptions
|
new MetadataOptions
|
||||||
{
|
{
|
||||||
ItemType = "Season",
|
ItemType = "Season",
|
||||||
DisabledMetadataFetchers = new []{ "TheMovieDb" },
|
DisabledMetadataFetchers = new [] { "TheMovieDb" },
|
||||||
DisabledImageFetchers = new [] { "FanArt" }
|
DisabledImageFetchers = new [] { "FanArt" }
|
||||||
},
|
},
|
||||||
|
|
||||||
new MetadataOptions
|
new MetadataOptions
|
||||||
{
|
{
|
||||||
ItemType = "Episode",
|
ItemType = "Episode",
|
||||||
DisabledMetadataFetchers = new []{ "The Open Movie Database", "TheMovieDb" },
|
DisabledMetadataFetchers = new [] { "The Open Movie Database", "TheMovieDb" },
|
||||||
DisabledImageFetchers = new []{ "The Open Movie Database", "TheMovieDb" }
|
DisabledImageFetchers = new [] { "The Open Movie Database", "TheMovieDb" }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,10 +57,10 @@ namespace MediaBrowser.Model.Configuration
|
||||||
HidePlayedInLatest = true;
|
HidePlayedInLatest = true;
|
||||||
PlayDefaultAudioTrack = true;
|
PlayDefaultAudioTrack = true;
|
||||||
|
|
||||||
LatestItemsExcludes = new string[] {};
|
LatestItemsExcludes = Array.Empty<string>();
|
||||||
OrderedViews = new string[] {};
|
OrderedViews = Array.Empty<string>();
|
||||||
MyMediaExcludes = new string[] {};
|
MyMediaExcludes = Array.Empty<string>();
|
||||||
GroupedFolders = new string[] {};
|
GroupedFolders = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Connect
|
|
||||||
{
|
|
||||||
public class ConnectAuthenticationExchangeResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the local user identifier.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The local user identifier.</value>
|
|
||||||
public string LocalUserId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the access token.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The access token.</value>
|
|
||||||
public string AccessToken { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Connect
|
|
||||||
{
|
|
||||||
public class ConnectAuthenticationResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the user.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The user.</value>
|
|
||||||
public ConnectUser User { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the access token.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The access token.</value>
|
|
||||||
public string AccessToken { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -14,8 +14,8 @@ namespace MediaBrowser.Model.Connect
|
||||||
|
|
||||||
public ConnectAuthorization()
|
public ConnectAuthorization()
|
||||||
{
|
{
|
||||||
EnabledLibraries = new string[] {};
|
EnabledLibraries = Array.Empty<string>();
|
||||||
EnabledChannels = new string[] {};
|
EnabledChannels = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Connect
|
|
||||||
{
|
|
||||||
public class ConnectAuthorizationRequest
|
|
||||||
{
|
|
||||||
public string SendingUserId { get; set; }
|
|
||||||
public string ConnectUserName { get; set; }
|
|
||||||
public string[] EnabledLibraries { get; set; }
|
|
||||||
public bool EnableLiveTv { get; set; }
|
|
||||||
public string[] EnabledChannels { get; set; }
|
|
||||||
|
|
||||||
public ConnectAuthorizationRequest()
|
|
||||||
{
|
|
||||||
EnabledLibraries = new string[] {};
|
|
||||||
EnabledChannels = new string[] {};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,22 +5,6 @@ namespace MediaBrowser.Model.Devices
|
||||||
{
|
{
|
||||||
public class DeviceInfo
|
public class DeviceInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name of the reported.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name of the reported.</value>
|
|
||||||
public string ReportedName { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name of the custom.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name of the custom.</value>
|
|
||||||
public string CustomName { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the camera upload path.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The camera upload path.</value>
|
|
||||||
public string CameraUploadPath { get; set; }
|
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -5,11 +5,6 @@ namespace MediaBrowser.Model.Devices
|
||||||
{
|
{
|
||||||
public class DeviceQuery
|
public class DeviceQuery
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether [supports unique identifier].
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [supports unique identifier] contains no value, <c>true</c> if [supports unique identifier]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? SupportsPersistentIdentifier { get; set; }
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether [supports synchronize].
|
/// Gets or sets a value indicating whether [supports synchronize].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -10,15 +10,12 @@ namespace MediaBrowser.Model.Devices
|
||||||
|
|
||||||
public DevicesOptions()
|
public DevicesOptions()
|
||||||
{
|
{
|
||||||
EnabledCameraUploadDevices = new string[] {};
|
EnabledCameraUploadDevices = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DeviceOptions
|
public class DeviceOptions
|
||||||
{
|
{
|
||||||
public string[] EnabledCameraUploadDevices { get; set; }
|
|
||||||
public string CameraUploadPath { get; set; }
|
|
||||||
public bool EnableCameraUploadSubfolders { get; set; }
|
|
||||||
public string CustomName { get; set; }
|
public string CustomName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using MediaBrowser.Model.Dlna;
|
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dlna
|
namespace MediaBrowser.Model.Dlna
|
||||||
|
@ -17,7 +15,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
|
|
||||||
public ContainerProfile()
|
public ContainerProfile()
|
||||||
{
|
{
|
||||||
Conditions = new ProfileCondition[] { };
|
Conditions = Array.Empty<ProfileCondition>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string[] GetContainers()
|
public string[] GetContainers()
|
||||||
|
@ -25,13 +23,11 @@ namespace MediaBrowser.Model.Dlna
|
||||||
return SplitValue(Container);
|
return SplitValue(Container);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly string[] EmptyStringArray = Array.Empty<string>();
|
|
||||||
|
|
||||||
public static string[] SplitValue(string value)
|
public static string[] SplitValue(string value)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
{
|
{
|
||||||
return EmptyStringArray;
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
return value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dlna
|
namespace MediaBrowser.Model.Dlna
|
||||||
{
|
{
|
||||||
|
@ -28,7 +27,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
DlnaFlags flagValue = DlnaFlags.BackgroundTransferMode |
|
DlnaFlags flagValue = DlnaFlags.BackgroundTransferMode |
|
||||||
DlnaFlags.InteractiveTransferMode |
|
DlnaFlags.InteractiveTransferMode |
|
||||||
DlnaFlags.DlnaV15;
|
DlnaFlags.DlnaV15;
|
||||||
|
|
||||||
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
|
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
|
||||||
DlnaMaps.FlagsToString(flagValue));
|
DlnaMaps.FlagsToString(flagValue));
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dlna
|
namespace MediaBrowser.Model.Dlna
|
||||||
{
|
{
|
||||||
public class ResolutionNormalizer
|
public class ResolutionNormalizer
|
||||||
{
|
{
|
||||||
private static readonly ResolutionConfiguration[] Configurations =
|
private static readonly ResolutionConfiguration[] Configurations =
|
||||||
new []
|
new[]
|
||||||
{
|
{
|
||||||
new ResolutionConfiguration(426, 320000),
|
new ResolutionConfiguration(426, 320000),
|
||||||
new ResolutionConfiguration(640, 400000),
|
new ResolutionConfiguration(640, 400000),
|
||||||
|
@ -20,24 +19,24 @@ namespace MediaBrowser.Model.Dlna
|
||||||
public static ResolutionOptions Normalize(int? inputBitrate,
|
public static ResolutionOptions Normalize(int? inputBitrate,
|
||||||
int? unused1,
|
int? unused1,
|
||||||
int? unused2,
|
int? unused2,
|
||||||
int outputBitrate,
|
int outputBitrate,
|
||||||
string inputCodec,
|
string inputCodec,
|
||||||
string outputCodec,
|
string outputCodec,
|
||||||
int? maxWidth,
|
int? maxWidth,
|
||||||
int? maxHeight)
|
int? maxHeight)
|
||||||
{
|
{
|
||||||
// If the bitrate isn't changing, then don't downlscale the resolution
|
// If the bitrate isn't changing, then don't downlscale the resolution
|
||||||
if (inputBitrate.HasValue && outputBitrate >= inputBitrate.Value)
|
if (inputBitrate.HasValue && outputBitrate >= inputBitrate.Value)
|
||||||
{
|
{
|
||||||
if (maxWidth.HasValue || maxHeight.HasValue)
|
if (maxWidth.HasValue || maxHeight.HasValue)
|
||||||
{
|
{
|
||||||
return new ResolutionOptions
|
return new ResolutionOptions
|
||||||
{
|
{
|
||||||
MaxWidth = maxWidth,
|
MaxWidth = maxWidth,
|
||||||
MaxHeight = maxHeight
|
MaxHeight = maxHeight
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var resolutionConfig = GetResolutionConfiguration(outputBitrate);
|
var resolutionConfig = GetResolutionConfiguration(outputBitrate);
|
||||||
if (resolutionConfig != null)
|
if (resolutionConfig != null)
|
||||||
|
@ -90,8 +89,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
{
|
{
|
||||||
var inputScaleFactor = GetVideoBitrateScaleFactor(inputVideoCodec);
|
var inputScaleFactor = GetVideoBitrateScaleFactor(inputVideoCodec);
|
||||||
var outputScaleFactor = GetVideoBitrateScaleFactor(outputVideoCodec);
|
var outputScaleFactor = GetVideoBitrateScaleFactor(outputVideoCodec);
|
||||||
var scaleFactor = outputScaleFactor/inputScaleFactor;
|
var scaleFactor = outputScaleFactor / inputScaleFactor;
|
||||||
var newBitrate = scaleFactor*bitrate;
|
var newBitrate = scaleFactor * bitrate;
|
||||||
|
|
||||||
return Convert.ToInt32(newBitrate);
|
return Convert.ToInt32(newBitrate);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,10 @@ namespace MediaBrowser.Model.Dlna
|
||||||
{
|
{
|
||||||
public StreamInfo()
|
public StreamInfo()
|
||||||
{
|
{
|
||||||
AudioCodecs = new string[] { };
|
AudioCodecs = Array.Empty<string>();
|
||||||
VideoCodecs = new string[] { };
|
VideoCodecs = Array.Empty<string>();
|
||||||
SubtitleCodecs = new string[] { };
|
SubtitleCodecs = Array.Empty<string>();
|
||||||
TranscodeReasons = new TranscodeReason[] { };
|
TranscodeReasons = Array.Empty<TranscodeReason>();
|
||||||
StreamOptions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
StreamOptions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using MediaBrowser.Model.Dlna;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dlna
|
namespace MediaBrowser.Model.Dlna
|
||||||
{
|
{
|
||||||
|
@ -43,4 +41,4 @@ namespace MediaBrowser.Model.Dlna
|
||||||
return languages.Length == 0 || ListHelper.ContainsIgnoreCase(languages, subLanguage);
|
return languages.Length == 0 || ListHelper.ContainsIgnoreCase(languages, subLanguage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,8 @@ using MediaBrowser.Model.Extensions;
|
||||||
using MediaBrowser.Model.Library;
|
using MediaBrowser.Model.Library;
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Sync;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
namespace MediaBrowser.Model.Dto
|
||||||
{
|
{
|
||||||
|
@ -67,7 +65,6 @@ namespace MediaBrowser.Model.Dto
|
||||||
public int? AirsBeforeSeasonNumber { get; set; }
|
public int? AirsBeforeSeasonNumber { get; set; }
|
||||||
public int? AirsAfterSeasonNumber { get; set; }
|
public int? AirsAfterSeasonNumber { get; set; }
|
||||||
public int? AirsBeforeEpisodeNumber { get; set; }
|
public int? AirsBeforeEpisodeNumber { get; set; }
|
||||||
public bool? DisplaySpecialsWithSeasons { get; set; }
|
|
||||||
public bool? CanDelete { get; set; }
|
public bool? CanDelete { get; set; }
|
||||||
public bool? CanDownload { get; set; }
|
public bool? CanDownload { get; set; }
|
||||||
|
|
||||||
|
@ -156,7 +153,6 @@ namespace MediaBrowser.Model.Dto
|
||||||
/// <value>The channel identifier.</value>
|
/// <value>The channel identifier.</value>
|
||||||
public Guid ChannelId { get; set; }
|
public Guid ChannelId { get; set; }
|
||||||
public string ChannelName { get; set; }
|
public string ChannelName { get; set; }
|
||||||
public string ServiceName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the overview.
|
/// Gets or sets the overview.
|
||||||
|
@ -479,26 +475,6 @@ namespace MediaBrowser.Model.Dto
|
||||||
public int? PartCount { get; set; }
|
public int? PartCount { get; set; }
|
||||||
public int? MediaSourceCount { get; set; }
|
public int? MediaSourceCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Determines whether the specified type is type.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type">The type.</param>
|
|
||||||
/// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns>
|
|
||||||
public bool IsType(Type type)
|
|
||||||
{
|
|
||||||
return IsType(type.Name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Determines whether the specified type is type.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type">The type.</param>
|
|
||||||
/// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns>
|
|
||||||
public bool IsType(string type)
|
|
||||||
{
|
|
||||||
return StringHelper.EqualsIgnoreCase(Type, type);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the image tags.
|
/// Gets or sets the image tags.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -601,12 +577,6 @@ namespace MediaBrowser.Model.Dto
|
||||||
/// <value>The end date.</value>
|
/// <value>The end date.</value>
|
||||||
public DateTime? EndDate { get; set; }
|
public DateTime? EndDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the home page URL.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The home page URL.</value>
|
|
||||||
public string HomePageUrl { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the locked fields.
|
/// Gets or sets the locked fields.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -677,11 +647,6 @@ namespace MediaBrowser.Model.Dto
|
||||||
public double? Altitude { get; set; }
|
public double? Altitude { get; set; }
|
||||||
public int? IsoSpeedRating { get; set; }
|
public int? IsoSpeedRating { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used by RecordingGroup
|
|
||||||
/// </summary>
|
|
||||||
public int? RecordingCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the series timer identifier.
|
/// Gets or sets the series timer identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Class ChapterInfo
|
|
||||||
/// </summary>
|
|
||||||
public class ChapterInfoDto
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the start position ticks.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The start position ticks.</value>
|
|
||||||
public long StartPositionTicks { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the image tag.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The image tag.</value>
|
|
||||||
public string ImageTag { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance has image.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance has image; otherwise, <c>false</c>.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public bool HasImage
|
|
||||||
{
|
|
||||||
get { return ImageTag != null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
namespace MediaBrowser.Model.Dto
|
||||||
{
|
{
|
||||||
|
@ -43,7 +42,7 @@ namespace MediaBrowser.Model.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameSystemSummary()
|
public GameSystemSummary()
|
||||||
{
|
{
|
||||||
GameFileExtensions = new string[] {};
|
GameFileExtensions = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Extensions;
|
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
|
@ -73,7 +72,7 @@ namespace MediaBrowser.Model.Dto
|
||||||
|
|
||||||
public MediaSourceInfo()
|
public MediaSourceInfo()
|
||||||
{
|
{
|
||||||
Formats = new string[] { };
|
Formats = Array.Empty<string>();
|
||||||
MediaStreams = new List<MediaStream>();
|
MediaStreams = new List<MediaStream>();
|
||||||
RequiredHttpHeaders = new Dictionary<string, string>();
|
RequiredHttpHeaders = new Dictionary<string, string>();
|
||||||
SupportsTranscoding = true;
|
SupportsTranscoding = true;
|
||||||
|
@ -115,12 +114,6 @@ namespace MediaBrowser.Model.Dto
|
||||||
public int? DefaultAudioStreamIndex { get; set; }
|
public int? DefaultAudioStreamIndex { get; set; }
|
||||||
public int? DefaultSubtitleStreamIndex { get; set; }
|
public int? DefaultSubtitleStreamIndex { get; set; }
|
||||||
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public MediaStream DefaultAudioStream
|
|
||||||
{
|
|
||||||
get { return GetDefaultAudioStream(DefaultAudioStreamIndex); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public MediaStream GetDefaultAudioStream(int? defaultIndex)
|
public MediaStream GetDefaultAudioStream(int? defaultIndex)
|
||||||
{
|
{
|
||||||
if (defaultIndex.HasValue)
|
if (defaultIndex.HasValue)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Globalization;
|
using MediaBrowser.Model.Globalization;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
namespace MediaBrowser.Model.Dto
|
||||||
{
|
{
|
||||||
|
@ -17,11 +17,11 @@ namespace MediaBrowser.Model.Dto
|
||||||
|
|
||||||
public MetadataEditorInfo()
|
public MetadataEditorInfo()
|
||||||
{
|
{
|
||||||
ParentalRatingOptions = new ParentalRating[] { };
|
ParentalRatingOptions = Array.Empty<ParentalRating>();
|
||||||
Countries = new CountryInfo[] { };
|
Countries = Array.Empty<CountryInfo>();
|
||||||
Cultures = new CultureDto[] { };
|
Cultures = Array.Empty<CultureDto>();
|
||||||
ExternalIdInfos = new ExternalIdInfo[] { };
|
ExternalIdInfos = Array.Empty<ExternalIdInfo>();
|
||||||
ContentTypeOptions = new NameValuePair[] { };
|
ContentTypeOptions = Array.Empty<NameValuePair>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
using MediaBrowser.Model.Connect;
|
using MediaBrowser.Model.Connect;
|
||||||
using MediaBrowser.Model.Users;
|
using MediaBrowser.Model.Users;
|
||||||
using System;
|
using System;
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
namespace MediaBrowser.Model.Dto
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,12 +51,12 @@ namespace MediaBrowser.Model.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LibraryUpdateInfo()
|
public LibraryUpdateInfo()
|
||||||
{
|
{
|
||||||
FoldersAddedTo = new string[] { };
|
FoldersAddedTo = Array.Empty<string>();
|
||||||
FoldersRemovedFrom = new string[] { };
|
FoldersRemovedFrom = Array.Empty<string>();
|
||||||
ItemsAdded = new string[] { };
|
ItemsAdded = Array.Empty<string>();
|
||||||
ItemsRemoved = new string[] { };
|
ItemsRemoved = Array.Empty<string>();
|
||||||
ItemsUpdated = new string[] { };
|
ItemsUpdated = Array.Empty<string>();
|
||||||
CollectionFolders = new string[] { };
|
CollectionFolders = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace MediaBrowser.Model.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public VirtualFolderInfo()
|
public VirtualFolderInfo()
|
||||||
{
|
{
|
||||||
Locations = new string[] {};
|
Locations = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace MediaBrowser.Model.Globalization
|
||||||
|
|
||||||
public CultureDto()
|
public CultureDto()
|
||||||
{
|
{
|
||||||
ThreeLetterISOLanguageNames = new string[] {};
|
ThreeLetterISOLanguageNames = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace MediaBrowser.Model.Library
|
||||||
public UserViewQuery()
|
public UserViewQuery()
|
||||||
{
|
{
|
||||||
IncludeExternalContent = true;
|
IncludeExternalContent = true;
|
||||||
PresetViews = new string[] {};
|
PresetViews = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ namespace MediaBrowser.Model.LiveTv
|
||||||
public LiveTvChannelQuery()
|
public LiveTvChannelQuery()
|
||||||
{
|
{
|
||||||
EnableUserData = true;
|
EnableUserData = true;
|
||||||
SortBy = new string[] {};
|
SortBy = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@ namespace MediaBrowser.Model.LiveTv
|
||||||
|
|
||||||
public LiveTvInfo()
|
public LiveTvInfo()
|
||||||
{
|
{
|
||||||
Services = new LiveTvServiceInfo[] { };
|
Services = Array.Empty<LiveTvServiceInfo>();
|
||||||
EnabledUsers = new string[] {};
|
EnabledUsers = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,9 @@ namespace MediaBrowser.Model.LiveTv
|
||||||
|
|
||||||
public LiveTvOptions()
|
public LiveTvOptions()
|
||||||
{
|
{
|
||||||
TunerHosts = new TunerHostInfo[] { };
|
TunerHosts = Array.Empty<TunerHostInfo>();
|
||||||
ListingProviders = new ListingsProviderInfo[] { };
|
ListingProviders = Array.Empty<ListingsProviderInfo>();
|
||||||
MediaLocationsCreated = new string[] { };
|
MediaLocationsCreated = Array.Empty<string>();
|
||||||
RecordingPostProcessorArguments = "\"{path}\"";
|
RecordingPostProcessorArguments = "\"{path}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,13 +76,13 @@ namespace MediaBrowser.Model.LiveTv
|
||||||
|
|
||||||
public ListingsProviderInfo()
|
public ListingsProviderInfo()
|
||||||
{
|
{
|
||||||
NewsCategories = new string[] { "news", "journalism", "documentary", "current affairs" };
|
NewsCategories = new [] { "news", "journalism", "documentary", "current affairs" };
|
||||||
SportsCategories = new string[] { "sports", "basketball", "baseball", "football" };
|
SportsCategories = new [] { "sports", "basketball", "baseball", "football" };
|
||||||
KidsCategories = new string[] { "kids", "family", "children", "childrens", "disney" };
|
KidsCategories = new [] { "kids", "family", "children", "childrens", "disney" };
|
||||||
MovieCategories = new string[] { "movie" };
|
MovieCategories = new [] { "movie" };
|
||||||
EnabledTuners = new string[] { };
|
EnabledTuners = Array.Empty<string>();
|
||||||
EnableAllTuners = true;
|
EnableAllTuners = true;
|
||||||
ChannelMappings = new NameValuePair[] {};
|
ChannelMappings = Array.Empty<NameValuePair>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace MediaBrowser.Model.LiveTv
|
||||||
|
|
||||||
public LiveTvServiceInfo()
|
public LiveTvServiceInfo()
|
||||||
{
|
{
|
||||||
Tuners = new string[] { };
|
Tuners = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,117 +0,0 @@
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using System;
|
|
||||||
using MediaBrowser.Model.Querying;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.LiveTv
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Class ProgramQuery.
|
|
||||||
/// </summary>
|
|
||||||
public class ProgramQuery
|
|
||||||
{
|
|
||||||
public ProgramQuery()
|
|
||||||
{
|
|
||||||
ChannelIds = new Guid[] { };
|
|
||||||
OrderBy = new Tuple<string, SortOrder>[] { };
|
|
||||||
Genres = new string[] {};
|
|
||||||
GenreIds = new Guid[] { };
|
|
||||||
EnableTotalRecordCount = true;
|
|
||||||
EnableUserData = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool EnableTotalRecordCount { get; set; }
|
|
||||||
public bool EnableUserData { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fields to return within the items, in addition to basic information
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The fields.</value>
|
|
||||||
public ItemFields[] Fields { get; set; }
|
|
||||||
public bool? EnableImages { get; set; }
|
|
||||||
public int? ImageTypeLimit { get; set; }
|
|
||||||
public ImageType[] EnableImageTypes { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the channel ids.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The channel ids.</value>
|
|
||||||
public Guid[] ChannelIds { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the user identifier.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The user identifier.</value>
|
|
||||||
public string UserId { get; set; }
|
|
||||||
public string SeriesTimerId { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The earliest date for which a program starts to return
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? MinStartDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The latest date for which a program starts to return
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? MaxStartDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The earliest date for which a program ends to return
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? MinEndDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The latest date for which a program ends to return
|
|
||||||
/// </summary>
|
|
||||||
public DateTime? MaxEndDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to specific whether to return news or not
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>If set to null, all programs will be returned</remarks>
|
|
||||||
public bool? IsNews { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to specific whether to return movies or not
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>If set to null, all programs will be returned</remarks>
|
|
||||||
public bool? IsMovie { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is kids.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [is kids] contains no value, <c>true</c> if [is kids]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? IsKids { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is sports.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [is sports] contains no value, <c>true</c> if [is sports]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? IsSports { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Skips over a given number of items within the results. Use for paging.
|
|
||||||
/// </summary>
|
|
||||||
public int? StartIndex { get; set; }
|
|
||||||
public bool? IsSeries { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance has aired.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [has aired] contains no value, <c>true</c> if [has aired]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? HasAired { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The maximum number of items to return
|
|
||||||
/// </summary>
|
|
||||||
public int? Limit { get; set; }
|
|
||||||
|
|
||||||
public Tuple<string, SortOrder>[] OrderBy { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Limit results to items containing specific genres
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The genres.</value>
|
|
||||||
public Guid[] GenreIds { get; set; }
|
|
||||||
public string[] Genres { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,73 +0,0 @@
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using MediaBrowser.Model.Querying;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.LiveTv
|
|
||||||
{
|
|
||||||
public class RecommendedProgramQuery
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Fields to return within the items, in addition to basic information
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The fields.</value>
|
|
||||||
public ItemFields[] Fields { get; set; }
|
|
||||||
public bool? EnableImages { get; set; }
|
|
||||||
public int? ImageTypeLimit { get; set; }
|
|
||||||
public ImageType[] EnableImageTypes { get; set; }
|
|
||||||
public Guid[] GenreIds { get; set; }
|
|
||||||
|
|
||||||
public bool EnableTotalRecordCount { get; set; }
|
|
||||||
|
|
||||||
public RecommendedProgramQuery()
|
|
||||||
{
|
|
||||||
EnableTotalRecordCount = true;
|
|
||||||
GenreIds = new Guid[] { };
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the user identifier.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The user identifier.</value>
|
|
||||||
public string UserId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is airing.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is airing; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? IsAiring { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance has aired.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [has aired] contains no value, <c>true</c> if [has aired]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? HasAired { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The maximum number of items to return
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The limit.</value>
|
|
||||||
public int? Limit { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is movie.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [is movie] contains no value, <c>true</c> if [is movie]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? IsNews { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is movie.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [is movie] contains no value, <c>true</c> if [is movie]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? IsMovie { get; set; }
|
|
||||||
public bool? IsSeries { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is kids.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [is kids] contains no value, <c>true</c> if [is kids]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? IsKids { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is sports.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>null</c> if [is sports] contains no value, <c>true</c> if [is sports]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool? IsSports { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,8 +7,6 @@ namespace MediaBrowser.Model.MediaInfo
|
||||||
{
|
{
|
||||||
public class MediaInfo : MediaSourceInfo, IHasProviderIds
|
public class MediaInfo : MediaSourceInfo, IHasProviderIds
|
||||||
{
|
{
|
||||||
private static readonly string[] EmptyStringArray = new string[] {};
|
|
||||||
|
|
||||||
public ChapterInfo[] Chapters { get; set; }
|
public ChapterInfo[] Chapters { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -56,13 +54,13 @@ namespace MediaBrowser.Model.MediaInfo
|
||||||
|
|
||||||
public MediaInfo()
|
public MediaInfo()
|
||||||
{
|
{
|
||||||
Chapters = new ChapterInfo[] { };
|
Chapters = Array.Empty<ChapterInfo>();
|
||||||
Artists = new string[] {};
|
Artists = Array.Empty<string>();
|
||||||
AlbumArtists = EmptyStringArray;
|
AlbumArtists = Array.Empty<string>();
|
||||||
Studios = new string[] {};
|
Studios = Array.Empty<string>();
|
||||||
Genres = new string[] {};
|
Genres = Array.Empty<string>();
|
||||||
People = new BaseItemPerson[] { };
|
People = Array.Empty<BaseItemPerson>();
|
||||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using MediaBrowser.Model.Dlna;
|
using MediaBrowser.Model.Dlna;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.MediaInfo
|
namespace MediaBrowser.Model.MediaInfo
|
||||||
|
|
|
@ -21,18 +21,6 @@ namespace MediaBrowser.Model.Notifications
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the title format string.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The title format string.</value>
|
|
||||||
public string Title { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the description.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The description.</value>
|
|
||||||
public string Description { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the disabled services.
|
/// Gets or sets the disabled services.
|
||||||
|
@ -48,9 +36,9 @@ namespace MediaBrowser.Model.Notifications
|
||||||
|
|
||||||
public NotificationOption()
|
public NotificationOption()
|
||||||
{
|
{
|
||||||
DisabledServices = new string[] {};
|
DisabledServices = Array.Empty<string>();
|
||||||
DisabledMonitorUsers = new string[] {};
|
DisabledMonitorUsers = Array.Empty<string>();
|
||||||
SendToUsers = new string[] {};
|
SendToUsers = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Notifications
|
namespace MediaBrowser.Model.Notifications
|
||||||
{
|
{
|
||||||
|
@ -22,8 +21,6 @@ namespace MediaBrowser.Model.Notifications
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string NotificationType { get; set; }
|
public string NotificationType { get; set; }
|
||||||
|
|
||||||
public Dictionary<string, string> Variables { get; set; }
|
|
||||||
|
|
||||||
public SendToUserType? SendToUserMode { get; set; }
|
public SendToUserType? SendToUserMode { get; set; }
|
||||||
|
|
||||||
public NotificationRequest()
|
public NotificationRequest()
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
namespace MediaBrowser.Model.Notifications
|
|
||||||
{
|
|
||||||
public class NotificationServiceInfo
|
|
||||||
{
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string Id { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Notifications
|
namespace MediaBrowser.Model.Notifications
|
||||||
{
|
{
|
||||||
|
@ -14,16 +13,5 @@ namespace MediaBrowser.Model.Notifications
|
||||||
public string Category { get; set; }
|
public string Category { get; set; }
|
||||||
|
|
||||||
public bool IsBasedOnUserEvent { get; set; }
|
public bool IsBasedOnUserEvent { get; set; }
|
||||||
|
|
||||||
public string DefaultTitle { get; set; }
|
|
||||||
|
|
||||||
public string DefaultDescription { get; set; }
|
|
||||||
|
|
||||||
public string[] Variables { get; set; }
|
|
||||||
|
|
||||||
public NotificationTypeInfo()
|
|
||||||
{
|
|
||||||
Variables = new string[] {};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Playlists
|
namespace MediaBrowser.Model.Playlists
|
||||||
{
|
{
|
||||||
public class PlaylistCreationRequest
|
public class PlaylistCreationRequest
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public Guid[] ItemIdList { get; set; }
|
public Guid[] ItemIdList { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ namespace MediaBrowser.Model.Providers
|
||||||
|
|
||||||
public SubtitleOptions()
|
public SubtitleOptions()
|
||||||
{
|
{
|
||||||
DownloadLanguages = new string[] {};
|
DownloadLanguages = Array.Empty<string>();
|
||||||
|
|
||||||
SkipIfAudioTrackMatches = true;
|
SkipIfAudioTrackMatches = true;
|
||||||
RequirePerfectMatch = true;
|
RequirePerfectMatch = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,10 +12,10 @@ namespace MediaBrowser.Model.Querying
|
||||||
|
|
||||||
public QueryFiltersLegacy()
|
public QueryFiltersLegacy()
|
||||||
{
|
{
|
||||||
Genres = new string[] {};
|
Genres = Array.Empty<string>();
|
||||||
Tags = new string[] {};
|
Tags = Array.Empty<string>();
|
||||||
OfficialRatings = new string[] {};
|
OfficialRatings = Array.Empty<string>();
|
||||||
Years = new int[] { };
|
Years = Array.Empty<int>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class QueryFilters
|
public class QueryFilters
|
||||||
|
@ -25,8 +25,8 @@ namespace MediaBrowser.Model.Querying
|
||||||
|
|
||||||
public QueryFilters()
|
public QueryFilters()
|
||||||
{
|
{
|
||||||
Tags = new string[] {};
|
Tags = Array.Empty<string>();
|
||||||
Genres = new NameGuidPair[] { };
|
Genres = Array.Empty<NameGuidPair>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,9 +57,9 @@ namespace MediaBrowser.Model.Search
|
||||||
IncludePeople = true;
|
IncludePeople = true;
|
||||||
IncludeStudios = true;
|
IncludeStudios = true;
|
||||||
|
|
||||||
MediaTypes = new string[] {};
|
MediaTypes = Array.Empty<string>();
|
||||||
IncludeItemTypes = new string[] {};
|
IncludeItemTypes = Array.Empty<string>();
|
||||||
ExcludeItemTypes = new string[] {};
|
ExcludeItemTypes = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,9 @@ namespace MediaBrowser.Model.Session
|
||||||
|
|
||||||
public ClientCapabilities()
|
public ClientCapabilities()
|
||||||
{
|
{
|
||||||
PlayableMediaTypes = new string[] {};
|
PlayableMediaTypes = Array.Empty<string>();
|
||||||
SupportedCommands = new string[] {};
|
SupportedCommands = Array.Empty<string>();
|
||||||
SupportsPersistentIdentifier = true;
|
SupportsPersistentIdentifier = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,117 +0,0 @@
|
||||||
using MediaBrowser.Model.Dto;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Session
|
|
||||||
{
|
|
||||||
public class SessionInfoDto
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the supported commands.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The supported commands.</value>
|
|
||||||
public string[] SupportedCommands { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the playable media types.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The playable media types.</value>
|
|
||||||
public string[] PlayableMediaTypes { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the id.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The id.</value>
|
|
||||||
public string Id { get; set; }
|
|
||||||
|
|
||||||
public string ServerId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the user id.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The user id.</value>
|
|
||||||
public string UserId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the user primary image tag.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The user primary image tag.</value>
|
|
||||||
public string UserPrimaryImageTag { get; set; }
|
|
||||||
|
|
||||||
public string RemoteEndPoint { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name of the user.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name of the user.</value>
|
|
||||||
public string UserName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the additional users present.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The additional users present.</value>
|
|
||||||
public SessionUserInfo[] AdditionalUsers { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the application version.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The application version.</value>
|
|
||||||
public string ApplicationVersion { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the type of the client.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The type of the client.</value>
|
|
||||||
public string Client { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the last activity date.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The last activity date.</value>
|
|
||||||
public DateTime LastActivityDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name of the device.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name of the device.</value>
|
|
||||||
public string DeviceName { get; set; }
|
|
||||||
|
|
||||||
public string DeviceType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the now playing item.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The now playing item.</value>
|
|
||||||
public BaseItemDto NowPlayingItem { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the device id.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The device id.</value>
|
|
||||||
public string DeviceId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the application icon URL.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The application icon URL.</value>
|
|
||||||
public string AppIconUrl { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether [supports remote control].
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if [supports remote control]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool SupportsRemoteControl { get; set; }
|
|
||||||
|
|
||||||
public PlayerStateInfo PlayState { get; set; }
|
|
||||||
|
|
||||||
public TranscodingInfo TranscodingInfo { get; set; }
|
|
||||||
|
|
||||||
public SessionInfoDto()
|
|
||||||
{
|
|
||||||
AdditionalUsers = new SessionUserInfo[] { };
|
|
||||||
|
|
||||||
PlayableMediaTypes = new string[] {};
|
|
||||||
SupportedCommands = new string[] {};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using MediaBrowser.Model.Sync;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Sync
|
namespace MediaBrowser.Model.Sync
|
||||||
{
|
{
|
||||||
|
@ -108,7 +106,7 @@ namespace MediaBrowser.Model.Sync
|
||||||
|
|
||||||
public SyncJob()
|
public SyncJob()
|
||||||
{
|
{
|
||||||
RequestedItemIds = new Guid[] { };
|
RequestedItemIds = Array.Empty<Guid>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ namespace MediaBrowser.Model.Users
|
||||||
public UserPolicy()
|
public UserPolicy()
|
||||||
{
|
{
|
||||||
EnableContentDeletion = true;
|
EnableContentDeletion = true;
|
||||||
EnableContentDeletionFromFolders = new string[] { };
|
EnableContentDeletionFromFolders = Array.Empty<string>();
|
||||||
|
|
||||||
EnableSyncTranscoding = true;
|
EnableSyncTranscoding = true;
|
||||||
EnableMediaConversion = true;
|
EnableMediaConversion = true;
|
||||||
|
@ -97,20 +97,20 @@ namespace MediaBrowser.Model.Users
|
||||||
|
|
||||||
EnableSharedDeviceControl = true;
|
EnableSharedDeviceControl = true;
|
||||||
|
|
||||||
BlockedTags = new string[] { };
|
BlockedTags = Array.Empty<string>();
|
||||||
BlockUnratedItems = new UnratedItem[] { };
|
BlockUnratedItems = Array.Empty<UnratedItem>();
|
||||||
|
|
||||||
EnableUserPreferenceAccess = true;
|
EnableUserPreferenceAccess = true;
|
||||||
|
|
||||||
AccessSchedules = new AccessSchedule[] { };
|
AccessSchedules = Array.Empty<AccessSchedule>();
|
||||||
|
|
||||||
EnableAllChannels = true;
|
EnableAllChannels = true;
|
||||||
EnabledChannels = new string[] { };
|
EnabledChannels = Array.Empty<string>();
|
||||||
|
|
||||||
EnableAllFolders = true;
|
EnableAllFolders = true;
|
||||||
EnabledFolders = new string[] { };
|
EnabledFolders = Array.Empty<string>();
|
||||||
|
|
||||||
EnabledDevices = new string[] { };
|
EnabledDevices = Array.Empty<string>();
|
||||||
EnableAllDevices = true;
|
EnableAllDevices = true;
|
||||||
|
|
||||||
EnableContentDownloading = true;
|
EnableContentDownloading = true;
|
||||||
|
@ -118,4 +118,4 @@ namespace MediaBrowser.Model.Users
|
||||||
EnableRemoteAccess = true;
|
EnableRemoteAccess = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,11 @@
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Controller.Chapters;
|
||||||
using MediaBrowser.Common.Extensions;
|
|
||||||
using MediaBrowser.Controller.Chapters;
|
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
using MediaBrowser.Controller.Providers;
|
|
||||||
using MediaBrowser.Model.Configuration;
|
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Providers.Chapters
|
namespace MediaBrowser.Providers.Chapters
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue