mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
fix SA1513/SA1516
This commit is contained in:
@@ -7,7 +7,9 @@ namespace MediaBrowser.Controller.Authentication
|
||||
public interface IAuthenticationProvider
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
bool IsEnabled { get; }
|
||||
|
||||
Task<ProviderAuthenticationResult> Authenticate(string username, string password);
|
||||
bool HasPassword(User user);
|
||||
Task ChangePassword(User user, string newPassword);
|
||||
@@ -28,6 +30,7 @@ namespace MediaBrowser.Controller.Authentication
|
||||
public class ProviderAuthenticationResult
|
||||
{
|
||||
public string Username { get; set; }
|
||||
|
||||
public string DisplayName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@ namespace MediaBrowser.Controller.Authentication
|
||||
public interface IPasswordResetProvider
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
bool IsEnabled { get; }
|
||||
|
||||
Task<ForgotPasswordResult> StartForgotPasswordProcess(User user, bool isInNetwork);
|
||||
Task<PinRedeemResult> RedeemPasswordResetPin(string pin);
|
||||
}
|
||||
@@ -16,6 +18,7 @@ namespace MediaBrowser.Controller.Authentication
|
||||
public class PasswordPinCreationResult
|
||||
{
|
||||
public string PinFile { get; set; }
|
||||
|
||||
public DateTime ExpirationDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@ namespace MediaBrowser.Controller.Channels
|
||||
public string Overview { get; set; }
|
||||
|
||||
public List<string> Genres { get; set; }
|
||||
|
||||
public List<string> Studios { get; set; }
|
||||
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public List<PersonInfo> People { get; set; }
|
||||
@@ -34,26 +36,33 @@ namespace MediaBrowser.Controller.Channels
|
||||
public long? RunTimeTicks { get; set; }
|
||||
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
public string OriginalTitle { get; set; }
|
||||
|
||||
public ChannelMediaType MediaType { get; set; }
|
||||
|
||||
public ChannelFolderType FolderType { get; set; }
|
||||
|
||||
public ChannelMediaContentType ContentType { get; set; }
|
||||
|
||||
public ExtraType ExtraType { get; set; }
|
||||
|
||||
public List<TrailerType> TrailerTypes { get; set; }
|
||||
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
public DateTime? PremiereDate { get; set; }
|
||||
|
||||
public int? ProductionYear { get; set; }
|
||||
|
||||
public DateTime? DateCreated { get; set; }
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
public int? IndexNumber { get; set; }
|
||||
|
||||
public int? ParentIndexNumber { get; set; }
|
||||
|
||||
public List<MediaSourceInfo> MediaSources { get; set; }
|
||||
@@ -63,7 +72,9 @@ namespace MediaBrowser.Controller.Channels
|
||||
public List<string> Artists { get; set; }
|
||||
|
||||
public List<string> AlbumArtists { get; set; }
|
||||
|
||||
public bool IsLiveStream { get; set; }
|
||||
|
||||
public string Etag { get; set; }
|
||||
|
||||
public ChannelItemInfo()
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace MediaBrowser.Controller.Collections
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
public string[] ItemIdList { get; set; }
|
||||
|
||||
public Guid[] UserIds { get; set; }
|
||||
|
||||
public CollectionCreationOptions()
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
|
||||
return newSize;
|
||||
}
|
||||
|
||||
return GetSizeEstimate(options);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
}
|
||||
|
||||
public Guid ItemId { get; set; }
|
||||
|
||||
public BaseItem Item { get; set; }
|
||||
|
||||
public ItemImageInfo Image { get; set; }
|
||||
@@ -38,12 +39,15 @@ namespace MediaBrowser.Controller.Drawing
|
||||
public bool AddPlayedIndicator { get; set; }
|
||||
|
||||
public int? UnplayedCount { get; set; }
|
||||
|
||||
public int? Blur { get; set; }
|
||||
|
||||
public double PercentPlayed { get; set; }
|
||||
|
||||
public string BackgroundColor { get; set; }
|
||||
|
||||
public string ForegroundLayer { get; set; }
|
||||
|
||||
public bool RequiresAutoOrientation { get; set; }
|
||||
|
||||
private bool HasDefaultOptions(string originalImagePath)
|
||||
@@ -73,14 +77,17 @@ namespace MediaBrowser.Controller.Drawing
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Height.HasValue && !sizeValue.Height.Equals(Height.Value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (MaxWidth.HasValue && sizeValue.Width > MaxWidth.Value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (MaxHeight.HasValue && sizeValue.Height > MaxHeight.Value)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -14,11 +14,17 @@ namespace MediaBrowser.Controller.Dto
|
||||
};
|
||||
|
||||
public ItemFields[] Fields { get; set; }
|
||||
|
||||
public ImageType[] ImageTypes { get; set; }
|
||||
|
||||
public int ImageTypeLimit { get; set; }
|
||||
|
||||
public bool EnableImages { get; set; }
|
||||
|
||||
public bool AddProgramRecordingInfo { get; set; }
|
||||
|
||||
public bool EnableUserData { get; set; }
|
||||
|
||||
public bool AddCurrentProgram { get; set; }
|
||||
|
||||
public DtoOptions()
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace MediaBrowser.Controller.IO
|
||||
{
|
||||
dict[file.FullName] = file;
|
||||
}
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
@@ -49,6 +50,7 @@ namespace MediaBrowser.Controller.IO
|
||||
{
|
||||
throw new ArgumentNullException(nameof(path));
|
||||
}
|
||||
|
||||
if (args == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(args));
|
||||
@@ -116,6 +118,7 @@ namespace MediaBrowser.Controller.IO
|
||||
returnResult[index] = value;
|
||||
index++;
|
||||
}
|
||||
|
||||
return returnResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ namespace MediaBrowser.Controller.Library
|
||||
public class DeleteOptions
|
||||
{
|
||||
public bool DeleteFileLocation { get; set; }
|
||||
|
||||
public bool DeleteFromExternalProvider { get; set; }
|
||||
|
||||
public DeleteOptions()
|
||||
|
||||
@@ -9,10 +9,15 @@ namespace MediaBrowser.Controller.Library
|
||||
Task Open(CancellationToken openCancellationToken);
|
||||
Task Close();
|
||||
int ConsumerCount { get; set; }
|
||||
|
||||
string OriginalStreamId { get; set; }
|
||||
|
||||
string TunerHostId { get; }
|
||||
|
||||
bool EnableStreamSharing { get; }
|
||||
|
||||
MediaSourceInfo MediaSource { get; set; }
|
||||
|
||||
string UniqueId { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,6 +129,7 @@ namespace MediaBrowser.Controller.Library
|
||||
|
||||
return item != null;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -256,6 +257,7 @@ namespace MediaBrowser.Controller.Library
|
||||
if (args.Path == null && Path == null) return true;
|
||||
return args.Path != null && BaseItem.FileSystem.AreEqual(args.Path, Path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,18 +13,27 @@ namespace MediaBrowser.Controller.Library
|
||||
public class PlaybackProgressEventArgs : EventArgs
|
||||
{
|
||||
public List<User> Users { get; set; }
|
||||
|
||||
public long? PlaybackPositionTicks { get; set; }
|
||||
|
||||
public BaseItem Item { get; set; }
|
||||
|
||||
public BaseItemDto MediaInfo { get; set; }
|
||||
|
||||
public string MediaSourceId { get; set; }
|
||||
|
||||
public bool IsPaused { get; set; }
|
||||
|
||||
public bool IsAutomated { get; set; }
|
||||
|
||||
public string DeviceId { get; set; }
|
||||
|
||||
public string DeviceName { get; set; }
|
||||
|
||||
public string ClientName { get; set; }
|
||||
|
||||
public string PlaySessionId { get; set; }
|
||||
|
||||
public SessionInfo Session { get; set; }
|
||||
|
||||
public PlaybackProgressEventArgs()
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace MediaBrowser.Controller.Library
|
||||
message = string.Format("{0} took {1} seconds.",
|
||||
_name, ((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000"));
|
||||
}
|
||||
|
||||
_logger.LogInformation(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace MediaBrowser.Controller.Library
|
||||
|
||||
return new DayOfWeek[] { };
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,8 +67,11 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public bool? IsFavorite { get; set; }
|
||||
|
||||
public bool? IsHD { get; set; }
|
||||
|
||||
public string AudioCodec { get; set; }
|
||||
|
||||
public string VideoCodec { get; set; }
|
||||
|
||||
public string[] Tags { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,8 +286,11 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public class ActiveRecordingInfo
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public TimerInfo Timer { get; set; }
|
||||
|
||||
public CancellationTokenSource CancellationTokenSource { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
get;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IConfigurableTunerHost
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public LiveTvConflictException()
|
||||
{
|
||||
}
|
||||
|
||||
public LiveTvConflictException(string message)
|
||||
: base(message)
|
||||
{
|
||||
|
||||
@@ -199,6 +199,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public string Etag { get; set; }
|
||||
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
public Dictionary<string, string> SeriesProviderIds { get; set; }
|
||||
|
||||
public ProgramInfo()
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public bool RecordAnyChannel { get; set; }
|
||||
|
||||
public int KeepUpTo { get; set; }
|
||||
|
||||
public KeepUntil KeepUntil { get; set; }
|
||||
|
||||
public bool SkipEpisodesInLibrary { get; set; }
|
||||
|
||||
@@ -18,7 +18,9 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
}
|
||||
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
public Dictionary<string, string> SeriesProviderIds { get; set; }
|
||||
|
||||
public string[] Tags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -146,10 +148,15 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public bool IsRepeat { get; set; }
|
||||
|
||||
public string HomePageUrl { get; set; }
|
||||
|
||||
public float? CommunityRating { get; set; }
|
||||
|
||||
public string OfficialRating { get; set; }
|
||||
|
||||
public string[] Genres { get; set; }
|
||||
|
||||
public string RecordingPath { get; set; }
|
||||
|
||||
public KeepUntil KeepUntil { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,11 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public class TunerChannelMapping
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string ProviderChannelName { get; set; }
|
||||
|
||||
public string ProviderChannelId { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1699,6 +1699,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
if (!videoHeight.HasValue && !requestedHeight.HasValue)
|
||||
{
|
||||
return (null, null);
|
||||
@@ -2569,8 +2570,10 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
encodingOptions.HardwareDecodingCodecs = Array.Empty<string>();
|
||||
return null;
|
||||
}
|
||||
|
||||
return "-c:v h264_qsv";
|
||||
}
|
||||
|
||||
break;
|
||||
case "hevc":
|
||||
case "h265":
|
||||
@@ -2579,18 +2582,21 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
return (isColorDepth10 &&
|
||||
!encodingOptions.EnableDecodingColorDepth10Hevc) ? null : "-c:v hevc_qsv";
|
||||
}
|
||||
|
||||
break;
|
||||
case "mpeg2video":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg2_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg2_qsv";
|
||||
}
|
||||
|
||||
break;
|
||||
case "vc1":
|
||||
if (_mediaEncoder.SupportsDecoder("vc1_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v vc1_qsv";
|
||||
}
|
||||
|
||||
break;
|
||||
case "vp8":
|
||||
if (_mediaEncoder.SupportsDecoder("vp8_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("vp8", StringComparer.OrdinalIgnoreCase))
|
||||
@@ -2615,8 +2621,16 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
case "h264":
|
||||
if (_mediaEncoder.SupportsDecoder("h264_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("h264", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
// cuvid decoder does not support 10-bit input.
|
||||
if ((videoStream.BitDepth ?? 8) > 8)
|
||||
{
|
||||
encodingOptions.HardwareDecodingCodecs = Array.Empty<string>();
|
||||
return null;
|
||||
}
|
||||
|
||||
return "-c:v h264_cuvid";
|
||||
}
|
||||
|
||||
break;
|
||||
case "hevc":
|
||||
case "h265":
|
||||
@@ -2625,24 +2639,28 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
return (isColorDepth10 &&
|
||||
!encodingOptions.EnableDecodingColorDepth10Hevc) ? null : "-c:v hevc_cuvid";
|
||||
}
|
||||
|
||||
break;
|
||||
case "mpeg2video":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg2_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg2_cuvid";
|
||||
}
|
||||
|
||||
break;
|
||||
case "vc1":
|
||||
if (_mediaEncoder.SupportsDecoder("vc1_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v vc1_cuvid";
|
||||
}
|
||||
|
||||
break;
|
||||
case "mpeg4":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg4_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg4", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg4_cuvid";
|
||||
}
|
||||
|
||||
break;
|
||||
case "vp8":
|
||||
if (_mediaEncoder.SupportsDecoder("vp8_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("vp8", StringComparer.OrdinalIgnoreCase))
|
||||
@@ -2669,6 +2687,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
return "-c:v h264_mediacodec";
|
||||
}
|
||||
|
||||
break;
|
||||
case "hevc":
|
||||
case "h265":
|
||||
@@ -2677,24 +2696,28 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
return (isColorDepth10 &&
|
||||
!encodingOptions.EnableDecodingColorDepth10Hevc) ? null : "-c:v hevc_mediacodec";
|
||||
}
|
||||
|
||||
break;
|
||||
case "mpeg2video":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg2_mediacodec") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg2_mediacodec";
|
||||
}
|
||||
|
||||
break;
|
||||
case "mpeg4":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg4_mediacodec") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg4", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg4_mediacodec";
|
||||
}
|
||||
|
||||
break;
|
||||
case "vp8":
|
||||
if (_mediaEncoder.SupportsDecoder("vp8_mediacodec") && encodingOptions.HardwareDecodingCodecs.Contains("vp8", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v vp8_mediacodec";
|
||||
}
|
||||
|
||||
break;
|
||||
case "vp9":
|
||||
if (_mediaEncoder.SupportsDecoder("vp9_mediacodec") && encodingOptions.HardwareDecodingCodecs.Contains("vp9", StringComparer.OrdinalIgnoreCase))
|
||||
@@ -2702,6 +2725,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
return (isColorDepth10 &&
|
||||
!encodingOptions.EnableDecodingColorDepth10Vp9) ? null : "-c:v vp9_mediacodec";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2715,24 +2739,28 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
return "-c:v h264_mmal";
|
||||
}
|
||||
|
||||
break;
|
||||
case "mpeg2video":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg2_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg2_mmal";
|
||||
}
|
||||
|
||||
break;
|
||||
case "mpeg4":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg4_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg4", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg4_mmal";
|
||||
}
|
||||
|
||||
break;
|
||||
case "vc1":
|
||||
if (_mediaEncoder.SupportsDecoder("vc1_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v vc1_mmal";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,13 +127,19 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
public string AlbumCoverPath { get; set; }
|
||||
|
||||
public string InputAudioSync { get; set; }
|
||||
|
||||
public string InputVideoSync { get; set; }
|
||||
|
||||
public TransportStreamTimestamp InputTimestamp { get; set; }
|
||||
|
||||
public MediaStream AudioStream { get; set; }
|
||||
|
||||
public string[] SupportedAudioCodecs { get; set; }
|
||||
|
||||
public string[] SupportedVideoCodecs { get; set; }
|
||||
|
||||
public string InputContainer { get; set; }
|
||||
|
||||
public IsoType? IsoType { get; set; }
|
||||
|
||||
public BaseEncodingJobOptions BaseRequest { get; set; }
|
||||
@@ -293,6 +299,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
public bool IsVideoRequest { get; set; }
|
||||
|
||||
public TranscodingJobType TranscodingType { get; set; }
|
||||
|
||||
public EncodingJobInfo(TranscodingJobType jobType)
|
||||
@@ -672,6 +679,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
public IProgress<double> Progress { get; set; }
|
||||
|
||||
public virtual void ReportTranscodingProgress(TimeSpan? transcodingPosition, float? framerate, double? percentComplete, long? bytesTranscoded, int? bitRate)
|
||||
{
|
||||
Progress.Report(percentComplete.Value);
|
||||
|
||||
@@ -9,9 +9,11 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
public class EncodingJobOptions : BaseEncodingJobOptions
|
||||
{
|
||||
public string OutputDirectory { get; set; }
|
||||
|
||||
public string ItemId { get; set; }
|
||||
|
||||
public string TempDirectory { get; set; }
|
||||
|
||||
public bool ReadInputAtNativeFramerate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -47,6 +49,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
SubtitleStreamIndex = info.SubtitleStreamIndex;
|
||||
}
|
||||
|
||||
StreamOptions = info.StreamOptions;
|
||||
}
|
||||
}
|
||||
@@ -81,7 +84,9 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
public bool EnableAutoStreamCopy { get; set; }
|
||||
|
||||
public bool AllowVideoStreamCopy { get; set; }
|
||||
|
||||
public bool AllowAudioStreamCopy { get; set; }
|
||||
|
||||
public bool BreakOnNonKeyFrames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -197,10 +202,15 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
[ApiMember(Name = "MaxVideoBitDepth", Description = "Optional.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
|
||||
public bool RequireAvc { get; set; }
|
||||
|
||||
public bool DeInterlace { get; set; }
|
||||
|
||||
public bool RequireNonAnamorphic { get; set; }
|
||||
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
|
||||
public string LiveStreamId { get; set; }
|
||||
|
||||
@@ -8,9 +8,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
public class MediaInfoRequest
|
||||
{
|
||||
public MediaSourceInfo MediaSource { get; set; }
|
||||
|
||||
public bool ExtractChapters { get; set; }
|
||||
|
||||
public DlnaProfileType MediaType { get; set; }
|
||||
|
||||
public IIsoMount MountedIso { get; set; }
|
||||
|
||||
public string[] PlayableStreamFileNames { get; set; }
|
||||
|
||||
public MediaInfoRequest()
|
||||
|
||||
@@ -58,8 +58,11 @@ namespace MediaBrowser.Controller.Net
|
||||
public interface IAuthenticationAttributes
|
||||
{
|
||||
bool EscapeParentalControl { get; }
|
||||
|
||||
bool AllowBeforeStartupWizard { get; }
|
||||
|
||||
bool AllowLocal { get; }
|
||||
|
||||
bool AllowLocalOnly { get; }
|
||||
|
||||
string[] GetRoles();
|
||||
|
||||
@@ -254,7 +254,9 @@ namespace MediaBrowser.Controller.Net
|
||||
public class WebSocketListenerState
|
||||
{
|
||||
public DateTime DateLastSendUtc { get; set; }
|
||||
|
||||
public long InitialDelayMs { get; set; }
|
||||
|
||||
public long IntervalMs { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,11 @@ namespace MediaBrowser.Controller.Net
|
||||
public class StaticResultOptions
|
||||
{
|
||||
public string ContentType { get; set; }
|
||||
|
||||
public TimeSpan? CacheDuration { get; set; }
|
||||
|
||||
public DateTime? DateLastModified { get; set; }
|
||||
|
||||
public Func<Task<Stream>> ContentFactory { get; set; }
|
||||
|
||||
public bool IsHeadRequest { get; set; }
|
||||
@@ -17,9 +20,11 @@ namespace MediaBrowser.Controller.Net
|
||||
public IDictionary<string, string> ResponseHeaders { get; set; }
|
||||
|
||||
public Action OnComplete { get; set; }
|
||||
|
||||
public Action OnError { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public long? ContentLength { get; set; }
|
||||
|
||||
public FileShare FileShare { get; set; }
|
||||
|
||||
@@ -7,11 +7,13 @@ namespace MediaBrowser.Controller.Providers
|
||||
public class ImageRefreshOptions
|
||||
{
|
||||
public MetadataRefreshMode ImageRefreshMode { get; set; }
|
||||
|
||||
public IDirectoryService DirectoryService { get; private set; }
|
||||
|
||||
public bool ReplaceAllImages { get; set; }
|
||||
|
||||
public ImageType[] ReplaceImages { get; set; }
|
||||
|
||||
public bool IsAutomated { get; set; }
|
||||
|
||||
public ImageRefreshOptions(IDirectoryService directoryService)
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
People = new List<PersonInfo>();
|
||||
}
|
||||
|
||||
People.Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace MediaBrowser.Controller.Resolvers
|
||||
public class MultiItemResolverResult
|
||||
{
|
||||
public List<BaseItem> Items { get; set; }
|
||||
|
||||
public List<FileSystemMetadata> ExtraFiles { get; set; }
|
||||
|
||||
public MultiItemResolverResult()
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace MediaBrowser.Controller.Security
|
||||
public DateTime? DateRevoked { get; set; }
|
||||
|
||||
public DateTime DateLastActivity { get; set; }
|
||||
|
||||
public string UserName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,21 @@ namespace MediaBrowser.Controller.Session
|
||||
public class AuthenticationRequest
|
||||
{
|
||||
public string Username { get; set; }
|
||||
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public string Password { get; set; }
|
||||
|
||||
public string PasswordSha1 { get; set; }
|
||||
|
||||
public string App { get; set; }
|
||||
|
||||
public string AppVersion { get; set; }
|
||||
|
||||
public string DeviceId { get; set; }
|
||||
|
||||
public string DeviceName { get; set; }
|
||||
|
||||
public string RemoteEndPoint { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
|
||||
return Capabilities.PlayableMediaTypes;
|
||||
}
|
||||
}
|
||||
@@ -154,6 +155,7 @@ namespace MediaBrowser.Controller.Session
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (controllers.Length > 0)
|
||||
{
|
||||
return false;
|
||||
@@ -255,6 +257,7 @@ namespace MediaBrowser.Controller.Session
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -292,6 +295,7 @@ namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (progressInfo.IsPaused)
|
||||
{
|
||||
return;
|
||||
@@ -334,6 +338,7 @@ namespace MediaBrowser.Controller.Session
|
||||
_progressTimer.Dispose();
|
||||
_progressTimer = null;
|
||||
}
|
||||
|
||||
_lastProgressInfo = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,11 @@ namespace MediaBrowser.Controller.Subtitles
|
||||
public class SubtitleResponse
|
||||
{
|
||||
public string Language { get; set; }
|
||||
|
||||
public string Format { get; set; }
|
||||
|
||||
public bool IsForced { get; set; }
|
||||
|
||||
public Stream Stream { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,23 +8,35 @@ namespace MediaBrowser.Controller.Subtitles
|
||||
public class SubtitleSearchRequest : IHasProviderIds
|
||||
{
|
||||
public string Language { get; set; }
|
||||
|
||||
public string TwoLetterISOLanguageName { get; set; }
|
||||
|
||||
public VideoContentType ContentType { get; set; }
|
||||
|
||||
public string MediaPath { get; set; }
|
||||
|
||||
public string SeriesName { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public int? IndexNumber { get; set; }
|
||||
|
||||
public int? IndexNumberEnd { get; set; }
|
||||
|
||||
public int? ParentIndexNumber { get; set; }
|
||||
|
||||
public int? ProductionYear { get; set; }
|
||||
|
||||
public long? RuntimeTicks { get; set; }
|
||||
|
||||
public bool IsPerfectMatch { get; set; }
|
||||
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
public bool SearchAllProviders { get; set; }
|
||||
|
||||
public string[] DisabledSubtitleFetchers { get; set; }
|
||||
|
||||
public string[] SubtitleFetcherOrder { get; set; }
|
||||
|
||||
public SubtitleSearchRequest()
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace MediaBrowser.Controller.Sync
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path { get; set; }
|
||||
|
||||
public string[] PathParts { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the protocol.
|
||||
|
||||
@@ -122,6 +122,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
{
|
||||
max = Math.Max(max, session.Ping);
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user