mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
fix SA1513/SA1516
This commit is contained in:
@@ -195,6 +195,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
songKey = ParentIndexNumber.Value.ToString("0000") + "-" + songKey;
|
||||
}
|
||||
|
||||
songKey += Name;
|
||||
|
||||
if (!string.IsNullOrEmpty(Album))
|
||||
@@ -117,6 +118,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
return UnratedItem.Music;
|
||||
}
|
||||
|
||||
return base.GetBlockUnratedType();
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
return LibraryManager.GetArtist(name, options);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
list.Add("Artist-" + (item.Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
}
|
||||
|
||||
public override string CreatePresentationUniqueKey()
|
||||
{
|
||||
return "Artist-" + (Name ?? string.Empty).RemoveDiacritics();
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
}
|
||||
|
||||
public override string CreatePresentationUniqueKey()
|
||||
{
|
||||
return GetUserDataKeys()[0];
|
||||
@@ -94,6 +95,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return SeriesName;
|
||||
}
|
||||
|
||||
public string FindSeriesName()
|
||||
{
|
||||
return SeriesName;
|
||||
}
|
||||
|
||||
public string FindSeriesPresentationUniqueKey()
|
||||
{
|
||||
return SeriesPresentationUniqueKey;
|
||||
|
||||
@@ -108,6 +108,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public string PreferredMetadataLanguage { get; set; }
|
||||
|
||||
public long? Size { get; set; }
|
||||
|
||||
public string Container { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -448,6 +449,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
// hack alert
|
||||
return true;
|
||||
}
|
||||
|
||||
if (SourceType == SourceType.Channel)
|
||||
{
|
||||
// hack alert
|
||||
@@ -559,15 +561,25 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// The logger
|
||||
/// </summary>
|
||||
public static ILoggerFactory LoggerFactory { get; set; }
|
||||
|
||||
public static ILogger<BaseItem> Logger { get; set; }
|
||||
|
||||
public static ILibraryManager LibraryManager { get; set; }
|
||||
|
||||
public static IServerConfigurationManager ConfigurationManager { get; set; }
|
||||
|
||||
public static IProviderManager ProviderManager { get; set; }
|
||||
|
||||
public static ILocalizationManager LocalizationManager { get; set; }
|
||||
|
||||
public static IItemRepository ItemRepository { get; set; }
|
||||
|
||||
public static IFileSystem FileSystem { get; set; }
|
||||
|
||||
public static IUserDataManager UserDataManager { get; set; }
|
||||
|
||||
public static IChannelManager ChannelManager { get; set; }
|
||||
|
||||
public static IMediaSourceManager MediaSourceManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -644,8 +656,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
_sortName = CreateSortName();
|
||||
}
|
||||
}
|
||||
|
||||
return _sortName;
|
||||
}
|
||||
|
||||
set => _sortName = value;
|
||||
}
|
||||
|
||||
@@ -814,6 +828,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -837,6 +852,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return LibraryManager.GetItemById(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
public class CollectionFolder : Folder, ICollectionFolder
|
||||
{
|
||||
public static IXmlSerializer XmlSerializer { get; set; }
|
||||
|
||||
public static IJsonSerializer JsonSerializer { get; set; }
|
||||
|
||||
public static IServerApplicationHost ApplicationHost { get; set; }
|
||||
|
||||
public CollectionFolder()
|
||||
@@ -155,6 +157,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
public string[] PhysicalLocationsList { get; set; }
|
||||
|
||||
public Guid[] PhysicalFolderIds { get; set; }
|
||||
|
||||
protected override FileSystemMetadata[] GetFileSystemChildren(IDirectoryService directoryService)
|
||||
|
||||
@@ -126,10 +126,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this is UserView)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -156,6 +158,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
item.DateCreated = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
if (item.DateModified == DateTime.MinValue)
|
||||
{
|
||||
item.DateModified = DateTime.UtcNow;
|
||||
@@ -501,6 +504,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
await series.RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
await container.RefreshAllMetadata(refreshOptions, progress, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -939,6 +943,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
items = items.Where(i => string.Compare(query.NameStartsWithOrGreater, i.SortName, StringComparison.CurrentCultureIgnoreCase) < 1);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(query.NameStartsWith))
|
||||
{
|
||||
items = items.Where(i => i.SortName.StartsWith(query.NameStartsWith, StringComparison.OrdinalIgnoreCase));
|
||||
@@ -989,18 +994,22 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (queryParent is Series)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (queryParent is Season)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (queryParent is MusicAlbum)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (queryParent is MusicArtist)
|
||||
{
|
||||
return false;
|
||||
@@ -1030,22 +1039,27 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (request.IsFavoriteOrLiked.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (request.IsLiked.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (request.IsPlayed.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (request.IsResumable.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (request.IsFolder.HasValue)
|
||||
{
|
||||
return false;
|
||||
@@ -1391,6 +1405,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
list.Add(child);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -1413,6 +1428,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1665,22 +1681,27 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this is UserView)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this is UserRootFolder)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this is Channel)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (SourceType != SourceType.Library)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var iItemByName = this as IItemByName;
|
||||
if (iItemByName != null)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
}
|
||||
|
||||
public override string CreatePresentationUniqueKey()
|
||||
{
|
||||
return GetUserDataKeys()[0];
|
||||
@@ -92,6 +93,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
List<MediaSourceInfo> GetMediaSources(bool enablePathSubstitution);
|
||||
List<MediaStream> GetMediaStreams();
|
||||
Guid Id { get; set; }
|
||||
|
||||
long? RunTimeTicks { get; set; }
|
||||
|
||||
string Path { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,21 @@ namespace MediaBrowser.Controller.Entities
|
||||
public interface IHasProgramAttributes
|
||||
{
|
||||
bool IsMovie { get; set; }
|
||||
|
||||
bool IsSports { get; }
|
||||
|
||||
bool IsNews { get; }
|
||||
|
||||
bool IsKids { get; }
|
||||
|
||||
bool IsRepeat { get; set; }
|
||||
|
||||
bool IsSeries { get; set; }
|
||||
|
||||
ProgramAudio? Audio { get; set; }
|
||||
|
||||
string EpisodeTitle { get; set; }
|
||||
|
||||
string ServiceName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,14 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <value>The name of the series.</value>
|
||||
string SeriesName { get; set; }
|
||||
|
||||
string FindSeriesName();
|
||||
string FindSeriesSortName();
|
||||
Guid SeriesId { get; set; }
|
||||
|
||||
Guid FindSeriesId();
|
||||
string SeriesPresentationUniqueKey { get; set; }
|
||||
|
||||
string FindSeriesPresentationUniqueKey();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,100 +21,167 @@ namespace MediaBrowser.Controller.Entities
|
||||
public BaseItem SimilarTo { get; set; }
|
||||
|
||||
public bool? IsFolder { get; set; }
|
||||
|
||||
public bool? IsFavorite { get; set; }
|
||||
|
||||
public bool? IsFavoriteOrLiked { get; set; }
|
||||
|
||||
public bool? IsLiked { get; set; }
|
||||
|
||||
public bool? IsPlayed { get; set; }
|
||||
|
||||
public bool? IsResumable { get; set; }
|
||||
|
||||
public bool? IncludeItemsByName { get; set; }
|
||||
|
||||
public string[] MediaTypes { get; set; }
|
||||
|
||||
public string[] IncludeItemTypes { get; set; }
|
||||
|
||||
public string[] ExcludeItemTypes { get; set; }
|
||||
|
||||
public string[] ExcludeTags { get; set; }
|
||||
|
||||
public string[] ExcludeInheritedTags { get; set; }
|
||||
|
||||
public string[] Genres { get; set; }
|
||||
|
||||
public bool? IsSpecialSeason { get; set; }
|
||||
|
||||
public bool? IsMissing { get; set; }
|
||||
|
||||
public bool? IsUnaired { get; set; }
|
||||
|
||||
public bool? CollapseBoxSetItems { get; set; }
|
||||
|
||||
public string NameStartsWithOrGreater { get; set; }
|
||||
|
||||
public string NameStartsWith { get; set; }
|
||||
|
||||
public string NameLessThan { get; set; }
|
||||
|
||||
public string NameContains { get; set; }
|
||||
|
||||
public string MinSortName { get; set; }
|
||||
|
||||
public string PresentationUniqueKey { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Person { get; set; }
|
||||
|
||||
public Guid[] PersonIds { get; set; }
|
||||
|
||||
public Guid[] ItemIds { get; set; }
|
||||
|
||||
public Guid[] ExcludeItemIds { get; set; }
|
||||
|
||||
public string AdjacentTo { get; set; }
|
||||
|
||||
public string[] PersonTypes { get; set; }
|
||||
|
||||
public bool? Is3D { get; set; }
|
||||
|
||||
public bool? IsHD { get; set; }
|
||||
|
||||
public bool? IsLocked { get; set; }
|
||||
|
||||
public bool? IsPlaceHolder { get; set; }
|
||||
|
||||
public bool? HasImdbId { get; set; }
|
||||
|
||||
public bool? HasOverview { get; set; }
|
||||
|
||||
public bool? HasTmdbId { get; set; }
|
||||
|
||||
public bool? HasOfficialRating { get; set; }
|
||||
|
||||
public bool? HasTvdbId { get; set; }
|
||||
|
||||
public bool? HasThemeSong { get; set; }
|
||||
|
||||
public bool? HasThemeVideo { get; set; }
|
||||
|
||||
public bool? HasSubtitles { get; set; }
|
||||
|
||||
public bool? HasSpecialFeature { get; set; }
|
||||
|
||||
public bool? HasTrailer { get; set; }
|
||||
|
||||
public bool? HasParentalRating { get; set; }
|
||||
|
||||
public Guid[] StudioIds { get; set; }
|
||||
|
||||
public Guid[] GenreIds { get; set; }
|
||||
|
||||
public ImageType[] ImageTypes { get; set; }
|
||||
|
||||
public VideoType[] VideoTypes { get; set; }
|
||||
|
||||
public UnratedItem[] BlockUnratedItems { get; set; }
|
||||
|
||||
public int[] Years { get; set; }
|
||||
|
||||
public string[] Tags { get; set; }
|
||||
|
||||
public string[] OfficialRatings { get; set; }
|
||||
|
||||
public DateTime? MinPremiereDate { get; set; }
|
||||
|
||||
public DateTime? MaxPremiereDate { get; set; }
|
||||
|
||||
public DateTime? MinStartDate { get; set; }
|
||||
|
||||
public DateTime? MaxStartDate { get; set; }
|
||||
|
||||
public DateTime? MinEndDate { get; set; }
|
||||
|
||||
public DateTime? MaxEndDate { get; set; }
|
||||
|
||||
public bool? IsAiring { get; set; }
|
||||
|
||||
public bool? IsMovie { get; set; }
|
||||
|
||||
public bool? IsSports { get; set; }
|
||||
|
||||
public bool? IsKids { get; set; }
|
||||
|
||||
public bool? IsNews { get; set; }
|
||||
|
||||
public bool? IsSeries { get; set; }
|
||||
|
||||
public int? MinIndexNumber { get; set; }
|
||||
|
||||
public int? AiredDuringSeason { get; set; }
|
||||
|
||||
public double? MinCriticRating { get; set; }
|
||||
|
||||
public double? MinCommunityRating { get; set; }
|
||||
|
||||
public Guid[] ChannelIds { get; set; }
|
||||
|
||||
public int? ParentIndexNumber { get; set; }
|
||||
|
||||
public int? ParentIndexNumberNotEquals { get; set; }
|
||||
|
||||
public int? IndexNumber { get; set; }
|
||||
|
||||
public int? MinParentalRating { get; set; }
|
||||
|
||||
public int? MaxParentalRating { get; set; }
|
||||
|
||||
public bool? HasDeadParentId { get; set; }
|
||||
|
||||
public bool? IsVirtualItem { get; set; }
|
||||
|
||||
public Guid ParentId { get; set; }
|
||||
|
||||
public string ParentType { get; set; }
|
||||
|
||||
public Guid[] AncestorIds { get; set; }
|
||||
|
||||
public Guid[] TopParentIds { get; set; }
|
||||
|
||||
public BaseItem Parent
|
||||
@@ -135,41 +202,65 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
public string[] PresetViews { get; set; }
|
||||
|
||||
public TrailerType[] TrailerTypes { get; set; }
|
||||
|
||||
public SourceType[] SourceTypes { get; set; }
|
||||
|
||||
public SeriesStatus[] SeriesStatuses { get; set; }
|
||||
|
||||
public string ExternalSeriesId { get; set; }
|
||||
|
||||
public string ExternalId { get; set; }
|
||||
|
||||
public Guid[] AlbumIds { get; set; }
|
||||
|
||||
public Guid[] ArtistIds { get; set; }
|
||||
|
||||
public Guid[] ExcludeArtistIds { get; set; }
|
||||
|
||||
public string AncestorWithPresentationUniqueKey { get; set; }
|
||||
|
||||
public string SeriesPresentationUniqueKey { get; set; }
|
||||
|
||||
public bool GroupByPresentationUniqueKey { get; set; }
|
||||
|
||||
public bool GroupBySeriesPresentationUniqueKey { get; set; }
|
||||
|
||||
public bool EnableTotalRecordCount { get; set; }
|
||||
|
||||
public bool ForceDirect { get; set; }
|
||||
|
||||
public Dictionary<string, string> ExcludeProviderIds { get; set; }
|
||||
|
||||
public bool EnableGroupByMetadataKey { get; set; }
|
||||
|
||||
public bool? HasChapterImages { get; set; }
|
||||
|
||||
public IReadOnlyList<(string, SortOrder)> OrderBy { get; set; }
|
||||
|
||||
public DateTime? MinDateCreated { get; set; }
|
||||
|
||||
public DateTime? MinDateLastSaved { get; set; }
|
||||
|
||||
public DateTime? MinDateLastSavedForUser { get; set; }
|
||||
|
||||
public DtoOptions DtoOptions { get; set; }
|
||||
|
||||
public int MinSimilarityScore { get; set; }
|
||||
|
||||
public string HasNoAudioTrackWithLanguage { get; set; }
|
||||
|
||||
public string HasNoInternalSubtitleTrackWithLanguage { get; set; }
|
||||
|
||||
public string HasNoExternalSubtitleTrackWithLanguage { get; set; }
|
||||
|
||||
public string HasNoSubtitleTrackWithLanguage { get; set; }
|
||||
|
||||
public bool? IsDeadArtist { get; set; }
|
||||
|
||||
public bool? IsDeadStudio { get; set; }
|
||||
|
||||
public bool? IsDeadPerson { get; set; }
|
||||
|
||||
public InternalItemsQuery()
|
||||
@@ -240,17 +331,29 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
public Dictionary<string, string> HasAnyProviderId { get; set; }
|
||||
|
||||
public Guid[] AlbumArtistIds { get; set; }
|
||||
|
||||
public Guid[] BoxSetLibraryFolders { get; set; }
|
||||
|
||||
public Guid[] ContributingArtistIds { get; set; }
|
||||
|
||||
public bool? HasAired { get; set; }
|
||||
|
||||
public bool? HasOwnerId { get; set; }
|
||||
|
||||
public bool? Is4K { get; set; }
|
||||
|
||||
public int? MaxHeight { get; set; }
|
||||
|
||||
public int? MaxWidth { get; set; }
|
||||
|
||||
public int? MinHeight { get; set; }
|
||||
|
||||
public int? MinWidth { get; set; }
|
||||
|
||||
public string SearchTerm { get; set; }
|
||||
|
||||
public string SeriesTimerId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
public class LinkedChild
|
||||
{
|
||||
public string Path { get; set; }
|
||||
|
||||
public LinkedChildType Type { get; set; }
|
||||
|
||||
public string LibraryItemId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -63,6 +65,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return _fileSystem.AreEqual(x.Path, y.Path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
}
|
||||
|
||||
public override string CreatePresentationUniqueKey()
|
||||
{
|
||||
return GetUserDataKeys()[0];
|
||||
@@ -114,6 +115,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return photoAlbum;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -68,17 +69,27 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
public string CameraMake { get; set; }
|
||||
|
||||
public string CameraModel { get; set; }
|
||||
|
||||
public string Software { get; set; }
|
||||
|
||||
public double? ExposureTime { get; set; }
|
||||
|
||||
public double? FocalLength { get; set; }
|
||||
|
||||
public ImageOrientation? Orientation { get; set; }
|
||||
|
||||
public double? Aperture { get; set; }
|
||||
|
||||
public double? ShutterSpeed { get; set; }
|
||||
|
||||
public double? Latitude { get; set; }
|
||||
|
||||
public double? Longitude { get; set; }
|
||||
|
||||
public double? Altitude { get; set; }
|
||||
|
||||
public int? IsoSpeedRating { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public class Share
|
||||
{
|
||||
public string UserId { get; set; }
|
||||
|
||||
public bool CanEdit { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
}
|
||||
|
||||
public override string CreatePresentationUniqueKey()
|
||||
{
|
||||
return GetUserDataKeys()[0];
|
||||
@@ -93,6 +94,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,9 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
/// </summary>
|
||||
/// <value>The aired season.</value>
|
||||
public int? AirsBeforeSeasonNumber { get; set; }
|
||||
|
||||
public int? AirsAfterSeasonNumber { get; set; }
|
||||
|
||||
public int? AirsBeforeEpisodeNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -94,6 +96,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
take--;
|
||||
}
|
||||
|
||||
list.InsertRange(0, seriesUserDataKeys.Take(take).Select(i => i + ParentIndexNumber.Value.ToString("000") + IndexNumber.Value.ToString("000")));
|
||||
}
|
||||
|
||||
@@ -114,6 +117,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
seriesId = FindSeriesId();
|
||||
}
|
||||
|
||||
return !seriesId.Equals(Guid.Empty) ? (LibraryManager.GetItemById(seriesId) as Series) : null;
|
||||
}
|
||||
}
|
||||
@@ -128,6 +132,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
seasonId = FindSeasonId();
|
||||
}
|
||||
|
||||
return !seasonId.Equals(Guid.Empty) ? (LibraryManager.GetItemById(seasonId) as Season) : null;
|
||||
}
|
||||
}
|
||||
@@ -160,6 +165,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
return "Season " + ParentIndexNumber.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
return "Season Unknown";
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
seriesId = FindSeriesId();
|
||||
}
|
||||
|
||||
return seriesId == Guid.Empty ? null : (LibraryManager.GetItemById(seriesId) as Series);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
}
|
||||
|
||||
public DayOfWeek[] AirDays { get; set; }
|
||||
|
||||
public string AirTime { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -150,6 +151,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
query.IncludeItemTypes = new[] { typeof(Episode).Name };
|
||||
}
|
||||
|
||||
query.IsVirtualItem = false;
|
||||
query.Limit = 0;
|
||||
var totalRecordCount = LibraryManager.GetCount(query);
|
||||
|
||||
@@ -105,6 +105,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value.HasValue)
|
||||
|
||||
@@ -960,6 +960,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
.OfType<Folder>()
|
||||
.Where(UserView.IsEligibleForGrouping);
|
||||
}
|
||||
|
||||
return _libraryManager.GetUserRootFolder()
|
||||
.GetChildren(user, true)
|
||||
.OfType<Folder>()
|
||||
@@ -978,6 +979,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return folder != null && viewTypes.Contains(folder.CollectionType ?? string.Empty, StringComparer.OrdinalIgnoreCase);
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
return GetMediaFolders(user)
|
||||
.Where(i =>
|
||||
{
|
||||
|
||||
@@ -28,7 +28,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
public string PrimaryVersionId { get; set; }
|
||||
|
||||
public string[] AdditionalParts { get; set; }
|
||||
|
||||
public string[] LocalAlternateVersions { get; set; }
|
||||
|
||||
public LinkedChild[] LinkedAlternateVersions { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -52,15 +54,18 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (extraType.Value == Model.Entities.ExtraType.ThemeVideo)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (extraType.Value == Model.Entities.ExtraType.Trailer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -196,6 +201,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return video.MediaSourceCount;
|
||||
}
|
||||
}
|
||||
|
||||
return LinkedAlternateVersions.Length + LocalAlternateVersions.Length + 1;
|
||||
}
|
||||
}
|
||||
@@ -390,11 +396,13 @@ namespace MediaBrowser.Controller.Entities
|
||||
AdditionalParts = newVideo.AdditionalParts;
|
||||
updateType |= ItemUpdateType.MetadataImport;
|
||||
}
|
||||
|
||||
if (!LocalAlternateVersions.SequenceEqual(newVideo.LocalAlternateVersions, StringComparer.Ordinal))
|
||||
{
|
||||
LocalAlternateVersions = newVideo.LocalAlternateVersions;
|
||||
updateType |= ItemUpdateType.MetadataImport;
|
||||
}
|
||||
|
||||
if (VideoType != newVideo.VideoType)
|
||||
{
|
||||
VideoType = newVideo.VideoType;
|
||||
@@ -416,6 +424,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
.Select(i => i.FullName)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
if (videoType == VideoType.BluRay)
|
||||
{
|
||||
return FileSystem.GetFiles(rootPath, new[] { ".m2ts" }, false, true)
|
||||
@@ -425,6 +434,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
.Select(i => i.FullName)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user