ReSharper Reformat: Properties to expression bodied form.

This commit is contained in:
Erwin de Haan
2019-01-13 21:31:14 +01:00
parent 9fa60ec934
commit a36658f6f0
185 changed files with 782 additions and 3786 deletions

View File

@@ -31,19 +31,10 @@ namespace MediaBrowser.Controller.Channels
}
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override SourceType SourceType
{
get { return SourceType.Channel; }
}
public override SourceType SourceType => SourceType.Channel;
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
{

View File

@@ -24,10 +24,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool IsPhysicalRoot
{
get { return true; }
}
public override bool IsPhysicalRoot => true;
public override bool CanDelete()
{
@@ -35,13 +32,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
/// <summary>
/// The _virtual children
@@ -52,19 +43,10 @@ namespace MediaBrowser.Controller.Entities
/// Gets the virtual children.
/// </summary>
/// <value>The virtual children.</value>
public ConcurrentBag<BaseItem> VirtualChildren
{
get { return _virtualChildren; }
}
public ConcurrentBag<BaseItem> VirtualChildren => _virtualChildren;
[IgnoreDataMember]
public override string[] PhysicalLocations
{
get
{
return PhysicalLocationsList;
}
}
public override string[] PhysicalLocations => PhysicalLocationsList;
public string[] PhysicalLocationsList { get; set; }

View File

@@ -41,49 +41,22 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
public override bool SupportsPlayedStatus => true;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return false; }
}
public override bool SupportsPeople => false;
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get { return true; }
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
protected override bool SupportsOwnedItems
{
get
{
return false;
}
}
protected override bool SupportsOwnedItems => false;
[IgnoreDataMember]
public override Folder LatestItemsIndexContainer
{
get
{
return AlbumEntity;
}
}
public override Folder LatestItemsIndexContainer => AlbumEntity;
public override bool CanDownload()
{
@@ -115,23 +88,14 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public MusicAlbum AlbumEntity
{
get { return FindParent<MusicAlbum>(); }
}
public MusicAlbum AlbumEntity => FindParent<MusicAlbum>();
/// <summary>
/// Gets the type of the media.
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public override string MediaType
{
get
{
return Model.Entities.MediaType.Audio;
}
}
public override string MediaType => Model.Entities.MediaType.Audio;
/// <summary>
/// Creates the name of the sort.

View File

@@ -28,22 +28,13 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get { return true; }
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public MusicArtist MusicArtist
{
get { return GetMusicArtist(new DtoOptions(true)); }
}
public MusicArtist MusicArtist => GetMusicArtist(new DtoOptions(true));
public MusicArtist GetMusicArtist(DtoOptions options)
{
@@ -66,22 +57,10 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsCumulativeRunTimeTicks
{
get
{
return true;
}
}
public override bool SupportsCumulativeRunTimeTicks => true;
[IgnoreDataMember]
public string[] AllArtists
@@ -107,29 +86,17 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public string AlbumArtist
{
get { return AlbumArtists.Length == 0 ? null : AlbumArtists[0]; }
}
public string AlbumArtist => AlbumArtists.Length == 0 ? null : AlbumArtists[0];
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return false; }
}
public override bool SupportsPeople => false;
/// <summary>
/// Gets the tracks.
/// </summary>
/// <value>The tracks.</value>
[IgnoreDataMember]
public IEnumerable<BaseItem> Tracks
{
get
{
return GetRecursiveChildren(i => i is Audio);
}
}
public IEnumerable<BaseItem> Tracks => GetRecursiveChildren(i => i is Audio);
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
{

View File

@@ -19,61 +19,25 @@ namespace MediaBrowser.Controller.Entities.Audio
public class MusicArtist : Folder, IItemByName, IHasMusicGenres, IHasDualAccess, IHasLookupInfo<ArtistInfo>
{
[IgnoreDataMember]
public bool IsAccessedByName
{
get { return ParentId.Equals(Guid.Empty); }
}
public bool IsAccessedByName => ParentId.Equals(Guid.Empty);
[IgnoreDataMember]
public override bool IsFolder
{
get
{
return !IsAccessedByName;
}
}
public override bool IsFolder => !IsAccessedByName;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsCumulativeRunTimeTicks
{
get
{
return true;
}
}
public override bool SupportsCumulativeRunTimeTicks => true;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -154,13 +118,7 @@ namespace MediaBrowser.Controller.Entities.Audio
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
/// <summary>
/// Gets the user data key.
@@ -207,13 +165,7 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@@ -24,28 +24,13 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
/// <summary>
/// Returns the folder containing the item.
@@ -53,13 +38,7 @@ namespace MediaBrowser.Controller.Entities.Audio
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -77,13 +56,7 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public IList<BaseItem> GetTaggedItems(InternalItemsQuery query)
{

View File

@@ -8,22 +8,10 @@ namespace MediaBrowser.Controller.Entities
public class AudioBook : Audio.Audio, IHasSeries, IHasLookupInfo<SongInfo>
{
[IgnoreDataMember]
public override bool SupportsPositionTicksResume
{
get
{
return true;
}
}
public override bool SupportsPositionTicksResume => true;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
public override bool SupportsPlayedStatus => true;
[IgnoreDataMember]
public string SeriesPresentationUniqueKey { get; set; }

View File

@@ -108,19 +108,10 @@ namespace MediaBrowser.Controller.Entities
public Guid ChannelId { get; set; }
[IgnoreDataMember]
public virtual bool SupportsAddingToPlaylist
{
get
{
return false;
}
}
public virtual bool SupportsAddingToPlaylist => false;
[IgnoreDataMember]
public virtual bool AlwaysScanInternalMetadataPath
{
get { return false; }
}
public virtual bool AlwaysScanInternalMetadataPath => false;
/// <summary>
/// Gets a value indicating whether this instance is in mixed folder.
@@ -130,31 +121,13 @@ namespace MediaBrowser.Controller.Entities
public bool IsInMixedFolder { get; set; }
[IgnoreDataMember]
public virtual bool SupportsPlayedStatus
{
get
{
return false;
}
}
public virtual bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public virtual bool SupportsPositionTicksResume
{
get
{
return false;
}
}
public virtual bool SupportsPositionTicksResume => false;
[IgnoreDataMember]
public virtual bool SupportsRemoteImageDownloading
{
get
{
return true;
}
}
public virtual bool SupportsRemoteImageDownloading => true;
private string _name;
/// <summary>
@@ -164,10 +137,7 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public virtual string Name
{
get
{
return _name;
}
get => _name;
set
{
_name = value;
@@ -178,10 +148,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public bool IsUnaired
{
get { return PremiereDate.HasValue && PremiereDate.Value.ToLocalTime().Date >= DateTime.Now.Date; }
}
public bool IsUnaired => PremiereDate.HasValue && PremiereDate.Value.ToLocalTime().Date >= DateTime.Now.Date;
[IgnoreDataMember]
public int? TotalBitrate { get; set; }
@@ -189,13 +156,7 @@ namespace MediaBrowser.Controller.Entities
public ExtraType? ExtraType { get; set; }
[IgnoreDataMember]
public bool IsThemeMedia
{
get
{
return ExtraType.HasValue && (ExtraType.Value == Model.Entities.ExtraType.ThemeSong || ExtraType.Value == Model.Entities.ExtraType.ThemeVideo);
}
}
public bool IsThemeMedia => ExtraType.HasValue && (ExtraType.Value == Model.Entities.ExtraType.ThemeSong || ExtraType.Value == Model.Entities.ExtraType.ThemeVideo);
[IgnoreDataMember]
public string OriginalTitle { get; set; }
@@ -295,13 +256,7 @@ namespace MediaBrowser.Controller.Entities
public string ExternalEtag { get; set; }
[IgnoreDataMember]
public virtual bool IsHidden
{
get
{
return false;
}
}
public virtual bool IsHidden => false;
public BaseItem GetOwner()
{
@@ -362,22 +317,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public bool IsFileProtocol
{
get
{
return IsPathProtocol(MediaProtocol.File);
}
}
public bool IsFileProtocol => IsPathProtocol(MediaProtocol.File);
[IgnoreDataMember]
public bool HasPathProtocol
{
get
{
return PathProtocol.HasValue;
}
}
public bool HasPathProtocol => PathProtocol.HasValue;
[IgnoreDataMember]
public virtual bool SupportsLocalMetadata
@@ -408,13 +351,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public virtual bool EnableAlphaNumericSorting
{
get
{
return true;
}
}
public virtual bool EnableAlphaNumericSorting => true;
private List<Tuple<StringBuilder, bool>> GetSortChunks(string s1)
{
@@ -455,10 +392,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The primary image path.</value>
[IgnoreDataMember]
public string PrimaryImagePath
{
get { return this.GetImagePath(ImageType.Primary); }
}
public string PrimaryImagePath => this.GetImagePath(ImageType.Primary);
public bool IsMetadataFetcherEnabled(LibraryOptions libraryOptions, string name)
{
@@ -637,13 +571,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public virtual string MediaType
{
get
{
return null;
}
}
public virtual string MediaType => null;
[IgnoreDataMember]
public virtual string[] PhysicalLocations
@@ -667,7 +595,7 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public string ForcedSortName
{
get { return _forcedSortName; }
get => _forcedSortName;
set { _forcedSortName = value; _sortName = null; }
}
@@ -695,10 +623,7 @@ namespace MediaBrowser.Controller.Entities
}
return _sortName;
}
set
{
_sortName = value;
}
set => _sortName = value;
}
public string GetInternalMetadataPath()
@@ -816,7 +741,7 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public Folder Parent
{
get { return GetParent() as Folder; }
get => GetParent() as Folder;
set
{
@@ -1007,10 +932,7 @@ namespace MediaBrowser.Controller.Entities
public int? ParentIndexNumber { get; set; }
[IgnoreDataMember]
public virtual bool HasLocalAlternateVersions
{
get { return false; }
}
public virtual bool HasLocalAlternateVersions => false;
[IgnoreDataMember]
public string OfficialRatingForComparison
@@ -1426,22 +1348,13 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected virtual bool SupportsOwnedItems
{
get { return !ParentId.Equals(Guid.Empty) && IsFileProtocol; }
}
protected virtual bool SupportsOwnedItems => !ParentId.Equals(Guid.Empty) && IsFileProtocol;
[IgnoreDataMember]
public virtual bool SupportsPeople
{
get { return false; }
}
public virtual bool SupportsPeople => false;
[IgnoreDataMember]
public virtual bool SupportsThemeMedia
{
get { return false; }
}
public virtual bool SupportsThemeMedia => false;
/// <summary>
/// Refreshes owned items such as trailers, theme videos, special features, etc.
@@ -1602,10 +1515,7 @@ namespace MediaBrowser.Controller.Entities
public Dictionary<string, string> ProviderIds { get; set; }
[IgnoreDataMember]
public virtual Folder LatestItemsIndexContainer
{
get { return null; }
}
public virtual Folder LatestItemsIndexContainer => null;
public virtual double GetDefaultPrimaryImageAspectRatio()
{
@@ -1923,10 +1833,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public virtual bool SupportsInheritedParentImages
{
get { return false; }
}
public virtual bool SupportsInheritedParentImages => false;
protected bool IsVisibleStandaloneInternal(User user, bool checkFolders)
{
@@ -1969,22 +1876,10 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public virtual bool IsFolder
{
get
{
return false;
}
}
public virtual bool IsFolder => false;
[IgnoreDataMember]
public virtual bool IsDisplayedAsFolder
{
get
{
return false;
}
}
public virtual bool IsDisplayedAsFolder => false;
public virtual string GetClientTypeName()
{
@@ -2070,13 +1965,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public virtual bool EnableRememberingTrackSelections
{
get
{
return true;
}
}
public virtual bool EnableRememberingTrackSelections => true;
/// <summary>
/// Adds a studio to the item
@@ -2813,22 +2702,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public virtual bool SupportsAncestors
{
get
{
return true;
}
}
public virtual bool SupportsAncestors => true;
[IgnoreDataMember]
public virtual bool StopRefreshIfLocalMetadataFound
{
get
{
return true;
}
}
public virtual bool StopRefreshIfLocalMetadataFound => true;
public virtual IEnumerable<Guid> GetIdsForAncestorQuery()
{
@@ -2915,13 +2792,7 @@ namespace MediaBrowser.Controller.Entities
return GetExtras();
}
public virtual bool IsHD
{
get
{
return Height >= 720;
}
}
public virtual bool IsHD => Height >= 720;
public bool IsShortcut { get; set; }
public string ShortcutPath { get; set; }
public int Width { get; set; }
@@ -2933,12 +2804,6 @@ namespace MediaBrowser.Controller.Entities
}
// what does this do?
public static ExtraType[] DisplayExtraTypes = new[] { Model.Entities.ExtraType.ThemeSong, Model.Entities.ExtraType.ThemeVideo };
public virtual bool SupportsExternalTransfer
{
get
{
return false;
}
}
public virtual bool SupportsExternalTransfer => false;
}
}

View File

@@ -10,10 +10,7 @@ namespace MediaBrowser.Controller.Entities
public abstract class BasePluginFolder : Folder, ICollectionFolder
{
[IgnoreDataMember]
public virtual string CollectionType
{
get { return null; }
}
public virtual string CollectionType => null;
public override bool CanDelete()
{
@@ -26,22 +23,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
//public override double? GetDefaultPrimaryImageAspectRatio()
//{

View File

@@ -9,13 +9,7 @@ namespace MediaBrowser.Controller.Entities
public class Book : BaseItem, IHasLookupInfo<BookInfo>, IHasSeries
{
[IgnoreDataMember]
public override string MediaType
{
get
{
return Model.Entities.MediaType.Book;
}
}
public override string MediaType => Model.Entities.MediaType.Book;
[IgnoreDataMember]
public string SeriesPresentationUniqueKey { get; set; }

View File

@@ -34,22 +34,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
public override bool CanDelete()
{
@@ -158,22 +146,10 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The display prefs id.</value>
[IgnoreDataMember]
public override Guid DisplayPreferencesId
{
get
{
return Id;
}
}
public override Guid DisplayPreferencesId => Id;
[IgnoreDataMember]
public override string[] PhysicalLocations
{
get
{
return PhysicalLocationsList;
}
}
public override string[] PhysicalLocations => PhysicalLocationsList;
public override bool IsSaveLocalMetadataEnabled()
{
@@ -337,10 +313,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The actual children.</value>
[IgnoreDataMember]
public override IEnumerable<BaseItem> Children
{
get { return GetActualChildren(); }
}
public override IEnumerable<BaseItem> Children => GetActualChildren();
public IEnumerable<BaseItem> GetActualChildren()
{
@@ -386,12 +359,6 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
}
}

View File

@@ -47,80 +47,35 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsThemeMedia
{
get { return true; }
}
public override bool SupportsThemeMedia => true;
[IgnoreDataMember]
public virtual bool IsPreSorted
{
get { return false; }
}
public virtual bool IsPreSorted => false;
[IgnoreDataMember]
public virtual bool IsPhysicalRoot
{
get { return false; }
}
public virtual bool IsPhysicalRoot => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return true;
}
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
public override bool SupportsPlayedStatus => true;
/// <summary>
/// Gets a value indicating whether this instance is folder.
/// </summary>
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public override bool IsFolder
{
get
{
return true;
}
}
public override bool IsFolder => true;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
[IgnoreDataMember]
public virtual bool SupportsCumulativeRunTimeTicks
{
get
{
return false;
}
}
public virtual bool SupportsCumulativeRunTimeTicks => false;
[IgnoreDataMember]
public virtual bool SupportsDateLastMediaAdded
{
get
{
return false;
}
}
public virtual bool SupportsDateLastMediaAdded => false;
public override bool CanDelete()
{
@@ -172,10 +127,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected virtual bool SupportsShortcutChildren
{
get { return false; }
}
protected virtual bool SupportsShortcutChildren => false;
/// <summary>
/// Adds the child.
@@ -210,23 +162,14 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The actual children.</value>
[IgnoreDataMember]
public virtual IEnumerable<BaseItem> Children
{
get
{
return LoadChildren();
}
}
public virtual IEnumerable<BaseItem> Children => LoadChildren();
/// <summary>
/// thread-safe access to all recursive children of this folder - without regard to user
/// </summary>
/// <value>The recursive children.</value>
[IgnoreDataMember]
public IEnumerable<BaseItem> RecursiveChildren
{
get { return GetRecursiveChildren(); }
}
public IEnumerable<BaseItem> RecursiveChildren => GetRecursiveChildren();
public override bool IsVisible(User user)
{
@@ -1421,13 +1364,7 @@ namespace MediaBrowser.Controller.Entities
return list;
}
protected virtual bool FilterLinkedChildrenPerUser
{
get
{
return false;
}
}
protected virtual bool FilterLinkedChildrenPerUser => false;
public bool ContainsLinkedChildByItemId(Guid itemId)
{
@@ -1524,13 +1461,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected override bool SupportsOwnedItems
{
get
{
return base.SupportsOwnedItems || SupportsShortcutChildren;
}
}
protected override bool SupportsOwnedItems => base.SupportsOwnedItems || SupportsShortcutChildren;
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
{

View File

@@ -27,26 +27,17 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsThemeMedia
{
get { return true; }
}
public override bool SupportsThemeMedia => true;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return false; }
}
public override bool SupportsPeople => false;
/// <summary>
/// Gets the type of the media.
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public override string MediaType
{
get { return Model.Entities.MediaType.Game; }
}
public override string MediaType => Model.Entities.MediaType.Game;
/// <summary>
/// Gets or sets the players supported.

View File

@@ -32,22 +32,10 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public override bool IsSaveLocalMetadataEnabled()
{
@@ -68,13 +56,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@@ -18,31 +18,13 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The display prefs id.</value>
[IgnoreDataMember]
public override Guid DisplayPreferencesId
{
get
{
return Id;
}
}
public override Guid DisplayPreferencesId => Id;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -90,12 +72,6 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
}
}

View File

@@ -35,31 +35,13 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public override bool IsSaveLocalMetadataEnabled()
{
@@ -80,13 +62,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@@ -25,28 +25,13 @@ namespace MediaBrowser.Controller.Entities.Movies
}
[IgnoreDataMember]
protected override bool FilterLinkedChildrenPerUser
{
get
{
return true;
}
}
protected override bool FilterLinkedChildrenPerUser => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
public Guid[] LocalTrailerIds { get; set; }
public Guid[] RemoteTrailerIds { get; set; }
@@ -110,13 +95,7 @@ namespace MediaBrowser.Controller.Entities.Movies
}
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
public override bool IsAuthorizedToDelete(User user, List<Folder> allCollectionFolders)
{

View File

@@ -39,8 +39,8 @@ namespace MediaBrowser.Controller.Entities.Movies
[IgnoreDataMember]
public string CollectionName
{
get { return TmdbCollectionName; }
set { TmdbCollectionName = value; }
get => TmdbCollectionName;
set => TmdbCollectionName = value;
}
public override double GetDefaultPrimaryImageAspectRatio()
@@ -184,13 +184,6 @@ namespace MediaBrowser.Controller.Entities.Movies
}
[IgnoreDataMember]
public override bool StopRefreshIfLocalMetadataFound
{
get
{
// Need people id's from internet metadata
return false;
}
}
public override bool StopRefreshIfLocalMetadataFound => false;
}
}

View File

@@ -17,13 +17,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public string[] AllArtists
{
get
{
return Artists;
}
}
public string[] AllArtists => Artists;
public override UnratedItem GetBlockUnratedType()
{

View File

@@ -51,13 +51,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
public override bool CanDelete()
{
@@ -70,31 +64,13 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool EnableAlphaNumericSorting
{
get
{
return false;
}
}
public override bool EnableAlphaNumericSorting => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public static string GetPath(string name)
{

View File

@@ -6,31 +6,13 @@ namespace MediaBrowser.Controller.Entities
public class Photo : BaseItem
{
[IgnoreDataMember]
public override bool SupportsLocalMetadata
{
get
{
return false;
}
}
public override bool SupportsLocalMetadata => false;
[IgnoreDataMember]
public override string MediaType
{
get
{
return Model.Entities.MediaType.Photo;
}
}
public override string MediaType => Model.Entities.MediaType.Photo;
[IgnoreDataMember]
public override Folder LatestItemsIndexContainer
{
get
{
return AlbumEntity;
}
}
public override Folder LatestItemsIndexContainer => AlbumEntity;
[IgnoreDataMember]

View File

@@ -5,30 +5,12 @@ namespace MediaBrowser.Controller.Entities
public class PhotoAlbum : Folder
{
[IgnoreDataMember]
public override bool AlwaysScanInternalMetadataPath
{
get
{
return true;
}
}
public override bool AlwaysScanInternalMetadataPath => true;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
}
}

View File

@@ -29,31 +29,13 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -81,13 +63,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@@ -47,61 +47,25 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
protected override bool SupportsOwnedItems
{
get
{
return IsStacked || MediaSourceCount > 1;
}
}
protected override bool SupportsOwnedItems => IsStacked || MediaSourceCount > 1;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get { return true; }
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
[IgnoreDataMember]
public int? AiredSeasonNumber
{
get
{
return AirsAfterSeasonNumber ?? AirsBeforeSeasonNumber ?? ParentIndexNumber;
}
}
public int? AiredSeasonNumber => AirsAfterSeasonNumber ?? AirsBeforeSeasonNumber ?? ParentIndexNumber;
[IgnoreDataMember]
public override Folder LatestItemsIndexContainer
{
get
{
return Series;
}
}
public override Folder LatestItemsIndexContainer => Series;
[IgnoreDataMember]
public override Guid DisplayParentId
{
get
{
return SeasonId;
}
}
public override Guid DisplayParentId => SeasonId;
[IgnoreDataMember]
protected override bool EnableDefaultVideoUserDataKeys
{
get
{
return false;
}
}
protected override bool EnableDefaultVideoUserDataKeys => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -166,13 +130,7 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
public bool IsInSeasonFolder
{
get
{
return FindParent<Season>() != null;
}
}
public bool IsInSeasonFolder => FindParent<Season>() != null;
[IgnoreDataMember]
public string SeriesPresentationUniqueKey { get; set; }
@@ -278,13 +236,7 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
public bool IsMissingEpisode
{
get
{
return LocationType == LocationType.Virtual;
}
}
public bool IsMissingEpisode => LocationType == LocationType.Virtual;
[IgnoreDataMember]
public Guid SeasonId { get; set; }

View File

@@ -16,46 +16,22 @@ namespace MediaBrowser.Controller.Entities.TV
public class Season : Folder, IHasSeries, IHasLookupInfo<SeasonInfo>
{
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
[IgnoreDataMember]
public override bool SupportsDateLastMediaAdded
{
get
{
return false;
}
}
public override bool SupportsDateLastMediaAdded => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get { return true; }
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public override Guid DisplayParentId
{
get { return SeriesId; }
}
public override Guid DisplayParentId => SeriesId;
public override double GetDefaultPrimaryImageAspectRatio()
{

View File

@@ -32,43 +32,19 @@ namespace MediaBrowser.Controller.Entities.TV
public string AirTime { get; set; }
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
[IgnoreDataMember]
public override bool SupportsDateLastMediaAdded
{
get
{
return true;
}
}
public override bool SupportsDateLastMediaAdded => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
public Guid[] LocalTrailerIds { get; set; }
public Guid[] RemoteTrailerIds { get; set; }
@@ -526,13 +502,6 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
public override bool StopRefreshIfLocalMetadataFound
{
get
{
// Need people id's from internet metadata
return false;
}
}
public override bool StopRefreshIfLocalMetadataFound => false;
}
}

View File

@@ -94,13 +94,6 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool StopRefreshIfLocalMetadataFound
{
get
{
// Need people id's from internet metadata
return false;
}
}
public override bool StopRefreshIfLocalMetadataFound => false;
}
}

View File

@@ -40,14 +40,8 @@ namespace MediaBrowser.Controller.Entities
// Strictly to remove IgnoreDataMember
public override ItemImageInfo[] ImageInfos
{
get
{
return base.ImageInfos;
}
set
{
base.ImageInfos = value;
}
get => base.ImageInfos;
set => base.ImageInfos = value;
}
/// <summary>
@@ -57,15 +51,8 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public override string Path
{
get
{
// Return this so that metadata providers will look in here
return ConfigurationDirectoryPath;
}
set
{
base.Path = value;
}
get => ConfigurationDirectoryPath;
set => base.Path = value;
}
private string _name;
@@ -75,10 +62,7 @@ namespace MediaBrowser.Controller.Entities
/// <value>The name.</value>
public override string Name
{
get
{
return _name;
}
get => _name;
set
{
_name = value;
@@ -94,26 +78,14 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
/// <summary>
/// Gets the root folder.
/// </summary>
/// <value>The root folder.</value>
[IgnoreDataMember]
public Folder RootFolder
{
get
{
return LibraryManager.GetUserRootFolder();
}
}
public Folder RootFolder => LibraryManager.GetUserRootFolder();
/// <summary>
/// Gets or sets the last login date.
@@ -146,7 +118,7 @@ namespace MediaBrowser.Controller.Entities
return _config;
}
set { _config = value; }
set => _config = value;
}
private volatile UserPolicy _policy;
@@ -169,7 +141,7 @@ namespace MediaBrowser.Controller.Entities
return _policy;
}
set { _policy = value; }
set => _policy = value;
}
/// <summary>
@@ -232,13 +204,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The configuration directory path.</value>
[IgnoreDataMember]
public string ConfigurationDirectoryPath
{
get
{
return GetConfigurationDirectoryPath(Name);
}
}
public string ConfigurationDirectoryPath => GetConfigurationDirectoryPath(Name);
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -327,13 +293,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public long InternalId { get; set; }

View File

@@ -31,10 +31,7 @@ namespace MediaBrowser.Controller.Entities
/// <exception cref="System.ArgumentOutOfRangeException">Rating;A 0 to 10 rating is required for UserItemData.</exception>
public double? Rating
{
get
{
return _rating;
}
get => _rating;
set
{
if (value.HasValue)

View File

@@ -34,22 +34,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
private void ClearCache()
{
@@ -88,22 +76,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected override bool SupportsShortcutChildren
{
get
{
return true;
}
}
protected override bool SupportsShortcutChildren => true;
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
{

View File

@@ -20,13 +20,7 @@ namespace MediaBrowser.Controller.Entities
public static IPlaylistManager PlaylistManager;
[IgnoreDataMember]
public string CollectionType
{
get
{
return ViewType;
}
}
public string CollectionType => ViewType;
public override IEnumerable<Guid> GetIdsForAncestorQuery()
{
@@ -48,22 +42,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
public override int GetChildCount(User user)
{
@@ -188,12 +170,6 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
}
}

View File

@@ -33,28 +33,13 @@ namespace MediaBrowser.Controller.Entities
public LinkedChild[] LinkedAlternateVersions { get; set; }
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
public override bool SupportsPlayedStatus => true;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return true;
}
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public override bool SupportsPositionTicksResume
@@ -106,10 +91,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsThemeMedia
{
get { return true; }
}
public override bool SupportsThemeMedia => true;
/// <summary>
/// Gets or sets the timestamp.
@@ -199,10 +181,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public int MediaSourceCount
@@ -222,16 +201,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public bool IsStacked
{
get { return AdditionalParts.Length > 0; }
}
public bool IsStacked => AdditionalParts.Length > 0;
[IgnoreDataMember]
public override bool HasLocalAlternateVersions
{
get { return LocalAlternateVersions.Length > 0; }
}
public override bool HasLocalAlternateVersions => LocalAlternateVersions.Length > 0;
public IEnumerable<Guid> GetAdditionalPartIds()
{
@@ -289,13 +262,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected virtual bool EnableDefaultVideoUserDataKeys
{
get
{
return true;
}
}
protected virtual bool EnableDefaultVideoUserDataKeys => true;
public override List<string> GetUserDataKeys()
{
@@ -466,23 +433,14 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value><c>true</c> if [is3 D]; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool Is3D
{
get { return Video3DFormat.HasValue; }
}
public bool Is3D => Video3DFormat.HasValue;
/// <summary>
/// Gets the type of the media.
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public override string MediaType
{
get
{
return Model.Entities.MediaType.Video;
}
}
public override string MediaType => Model.Entities.MediaType.Video;
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
{

View File

@@ -25,13 +25,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -42,13 +36,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public override bool CanDelete()
{
@@ -89,13 +77,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@@ -67,13 +67,7 @@ namespace MediaBrowser.Controller.Library
/// Gets a value indicating whether this instance is directory.
/// </summary>
/// <value><c>true</c> if this instance is directory; otherwise, <c>false</c>.</value>
public bool IsDirectory
{
get
{
return FileInfo.IsDirectory;
}
}
public bool IsDirectory => FileInfo.IsDirectory;
/// <summary>
/// Gets a value indicating whether this instance is vf.
@@ -103,13 +97,7 @@ namespace MediaBrowser.Controller.Library
/// Gets a value indicating whether this instance is physical root.
/// </summary>
/// <value><c>true</c> if this instance is physical root; otherwise, <c>false</c>.</value>
public bool IsPhysicalRoot
{
get
{
return IsDirectory && BaseItem.FileSystem.AreEqual(Path, _appPaths.RootFolderPath);
}
}
public bool IsPhysicalRoot => IsDirectory && BaseItem.FileSystem.AreEqual(Path, _appPaths.RootFolderPath);
/// <summary>
/// Gets or sets the additional locations.

View File

@@ -32,28 +32,13 @@ namespace MediaBrowser.Controller.LiveTv
}
[IgnoreDataMember]
public override bool SupportsPositionTicksResume
{
get
{
return false;
}
}
public override bool SupportsPositionTicksResume => false;
[IgnoreDataMember]
public override SourceType SourceType
{
get { return SourceType.LiveTV; }
}
public override SourceType SourceType => SourceType.LiveTV;
[IgnoreDataMember]
public override bool EnableRememberingTrackSelections
{
get
{
return false;
}
}
public override bool EnableRememberingTrackSelections => false;
/// <summary>
/// Gets or sets the number.
@@ -68,14 +53,7 @@ namespace MediaBrowser.Controller.LiveTv
public ChannelType ChannelType { get; set; }
[IgnoreDataMember]
public override LocationType LocationType
{
get
{
// TODO: This should be removed
return LocationType.Remote;
}
}
public override LocationType LocationType => LocationType.Remote;
protected override string CreateSortName()
{
@@ -93,13 +71,7 @@ namespace MediaBrowser.Controller.LiveTv
}
[IgnoreDataMember]
public override string MediaType
{
get
{
return ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video;
}
}
public override string MediaType => ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video;
public override string GetClientTypeName()
{
@@ -176,13 +148,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsKids
{
get
{
return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
[IgnoreDataMember]
public bool IsRepeat { get; set; }

View File

@@ -63,10 +63,7 @@ namespace MediaBrowser.Controller.LiveTv
}
[IgnoreDataMember]
public override SourceType SourceType
{
get { return SourceType.LiveTV; }
}
public override SourceType SourceType => SourceType.LiveTV;
/// <summary>
/// The start date of the program, in UTC.
@@ -103,13 +100,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsSports
{
get
{
return Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Gets or sets a value indicating whether this instance is series.
@@ -123,52 +114,28 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsLive
{
get
{
return Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Gets or sets a value indicating whether this instance is news.
/// </summary>
/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsNews
{
get
{
return Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Gets or sets a value indicating whether this instance is kids.
/// </summary>
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsKids
{
get
{
return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Gets or sets a value indicating whether this instance is premiere.
/// </summary>
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsPremiere
{
get
{
return Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Returns the folder containing the item.
@@ -176,13 +143,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
//[IgnoreDataMember]
//public override string MediaType
@@ -251,13 +212,7 @@ namespace MediaBrowser.Controller.LiveTv
}
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
private LiveTvOptions GetConfiguration()
{

View File

@@ -115,27 +115,11 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The episode number.</value>
public int? EpisodeNumber { get; set; }
public bool IsMovie { get; set; }
public bool IsKids
{
get
{
return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsSports
{
get
{
return Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsNews
{
get
{
return Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
public bool IsSeries { get; set; }
/// <summary>
@@ -143,22 +127,10 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsLive
{
get
{
return Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
[IgnoreDataMember]
public bool IsPremiere
{
get
{
return Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
public int? ProductionYear { get; set; }
public string EpisodeTitle { get; set; }

View File

@@ -61,53 +61,17 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
public bool IgnoreInputDts
{
get
{
return MediaSource.IgnoreDts;
}
}
public bool IgnoreInputDts => MediaSource.IgnoreDts;
public bool IgnoreInputIndex
{
get
{
return MediaSource.IgnoreIndex;
}
}
public bool IgnoreInputIndex => MediaSource.IgnoreIndex;
public bool GenPtsInput
{
get
{
return MediaSource.GenPtsInput;
}
}
public bool GenPtsInput => MediaSource.GenPtsInput;
public bool DiscardCorruptFramesInput
{
get
{
return false;
}
}
public bool DiscardCorruptFramesInput => false;
public bool EnableFastSeekInput
{
get
{
return false;
}
}
public bool EnableFastSeekInput => false;
public bool GenPtsOutput
{
get
{
return false;
}
}
public bool GenPtsOutput => false;
public string OutputContainer { get; set; }
@@ -142,15 +106,9 @@ namespace MediaBrowser.Controller.MediaEncoding
public BaseEncodingJobOptions BaseRequest { get; set; }
public long? StartTimeTicks
{
get { return BaseRequest.StartTimeTicks; }
}
public long? StartTimeTicks => BaseRequest.StartTimeTicks;
public bool CopyTimestamps
{
get { return BaseRequest.CopyTimestamps; }
}
public bool CopyTimestamps => BaseRequest.CopyTimestamps;
public int? OutputAudioBitrate;
public int? OutputAudioChannels;
@@ -323,13 +281,7 @@ namespace MediaBrowser.Controller.MediaEncoding
SupportedSubtitleCodecs = Array.Empty<string>();
}
public bool IsSegmentedLiveStream
{
get
{
return TranscodingType != TranscodingJobType.Progressive && !RunTimeTicks.HasValue;
}
}
public bool IsSegmentedLiveStream => TranscodingType != TranscodingJobType.Progressive && !RunTimeTicks.HasValue;
public bool EnableBreakOnNonKeyFrames(string videoCodec)
{
@@ -346,13 +298,7 @@ namespace MediaBrowser.Controller.MediaEncoding
return false;
}
public int? TotalOutputBitrate
{
get
{
return (OutputAudioBitrate ?? 0) + (OutputVideoBitrate ?? 0);
}
}
public int? TotalOutputBitrate => (OutputAudioBitrate ?? 0) + (OutputVideoBitrate ?? 0);
public int? OutputWidth
{

View File

@@ -20,13 +20,7 @@ namespace MediaBrowser.Controller.MediaEncoding
/// Gets a value indicating whether this instance has fixed resolution.
/// </summary>
/// <value><c>true</c> if this instance has fixed resolution; otherwise, <c>false</c>.</value>
public bool HasFixedResolution
{
get
{
return Width.HasValue || Height.HasValue;
}
}
public bool HasFixedResolution => Width.HasValue || Height.HasValue;
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
public EncodingJobOptions(StreamInfo info, DeviceProfile deviceProfile)

View File

@@ -44,10 +44,7 @@ namespace MediaBrowser.Controller.Net
/// &gt;0 Executed after global request filters
/// </summary>
/// <value>The priority.</value>
public int Priority
{
get { return 0; }
}
public int Priority => 0;
public string[] GetRoles()
{

View File

@@ -9,13 +9,7 @@ namespace MediaBrowser.Controller.Net
/// Gets or sets the user identifier.
/// </summary>
/// <value>The user identifier.</value>
public Guid UserId
{
get
{
return User == null ? Guid.Empty : User.Id;
}
}
public Guid UserId => User == null ? Guid.Empty : User.Id;
/// <summary>
/// Gets or sets the device identifier.

View File

@@ -83,13 +83,7 @@ namespace MediaBrowser.Controller.Net
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
protected virtual bool SendOnTimer
{
get
{
return false;
}
}
protected virtual bool SendOnTimer => false;
protected virtual void ParseMessageParams(string[] values)
{

View File

@@ -34,13 +34,7 @@ namespace MediaBrowser.Controller.Playlists
}
[IgnoreDataMember]
public bool IsFile
{
get
{
return IsPlaylistFile(Path);
}
}
public bool IsFile => IsPlaylistFile(Path);
public static bool IsPlaylistFile(string path)
{
@@ -64,49 +58,19 @@ namespace MediaBrowser.Controller.Playlists
}
[IgnoreDataMember]
protected override bool FilterLinkedChildrenPerUser
{
get
{
return true;
}
}
protected override bool FilterLinkedChildrenPerUser => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return string.Equals(MediaType, "Video", StringComparison.OrdinalIgnoreCase);
}
}
public override bool SupportsPlayedStatus => string.Equals(MediaType, "Video", StringComparison.OrdinalIgnoreCase);
[IgnoreDataMember]
public override bool AlwaysScanInternalMetadataPath
{
get
{
return true;
}
}
public override bool AlwaysScanInternalMetadataPath => true;
[IgnoreDataMember]
public override bool SupportsCumulativeRunTimeTicks
{
get
{
return true;
}
}
public override bool SupportsCumulativeRunTimeTicks => true;
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -229,24 +193,12 @@ namespace MediaBrowser.Controller.Playlists
}
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
public string PlaylistMediaType { get; set; }
[IgnoreDataMember]
public override string MediaType
{
get
{
return PlaylistMediaType;
}
}
public override string MediaType => PlaylistMediaType;
public void SetMediaType(string value)
{

View File

@@ -24,13 +24,7 @@ namespace MediaBrowser.Controller.Resolvers
/// Gets the priority.
/// </summary>
/// <value>The priority.</value>
public virtual ResolverPriority Priority
{
get
{
return ResolverPriority.First;
}
}
public virtual ResolverPriority Priority => ResolverPriority.First;
/// <summary>
/// Sets initial values on the newly resolved item