mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
Merge remote-tracking branch 'remotes/jellyfin/api-migration' into api-audio
# Conflicts: # Emby.Server.Implementations/ApplicationHost.cs # Jellyfin.Api/Helpers/TranscodingJobHelper.cs
This commit is contained in:
@@ -7,12 +7,12 @@ 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);
|
||||
void ChangeEasyPassword(User user, string newPassword, string newPasswordHash);
|
||||
string GetEasyPasswordHash(User user);
|
||||
}
|
||||
|
||||
public interface IRequiresResolvedUser
|
||||
@@ -28,6 +28,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()
|
||||
|
||||
@@ -35,12 +35,10 @@ namespace MediaBrowser.Controller.Channels
|
||||
|
||||
public interface IDisableMediaSourceDisplay
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface ISupportsMediaProbe
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface IHasFolderAttributes
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.Channels
|
||||
public List<ChannelMediaContentType> ContentTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents the maximum number of records the channel allows retrieving at a time
|
||||
/// Represents the maximum number of records the channel allows retrieving at a time.
|
||||
/// </summary>
|
||||
public int? MaxPageSize { get; set; }
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -4,7 +4,7 @@ using MediaBrowser.Model.Configuration;
|
||||
namespace MediaBrowser.Controller.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IServerConfigurationManager
|
||||
/// Interface IServerConfigurationManager.
|
||||
/// </summary>
|
||||
public interface IServerConfigurationManager : IConfigurationManager
|
||||
{
|
||||
@@ -19,7 +19,5 @@ namespace MediaBrowser.Controller.Configuration
|
||||
/// </summary>
|
||||
/// <value>The configuration.</value>
|
||||
ServerConfiguration Configuration { get; }
|
||||
|
||||
bool SetOptimalValues();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using MediaBrowser.Model.Entities;
|
||||
namespace MediaBrowser.Controller.Drawing
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IImageProcessor
|
||||
/// Interface IImageProcessor.
|
||||
/// </summary>
|
||||
public interface IImageProcessor
|
||||
{
|
||||
@@ -30,7 +30,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// Gets the dimensions of the image.
|
||||
/// </summary>
|
||||
/// <param name="path">Path to the image file.</param>
|
||||
/// <returns>ImageDimensions</returns>
|
||||
/// <returns>ImageDimensions.</returns>
|
||||
ImageDimensions GetImageDimensions(string path);
|
||||
|
||||
/// <summary>
|
||||
@@ -38,14 +38,14 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// </summary>
|
||||
/// <param name="item">The base item.</param>
|
||||
/// <param name="info">The information.</param>
|
||||
/// <returns>ImageDimensions</returns>
|
||||
/// <returns>ImageDimensions.</returns>
|
||||
ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the blurhash of the image.
|
||||
/// </summary>
|
||||
/// <param name="path">Path to the image file.</param>
|
||||
/// <returns>BlurHash</returns>
|
||||
/// <returns>BlurHash.</returns>
|
||||
string GetImageBlurHash(string path);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -7,7 +7,7 @@ using MediaBrowser.Model.Querying;
|
||||
namespace MediaBrowser.Controller.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IDtoService
|
||||
/// Interface IDtoService.
|
||||
/// </summary>
|
||||
public interface IDtoService
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public override bool SupportsPlayedStatus => false;
|
||||
|
||||
/// <summary>
|
||||
/// The _virtual children
|
||||
/// The _virtual children.
|
||||
/// </summary>
|
||||
private readonly ConcurrentBag<BaseItem> _virtualChildren = new ConcurrentBag<BaseItem>();
|
||||
|
||||
@@ -195,6 +195,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ using MediaBrowser.Model.Entities;
|
||||
namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Audio
|
||||
/// Class Audio.
|
||||
/// </summary>
|
||||
public class Audio : BaseItem,
|
||||
IHasAlbumArtist,
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ using MetadataProvider = MediaBrowser.Model.Entities.MetadataProvider;
|
||||
namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MusicAlbum
|
||||
/// Class MusicAlbum.
|
||||
/// </summary>
|
||||
public class MusicAlbum : Folder, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasLookupInfo<AlbumInfo>, IMetadataContainer
|
||||
{
|
||||
@@ -56,6 +56,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
return LibraryManager.GetArtist(name, options);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ using MetadataProvider = MediaBrowser.Model.Entities.MetadataProvider;
|
||||
namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MusicArtist
|
||||
/// Class MusicArtist.
|
||||
/// </summary>
|
||||
public class MusicArtist : Folder, IItemByName, IHasMusicGenres, IHasDualAccess, IHasLookupInfo<ArtistInfo>
|
||||
{
|
||||
@@ -111,7 +111,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
/// If the item is a folder, it returns the folder itself.
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[JsonIgnore]
|
||||
@@ -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();
|
||||
@@ -201,7 +202,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made.
|
||||
/// </summary>
|
||||
public override bool BeforeMetadataRefresh(bool replaceAllMetdata)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MusicGenre
|
||||
/// Class MusicGenre.
|
||||
/// </summary>
|
||||
public class MusicGenre : BaseItem, IItemByName
|
||||
{
|
||||
@@ -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];
|
||||
@@ -34,7 +35,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
/// If the item is a folder, it returns the folder itself.
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[JsonIgnore]
|
||||
@@ -94,11 +95,12 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made.
|
||||
/// </summary>
|
||||
public override bool BeforeMetadataRefresh(bool replaceAllMetdata)
|
||||
{
|
||||
|
||||
@@ -24,10 +24,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return SeriesName;
|
||||
}
|
||||
|
||||
public string FindSeriesName()
|
||||
{
|
||||
return SeriesName;
|
||||
}
|
||||
|
||||
public string FindSeriesPresentationUniqueKey()
|
||||
{
|
||||
return SeriesPresentationUniqueKey;
|
||||
|
||||
@@ -31,12 +31,12 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class BaseItem
|
||||
/// Class BaseItem.
|
||||
/// </summary>
|
||||
public abstract class BaseItem : IHasProviderIds, IHasLookupInfo<ItemLookupInfo>, IEquatable<BaseItem>
|
||||
{
|
||||
/// <summary>
|
||||
/// The supported image extensions
|
||||
/// The supported image extensions.
|
||||
/// </summary>
|
||||
public static readonly string[] SupportedImageExtensions
|
||||
= new[] { ".png", ".jpg", ".jpeg", ".tbn", ".gif" };
|
||||
@@ -75,7 +75,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public static char SlugChar = '-';
|
||||
|
||||
/// <summary>
|
||||
/// The trailer folder name
|
||||
/// The trailer folder name.
|
||||
/// </summary>
|
||||
public const string TrailerFolderName = "trailers";
|
||||
public const string ThemeSongsFolderName = "theme-music";
|
||||
@@ -108,6 +108,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public string PreferredMetadataLanguage { get; set; }
|
||||
|
||||
public long? Size { get; set; }
|
||||
|
||||
public string Container { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -243,7 +244,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
/// If the item is a folder, it returns the folder itself.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public virtual string ContainingFolderPath
|
||||
@@ -267,7 +268,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public string ServiceName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If this content came from an external service, the id of the content on that service
|
||||
/// If this content came from an external service, the id of the content on that service.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string ExternalId { get; set; }
|
||||
@@ -300,7 +301,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
get
|
||||
{
|
||||
//if (IsOffline)
|
||||
// if (IsOffline)
|
||||
//{
|
||||
// return LocationType.Offline;
|
||||
//}
|
||||
@@ -411,7 +412,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is just a helper for convenience
|
||||
/// This is just a helper for convenience.
|
||||
/// </summary>
|
||||
/// <value>The primary image path.</value>
|
||||
[JsonIgnore]
|
||||
@@ -448,6 +449,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
// hack alert
|
||||
return true;
|
||||
}
|
||||
|
||||
if (SourceType == SourceType.Channel)
|
||||
{
|
||||
// hack alert
|
||||
@@ -556,18 +558,26 @@ namespace MediaBrowser.Controller.Entities
|
||||
public DateTime DateLastRefreshed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// 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>
|
||||
@@ -603,7 +613,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
if (!IsFileProtocol)
|
||||
{
|
||||
return new string[] { };
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
|
||||
return new[] { Path };
|
||||
@@ -644,8 +654,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
_sortName = CreateSortName();
|
||||
}
|
||||
}
|
||||
|
||||
return _sortName;
|
||||
}
|
||||
|
||||
set => _sortName = value;
|
||||
}
|
||||
|
||||
@@ -676,7 +688,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <returns>System.String.</returns>
|
||||
protected virtual string CreateSortName()
|
||||
{
|
||||
if (Name == null) return null; //some items may not have name filled in properly
|
||||
if (Name == null)
|
||||
{
|
||||
return null; // some items may not have name filled in properly
|
||||
}
|
||||
|
||||
if (!EnableAlphaNumericSorting)
|
||||
{
|
||||
@@ -736,7 +751,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
builder.Append(chunkBuilder);
|
||||
}
|
||||
//logger.LogDebug("ModifySortChunks Start: {0} End: {1}", name, builder.ToString());
|
||||
// logger.LogDebug("ModifySortChunks Start: {0} End: {1}", name, builder.ToString());
|
||||
return builder.ToString().RemoveDiacritics();
|
||||
}
|
||||
|
||||
@@ -767,7 +782,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
get => GetParent() as Folder;
|
||||
set
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -800,7 +814,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds a parent of a given type
|
||||
/// Finds a parent of a given type.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <returns>``0.</returns>
|
||||
@@ -815,6 +829,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -838,6 +853,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return LibraryManager.GetItemById(id);
|
||||
}
|
||||
}
|
||||
@@ -1011,7 +1027,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return PlayAccess.None;
|
||||
}
|
||||
|
||||
//if (!user.IsParentalScheduleAllowed())
|
||||
// if (!user.IsParentalScheduleAllowed())
|
||||
//{
|
||||
// return PlayAccess.None;
|
||||
//}
|
||||
@@ -1064,7 +1080,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
}).ThenBy(i => i.Video3DFormat.HasValue ? 1 : 0)
|
||||
.ThenByDescending(i =>
|
||||
{
|
||||
@@ -1247,8 +1262,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
// Support plex/xbmc convention
|
||||
files.AddRange(fileSystemChildren
|
||||
.Where(i => !i.IsDirectory && string.Equals(FileSystem.GetFileNameWithoutExtension(i), ThemeSongFilename, StringComparison.OrdinalIgnoreCase))
|
||||
);
|
||||
.Where(i => !i.IsDirectory && string.Equals(FileSystem.GetFileNameWithoutExtension(i), ThemeSongFilename, StringComparison.OrdinalIgnoreCase)));
|
||||
|
||||
return LibraryManager.ResolvePaths(files, directoryService, null, new LibraryOptions())
|
||||
.OfType<Audio.Audio>()
|
||||
@@ -1347,20 +1361,18 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
protected virtual void TriggerOnRefreshStart()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected virtual void TriggerOnRefreshComplete()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the base implementation to refresh metadata for local trailers
|
||||
/// Overrides the base implementation to refresh metadata for local trailers.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>true if a provider reports we changed</returns>
|
||||
/// <returns>true if a provider reports we changed.</returns>
|
||||
public async Task<ItemUpdateType> RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
|
||||
{
|
||||
TriggerOnRefreshStart();
|
||||
@@ -1758,7 +1770,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if a given user has access to this item
|
||||
/// Determines if a given user has access to this item.
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns><c>true</c> if [is parental allowed] [the specified user]; otherwise, <c>false</c>.</returns>
|
||||
@@ -2064,7 +2076,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public virtual bool EnableRememberingTrackSelections => true;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a studio to the item
|
||||
/// Adds a studio to the item.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
@@ -2100,7 +2112,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a genre to the item
|
||||
/// Adds a genre to the item.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
@@ -2175,7 +2187,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
var data = UserDataManager.GetUserData(user, this);
|
||||
|
||||
//I think it is okay to do this here.
|
||||
// I think it is okay to do this here.
|
||||
// if this is only called when a user is manually forcing something to un-played
|
||||
// then it probably is what we want to do...
|
||||
data.PlayCount = 0;
|
||||
@@ -2195,7 +2207,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an image
|
||||
/// Gets an image.
|
||||
/// </summary>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="imageIndex">Index of the image.</param>
|
||||
@@ -2511,7 +2523,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the file system path to delete when the item is to be deleted
|
||||
/// Gets the file system path to delete when the item is to be deleted.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual IEnumerable<FileSystemMetadata> GetDeletePaths()
|
||||
@@ -2760,8 +2772,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
newOptions.ForceSave = true;
|
||||
}
|
||||
|
||||
//var parentId = Id;
|
||||
//if (!video.IsOwnedItem || video.ParentId != parentId)
|
||||
// var parentId = Id;
|
||||
// if (!video.IsOwnedItem || video.ParentId != parentId)
|
||||
//{
|
||||
// video.IsOwnedItem = true;
|
||||
// video.ParentId = parentId;
|
||||
@@ -2937,9 +2949,13 @@ namespace MediaBrowser.Controller.Entities
|
||||
public IEnumerable<BaseItem> GetTrailers()
|
||||
{
|
||||
if (this is IHasTrailers)
|
||||
{
|
||||
return ((IHasTrailers)this).LocalTrailerIds.Select(LibraryManager.GetItemById).Where(i => i != null).OrderBy(i => i.SortName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Array.Empty<BaseItem>();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsHD => Height >= 720;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
[JsonIgnore]
|
||||
public override bool SupportsPeople => false;
|
||||
|
||||
//public override double? GetDefaultPrimaryImageAspectRatio()
|
||||
// public override double? GetDefaultPrimaryImageAspectRatio()
|
||||
//{
|
||||
// double value = 16;
|
||||
// value /= 9;
|
||||
|
||||
@@ -18,12 +18,14 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Specialized Folder class that points to a subset of the physical folders in the system.
|
||||
/// It is created from the user-specific folders within the system root
|
||||
/// It is created from the user-specific folders within the system root.
|
||||
/// </summary>
|
||||
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()
|
||||
@@ -140,7 +142,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allow different display preferences for each collection folder
|
||||
/// Allow different display preferences for each collection folder.
|
||||
/// </summary>
|
||||
/// <value>The display prefs id.</value>
|
||||
[JsonIgnore]
|
||||
@@ -155,6 +157,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
public string[] PhysicalLocationsList { get; set; }
|
||||
|
||||
public Guid[] PhysicalFolderIds { get; set; }
|
||||
|
||||
protected override FileSystemMetadata[] GetFileSystemChildren(IDirectoryService directoryService)
|
||||
@@ -222,7 +225,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return null;
|
||||
}
|
||||
|
||||
return (totalProgresses / foldersWithProgress);
|
||||
return totalProgresses / foldersWithProgress;
|
||||
}
|
||||
|
||||
protected override bool RefreshLinkedChildren(IEnumerable<FileSystemMetadata> fileSystemChildren)
|
||||
|
||||
@@ -6,7 +6,7 @@ using MediaBrowser.Model.Entities;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Extensions
|
||||
/// Class Extensions.
|
||||
/// </summary>
|
||||
public static class Extensions
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ using Series = MediaBrowser.Controller.Entities.TV.Series;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Folder
|
||||
/// Class Folder.
|
||||
/// </summary>
|
||||
public class Folder : BaseItem
|
||||
{
|
||||
@@ -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;
|
||||
@@ -172,7 +175,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public virtual IEnumerable<BaseItem> Children => LoadChildren();
|
||||
|
||||
/// <summary>
|
||||
/// thread-safe access to all recursive children of this folder - without regard to user
|
||||
/// thread-safe access to all recursive children of this folder - without regard to user.
|
||||
/// </summary>
|
||||
/// <value>The recursive children.</value>
|
||||
[JsonIgnore]
|
||||
@@ -213,8 +216,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
protected virtual List<BaseItem> LoadChildren()
|
||||
{
|
||||
//logger.LogDebug("Loading children from {0} {1} {2}", GetType().Name, Id, Path);
|
||||
//just load our children from the repo - the library will be validated and maintained in other processes
|
||||
// logger.LogDebug("Loading children from {0} {1} {2}", GetType().Name, Id, Path);
|
||||
// just load our children from the repo - the library will be validated and maintained in other processes
|
||||
return GetCachedChildren();
|
||||
}
|
||||
|
||||
@@ -229,7 +232,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates that the children of the folder still exist
|
||||
/// Validates that the children of the folder still exist.
|
||||
/// </summary>
|
||||
/// <param name="progress">The progress.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
@@ -477,7 +480,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
innerProgress.RegisterAction(p =>
|
||||
{
|
||||
double innerPercent = currentInnerPercent;
|
||||
innerPercent += p / (count);
|
||||
innerPercent += p / count;
|
||||
progress.Report(innerPercent);
|
||||
});
|
||||
|
||||
@@ -500,8 +503,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
if (series != null)
|
||||
{
|
||||
await series.RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
}
|
||||
|
||||
await container.RefreshAllMetadata(refreshOptions, progress, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -553,7 +556,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
innerProgress.RegisterAction(p =>
|
||||
{
|
||||
double innerPercent = currentInnerPercent;
|
||||
innerPercent += p / (count);
|
||||
innerPercent += p / count;
|
||||
progress.Report(innerPercent);
|
||||
});
|
||||
|
||||
@@ -571,7 +574,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the children of this folder from the actual file system
|
||||
/// Get the children of this folder from the actual file system.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
protected virtual IEnumerable<BaseItem> GetNonCachedChildren(IDirectoryService directoryService)
|
||||
@@ -583,7 +586,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get our children from the repo - stubbed for now
|
||||
/// Get our children from the repo - stubbed for now.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
protected List<BaseItem> GetCachedChildren()
|
||||
@@ -615,7 +618,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
EnableImages = false
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return result.TotalRecordCount;
|
||||
@@ -941,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));
|
||||
@@ -991,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;
|
||||
@@ -1032,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;
|
||||
@@ -1223,7 +1235,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
//the true root should return our users root folder children
|
||||
// the true root should return our users root folder children
|
||||
if (IsPhysicalRoot)
|
||||
{
|
||||
return LibraryManager.GetUserRootFolder().GetChildren(user, includeLinkedChildren);
|
||||
@@ -1288,7 +1300,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets allowed recursive children of an item
|
||||
/// Gets allowed recursive children of an item.
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="includeLinkedChildren">if set to <c>true</c> [include linked children].</param>
|
||||
@@ -1393,6 +1405,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
list.Add(child);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -1415,6 +1428,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1629,7 +1643,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
Recursive = true,
|
||||
IsFolder = false,
|
||||
EnableTotalRecordCount = false
|
||||
|
||||
});
|
||||
|
||||
// Sweep through recursively and update status
|
||||
@@ -1647,7 +1660,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
IsFolder = false,
|
||||
IsVirtualItem = false,
|
||||
EnableTotalRecordCount = false
|
||||
|
||||
});
|
||||
|
||||
return itemsResult
|
||||
@@ -1669,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)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Genre
|
||||
/// Class Genre.
|
||||
/// </summary>
|
||||
public class Genre : BaseItem, IItemByName
|
||||
{
|
||||
@@ -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];
|
||||
@@ -31,7 +32,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
/// If the item is a folder, it returns the folder itself.
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[JsonIgnore]
|
||||
@@ -92,11 +93,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made.
|
||||
/// </summary>
|
||||
public override bool BeforeMetadataRefresh(bool replaceAllMetdata)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// This is just a marker interface to denote top level folders
|
||||
/// This is just a marker interface to denote top level folders.
|
||||
/// </summary>
|
||||
public interface ICollectionFolder : IHasCollectionType
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IHasAspectRatio
|
||||
/// Interface IHasAspectRatio.
|
||||
/// </summary>
|
||||
public interface IHasAspectRatio
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IHasDisplayOrder
|
||||
/// Interface IHasDisplayOrder.
|
||||
/// </summary>
|
||||
public interface IHasDisplayOrder
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IHasScreenshots
|
||||
/// Interface IHasScreenshots.
|
||||
/// </summary>
|
||||
public interface IHasScreenshots
|
||||
{
|
||||
|
||||
@@ -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,14 +9,16 @@ namespace MediaBrowser.Controller.Entities
|
||||
public class LinkedChild
|
||||
{
|
||||
public string Path { get; set; }
|
||||
|
||||
public LinkedChildType Type { get; set; }
|
||||
|
||||
public string LibraryItemId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Serves as a cache
|
||||
/// Serves as a cache.
|
||||
/// </summary>
|
||||
public Guid? ItemId { get; set; }
|
||||
|
||||
@@ -63,6 +65,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return _fileSystem.AreEqual(x.Path, y.Path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ using MediaBrowser.Model.Querying;
|
||||
namespace MediaBrowser.Controller.Entities.Movies
|
||||
{
|
||||
/// <summary>
|
||||
/// Class BoxSet
|
||||
/// Class BoxSet.
|
||||
/// </summary>
|
||||
public class BoxSet : Folder, IHasTrailers, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>
|
||||
{
|
||||
@@ -198,7 +198,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
|
||||
public Guid[] GetLibraryFolderIds()
|
||||
{
|
||||
var expandedFolders = new List<Guid>() { };
|
||||
var expandedFolders = new List<Guid>();
|
||||
|
||||
return FlattenItems(this, expandedFolders)
|
||||
.SelectMany(i => LibraryManager.GetCollectionFolders(i))
|
||||
|
||||
@@ -13,7 +13,7 @@ using MediaBrowser.Model.Providers;
|
||||
namespace MediaBrowser.Controller.Entities.Movies
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Movie
|
||||
/// Class Movie.
|
||||
/// </summary>
|
||||
public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
|
||||
{
|
||||
|
||||
@@ -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];
|
||||
@@ -46,7 +47,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
/// If the item is a folder, it returns the folder itself.
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[JsonIgnore]
|
||||
@@ -114,11 +115,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made.
|
||||
/// </summary>
|
||||
public override bool BeforeMetadataRefresh(bool replaceAllMetdata)
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Studio
|
||||
/// Class Studio.
|
||||
/// </summary>
|
||||
public class Studio : BaseItem, IItemByName
|
||||
{
|
||||
@@ -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];
|
||||
@@ -25,7 +26,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
/// If the item is a folder, it returns the folder itself.
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[JsonIgnore]
|
||||
@@ -93,11 +94,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made.
|
||||
/// </summary>
|
||||
public override bool BeforeMetadataRefresh(bool replaceAllMetdata)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Episode
|
||||
/// Class Episode.
|
||||
/// </summary>
|
||||
public class Episode : Video, IHasTrailers, IHasLookupInfo<EpisodeInfo>, IHasSeries
|
||||
{
|
||||
@@ -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")));
|
||||
}
|
||||
|
||||
@@ -101,7 +104,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This Episode's Series Instance
|
||||
/// This Episode's Series Instance.
|
||||
/// </summary>
|
||||
/// <value>The series.</value>
|
||||
[JsonIgnore]
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ using MediaBrowser.Model.Querying;
|
||||
namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Season
|
||||
/// Class Season.
|
||||
/// </summary>
|
||||
public class Season : Folder, IHasSeries, IHasLookupInfo<SeasonInfo>
|
||||
{
|
||||
@@ -68,7 +68,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This Episode's Series Instance
|
||||
/// This Episode's Series Instance.
|
||||
/// </summary>
|
||||
/// <value>The series.</value>
|
||||
[JsonIgnore]
|
||||
@@ -81,6 +81,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
seriesId = FindSeriesId();
|
||||
}
|
||||
|
||||
return seriesId == Guid.Empty ? null : (LibraryManager.GetItemById(seriesId) as Series);
|
||||
}
|
||||
}
|
||||
@@ -225,7 +226,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
public override bool BeforeMetadataRefresh(bool replaceAllMetdata)
|
||||
|
||||
@@ -17,7 +17,7 @@ using MetadataProvider = MediaBrowser.Model.Entities.MetadataProvider;
|
||||
namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Series
|
||||
/// Class Series.
|
||||
/// </summary>
|
||||
public class Series : Folder, IHasTrailers, IHasDisplayOrder, IHasLookupInfo<SeriesInfo>, IMetadataContainer
|
||||
{
|
||||
@@ -30,6 +30,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
}
|
||||
|
||||
public DayOfWeek[] AirDays { get; set; }
|
||||
|
||||
public string AirTime { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -54,7 +55,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
public IReadOnlyList<Guid> RemoteTrailerIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// airdate, dvd or absolute
|
||||
/// airdate, dvd or absolute.
|
||||
/// </summary>
|
||||
public string DisplayOrder { get; set; }
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -9,7 +9,7 @@ using MediaBrowser.Model.Providers;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Trailer
|
||||
/// Class Trailer.
|
||||
/// </summary>
|
||||
public class Trailer : Video, IHasLookupInfo<TrailerInfo>
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Text.Json.Serialization;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class UserItemData
|
||||
/// Class UserItemData.
|
||||
/// </summary>
|
||||
public class UserItemData
|
||||
{
|
||||
@@ -21,11 +21,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
public string Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The _rating
|
||||
/// The _rating.
|
||||
/// </summary>
|
||||
private double? _rating;
|
||||
/// <summary>
|
||||
/// Gets or sets the users 0-10 rating
|
||||
/// Gets or sets the users 0-10 rating.
|
||||
/// </summary>
|
||||
/// <value>The rating.</value>
|
||||
/// <exception cref="ArgumentOutOfRangeException">Rating;A 0 to 10 rating is required for UserItemData.</exception>
|
||||
@@ -105,6 +105,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value.HasValue)
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
parent = LibraryManager.GetItemById(ParentId) as Folder ?? parent;
|
||||
}
|
||||
|
||||
return new UserViewBuilder(UserViewManager, LibraryManager, LoggerFactory.CreateLogger<UserViewBuilder>(), UserDataManager, TVSeriesManager, ConfigurationManager)
|
||||
return new UserViewBuilder(UserViewManager, LibraryManager, Logger, UserDataManager, TVSeriesManager, ConfigurationManager)
|
||||
.GetUserItems(parent, this, CollectionType, query);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.TV;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -22,7 +23,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
private readonly IUserViewManager _userViewManager;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILogger<UserViewBuilder> _logger;
|
||||
private readonly ILogger<BaseItem> _logger;
|
||||
private readonly IUserDataManager _userDataManager;
|
||||
private readonly ITVSeriesManager _tvSeriesManager;
|
||||
private readonly IServerConfigurationManager _config;
|
||||
@@ -30,7 +31,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public UserViewBuilder(
|
||||
IUserViewManager userViewManager,
|
||||
ILibraryManager libraryManager,
|
||||
ILogger<UserViewBuilder> logger,
|
||||
ILogger<BaseItem> logger,
|
||||
IUserDataManager userDataManager,
|
||||
ITVSeriesManager tvSeriesManager,
|
||||
IServerConfigurationManager config)
|
||||
@@ -47,7 +48,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var user = query.User;
|
||||
|
||||
//if (query.IncludeItemTypes != null &&
|
||||
// if (query.IncludeItemTypes != null &&
|
||||
// query.IncludeItemTypes.Length == 1 &&
|
||||
// string.Equals(query.IncludeItemTypes[0], "Playlist", StringComparison.OrdinalIgnoreCase))
|
||||
//{
|
||||
@@ -270,7 +271,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
_logger.LogError(ex, "Error getting genre");
|
||||
return null;
|
||||
}
|
||||
|
||||
})
|
||||
.Where(i => i != null)
|
||||
.Select(i => GetUserViewWithName(i.Name, SpecialFolder.MovieGenre, i.SortName, parent));
|
||||
@@ -347,7 +347,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
Limit = query.Limit,
|
||||
StartIndex = query.StartIndex,
|
||||
UserId = query.User.Id
|
||||
|
||||
}, parentFolders, query.DtoOptions);
|
||||
|
||||
return result;
|
||||
@@ -384,7 +383,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
IncludeItemTypes = new[] { typeof(Series).Name },
|
||||
Recursive = true,
|
||||
EnableTotalRecordCount = false
|
||||
|
||||
}).Items
|
||||
.SelectMany(i => i.Genres)
|
||||
.DistinctNames()
|
||||
@@ -399,7 +397,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
_logger.LogError(ex, "Error getting genre");
|
||||
return null;
|
||||
}
|
||||
|
||||
})
|
||||
.Where(i => i != null)
|
||||
.Select(i => GetUserViewWithName(i.Name, SpecialFolder.TvGenre, i.SortName, parent));
|
||||
@@ -424,7 +421,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return new QueryResult<BaseItem>
|
||||
{
|
||||
Items = result.Items, //TODO Fix The co-variant conversion between T[] and BaseItem[], this can generate runtime issues if T is not BaseItem.
|
||||
Items = result.Items, // TODO Fix The co-variant conversion between T[] and BaseItem[], this can generate runtime issues if T is not BaseItem.
|
||||
TotalRecordCount = result.TotalRecordCount
|
||||
};
|
||||
}
|
||||
@@ -964,6 +961,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
.OfType<Folder>()
|
||||
.Where(UserView.IsEligibleForGrouping);
|
||||
}
|
||||
|
||||
return _libraryManager.GetUserRootFolder()
|
||||
.GetChildren(user, true)
|
||||
.OfType<Folder>()
|
||||
@@ -982,6 +980,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return folder != null && viewTypes.Contains(folder.CollectionType ?? string.Empty, StringComparer.OrdinalIgnoreCase);
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
return GetMediaFolders(user)
|
||||
.Where(i =>
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ using MediaBrowser.Model.MediaInfo;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Video
|
||||
/// Class Video.
|
||||
/// </summary>
|
||||
public class Video : BaseItem,
|
||||
IHasAspectRatio,
|
||||
@@ -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>();
|
||||
}
|
||||
|
||||
@@ -535,7 +545,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
ItemId = Id,
|
||||
Index = DefaultVideoStreamIndex.Value
|
||||
|
||||
}).FirstOrDefault();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Year
|
||||
/// Class Year.
|
||||
/// </summary>
|
||||
public class Year : BaseItem, IItemByName
|
||||
{
|
||||
@@ -21,7 +21,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
/// If the item is a folder, it returns the folder itself.
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[JsonIgnore]
|
||||
@@ -103,11 +103,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
Logger.LogDebug("{0} path has changed from {1} to {2}", GetType().Name, Path, newPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.RequiresRefresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made
|
||||
/// This is called before any metadata refresh and returns true or false indicating if changes were made.
|
||||
/// </summary>
|
||||
public override bool BeforeMetadataRefresh(bool replaceAllMetdata)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,11 @@ namespace MediaBrowser.Controller.Extensions
|
||||
/// </summary>
|
||||
public const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration";
|
||||
|
||||
/// <summary>
|
||||
/// The key for the FFmpeg path option.
|
||||
/// </summary>
|
||||
public const string FfmpegPathKey = "ffmpeg";
|
||||
|
||||
/// <summary>
|
||||
/// The key for a setting that indicates whether playlists should allow duplicate entries.
|
||||
/// </summary>
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
|
||||
namespace MediaBrowser.Controller.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Class BaseExtensions
|
||||
/// Class BaseExtensions.
|
||||
/// </summary>
|
||||
public static class StringExtensions
|
||||
{
|
||||
|
||||
@@ -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));
|
||||
@@ -77,7 +79,7 @@ namespace MediaBrowser.Controller.IO
|
||||
|
||||
if (string.IsNullOrEmpty(newPath))
|
||||
{
|
||||
//invalid shortcut - could be old or target could just be unavailable
|
||||
// invalid shortcut - could be old or target could just be unavailable
|
||||
logger.LogWarning("Encountered invalid shortcut: " + fullName);
|
||||
continue;
|
||||
}
|
||||
@@ -116,9 +118,9 @@ namespace MediaBrowser.Controller.IO
|
||||
returnResult[index] = value;
|
||||
index++;
|
||||
}
|
||||
|
||||
return returnResult;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Http;
|
||||
namespace MediaBrowser.Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IServerApplicationHost
|
||||
/// Interface IServerApplicationHost.
|
||||
/// </summary>
|
||||
public interface IServerApplicationHost : IApplicationHost
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace MediaBrowser.Controller
|
||||
public interface IServerApplicationPaths : IApplicationPaths
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the path to the base root media directory
|
||||
/// Gets the path to the base root media directory.
|
||||
/// </summary>
|
||||
/// <value>The root folder path.</value>
|
||||
string RootFolderPath { get; }
|
||||
@@ -17,13 +17,13 @@ namespace MediaBrowser.Controller
|
||||
string DefaultUserViewsPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the People directory
|
||||
/// Gets the path to the People directory.
|
||||
/// </summary>
|
||||
/// <value>The people path.</value>
|
||||
string PeoplePath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the Genre directory
|
||||
/// Gets the path to the Genre directory.
|
||||
/// </summary>
|
||||
/// <value>The genre path.</value>
|
||||
string GenrePath { get; }
|
||||
@@ -35,25 +35,25 @@ namespace MediaBrowser.Controller
|
||||
string MusicGenrePath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the Studio directory
|
||||
/// Gets the path to the Studio directory.
|
||||
/// </summary>
|
||||
/// <value>The studio path.</value>
|
||||
string StudioPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the Year directory
|
||||
/// Gets the path to the Year directory.
|
||||
/// </summary>
|
||||
/// <value>The year path.</value>
|
||||
string YearPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the General IBN directory
|
||||
/// Gets the path to the General IBN directory.
|
||||
/// </summary>
|
||||
/// <value>The general path.</value>
|
||||
string GeneralPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the Ratings IBN directory
|
||||
/// Gets the path to the Ratings IBN directory.
|
||||
/// </summary>
|
||||
/// <value>The ratings path.</value>
|
||||
string RatingsPath { get; }
|
||||
@@ -65,7 +65,7 @@ namespace MediaBrowser.Controller
|
||||
string MediaInfoImagesPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the user configuration directory
|
||||
/// Gets the path to the user configuration directory.
|
||||
/// </summary>
|
||||
/// <value>The user configuration directory path.</value>
|
||||
string UserConfigurationDirectoryPath { get; }
|
||||
|
||||
@@ -3,6 +3,7 @@ namespace MediaBrowser.Controller.Library
|
||||
public class DeleteOptions
|
||||
{
|
||||
public bool DeleteFileLocation { get; set; }
|
||||
|
||||
public bool DeleteFromExternalProvider { get; set; }
|
||||
|
||||
public DeleteOptions()
|
||||
|
||||
@@ -5,7 +5,7 @@ using MediaBrowser.Controller.Entities;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Class BaseIntroProvider
|
||||
/// Class BaseIntroProvider.
|
||||
/// </summary>
|
||||
public interface IIntroProvider
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ using Person = MediaBrowser.Controller.Entities.Person;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface ILibraryManager
|
||||
/// Interface ILibraryManager.
|
||||
/// </summary>
|
||||
public interface ILibraryManager
|
||||
{
|
||||
@@ -30,15 +30,13 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="fileInfo">The file information.</param>
|
||||
/// <param name="parent">The parent.</param>
|
||||
/// <param name="allowIgnorePath">Allow the path to be ignored.</param>
|
||||
/// <returns>BaseItem.</returns>
|
||||
BaseItem ResolvePath(
|
||||
FileSystemMetadata fileInfo,
|
||||
Folder parent = null,
|
||||
bool allowIgnorePath = true);
|
||||
Folder parent = null);
|
||||
|
||||
/// <summary>
|
||||
/// Resolves a set of files into a list of BaseItem
|
||||
/// Resolves a set of files into a list of BaseItem.
|
||||
/// </summary>
|
||||
IEnumerable<BaseItem> ResolvePaths(
|
||||
IEnumerable<FileSystemMetadata> files,
|
||||
@@ -54,7 +52,7 @@ namespace MediaBrowser.Controller.Library
|
||||
AggregateFolder RootFolder { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Person
|
||||
/// Gets a Person.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>Task{Person}.</returns>
|
||||
@@ -75,14 +73,14 @@ namespace MediaBrowser.Controller.Library
|
||||
MusicArtist GetArtist(string name);
|
||||
MusicArtist GetArtist(string name, DtoOptions options);
|
||||
/// <summary>
|
||||
/// Gets a Studio
|
||||
/// Gets a Studio.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>Task{Studio}.</returns>
|
||||
Studio GetStudio(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Genre
|
||||
/// Gets a Genre.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>Task{Genre}.</returns>
|
||||
@@ -96,7 +94,7 @@ namespace MediaBrowser.Controller.Library
|
||||
MusicGenre GetMusicGenre(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Year
|
||||
/// Gets a Year.
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <returns>Task{Year}.</returns>
|
||||
@@ -113,7 +111,7 @@ namespace MediaBrowser.Controller.Library
|
||||
Task ValidatePeople(CancellationToken cancellationToken, IProgress<double> progress);
|
||||
|
||||
/// <summary>
|
||||
/// Reloads the root media folder
|
||||
/// Reloads the root media folder.
|
||||
/// </summary>
|
||||
/// <param name="progress">The progress.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface for tasks that run after the media library scan
|
||||
/// An interface for tasks that run after the media library scan.
|
||||
/// </summary>
|
||||
public interface ILibraryPostScanTask
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using MediaBrowser.Controller.Entities;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IMetadataSaver
|
||||
/// Interface IMetadataSaver.
|
||||
/// </summary>
|
||||
public interface IMetadataSaver
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using MediaBrowser.Model.Search;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface ILibrarySearchEngine
|
||||
/// Interface ILibrarySearchEngine.
|
||||
/// </summary>
|
||||
public interface ISearchEngine
|
||||
{
|
||||
|
||||
@@ -42,14 +42,14 @@ namespace MediaBrowser.Controller.Library
|
||||
UserItemDataDto GetUserDataDto(BaseItem item, BaseItemDto itemDto, User user, DtoOptions dto_options);
|
||||
|
||||
/// <summary>
|
||||
/// Get all user data for the given user
|
||||
/// Get all user data for the given user.
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
List<UserItemData> GetAllUserData(Guid userId);
|
||||
|
||||
/// <summary>
|
||||
/// Save the all provided user data for the given user
|
||||
/// Save the all provided user data for the given user.
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="userData"></param>
|
||||
@@ -58,7 +58,7 @@ namespace MediaBrowser.Controller.Library
|
||||
void SaveAllUserData(Guid userId, UserItemData[] userData, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Updates playstate for an item and returns true or false indicating if it was played to completion
|
||||
/// Updates playstate for an item and returns true or false indicating if it was played to completion.
|
||||
/// </summary>
|
||||
bool UpdatePlayState(BaseItem item, UserItemData data, long? positionTicks);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ using MediaBrowser.Model.Users;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IUserManager
|
||||
/// Interface IUserManager.
|
||||
/// </summary>
|
||||
public interface IUserManager
|
||||
{
|
||||
@@ -111,8 +111,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <summary>
|
||||
/// Deletes the specified user.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to be deleted.</param>
|
||||
void DeleteUser(User user);
|
||||
/// <param name="userId">The id of the user to be deleted.</param>
|
||||
void DeleteUser(Guid userId);
|
||||
|
||||
/// <summary>
|
||||
/// Resets the password.
|
||||
|
||||
@@ -3,7 +3,7 @@ using MediaBrowser.Controller.Entities;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ItemChangeEventArgs
|
||||
/// Class ItemChangeEventArgs.
|
||||
/// </summary>
|
||||
public class ItemChangeEventArgs
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Library
|
||||
public class ItemResolveArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The _app paths
|
||||
/// The _app paths.
|
||||
/// </summary>
|
||||
private readonly IServerApplicationPaths _appPaths;
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace MediaBrowser.Controller.Library
|
||||
|
||||
public LibraryOptions GetLibraryOptions()
|
||||
{
|
||||
return LibraryOptions ?? (LibraryOptions = (Parent == null ? new LibraryOptions() : BaseItem.LibraryManager.GetLibraryOptions(Parent)));
|
||||
return LibraryOptions ?? (LibraryOptions = Parent == null ? new LibraryOptions() : BaseItem.LibraryManager.GetLibraryOptions(Parent));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -89,7 +89,6 @@ namespace MediaBrowser.Controller.Library
|
||||
|
||||
return parentDir.Length > _appPaths.RootFolderPath.Length
|
||||
&& parentDir.StartsWith(_appPaths.RootFolderPath, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,8 +128,8 @@ namespace MediaBrowser.Controller.Library
|
||||
}
|
||||
|
||||
return item != null;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -225,8 +224,6 @@ namespace MediaBrowser.Controller.Library
|
||||
|
||||
public string CollectionType { get; set; }
|
||||
|
||||
#region Equality Overrides
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified <see cref="object" /> is equal to this instance.
|
||||
/// </summary>
|
||||
@@ -255,13 +252,15 @@ namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
if (args != null)
|
||||
{
|
||||
if (args.Path == null && Path == null) return true;
|
||||
if (args.Path == null && Path == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return args.Path != null && BaseItem.FileSystem.AreEqual(args.Path, Path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,23 +8,32 @@ using MediaBrowser.Model.Dto;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information about a playback progress event
|
||||
/// Holds information about a playback progress event.
|
||||
/// </summary>
|
||||
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()
|
||||
|
||||
@@ -5,21 +5,21 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Profiler
|
||||
/// Class Profiler.
|
||||
/// </summary>
|
||||
public class Profiler : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// The name
|
||||
/// The name.
|
||||
/// </summary>
|
||||
readonly string _name;
|
||||
/// <summary>
|
||||
/// The stopwatch
|
||||
/// The stopwatch.
|
||||
/// </summary>
|
||||
readonly Stopwatch _stopwatch;
|
||||
|
||||
/// <summary>
|
||||
/// The _logger
|
||||
/// The _logger.
|
||||
/// </summary>
|
||||
private readonly ILogger<Profiler> _logger;
|
||||
|
||||
@@ -37,7 +37,6 @@ namespace MediaBrowser.Controller.Library
|
||||
_stopwatch = new Stopwatch();
|
||||
_stopwatch.Start();
|
||||
}
|
||||
#region IDisposable Members
|
||||
|
||||
/// <summary>
|
||||
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
||||
@@ -67,10 +66,9 @@ namespace MediaBrowser.Controller.Library
|
||||
message = string.Format("{0} took {1} seconds.",
|
||||
_name, ((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000"));
|
||||
}
|
||||
|
||||
_logger.LogInformation(message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using MediaBrowser.Controller.Entities;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Class SearchHintInfo
|
||||
/// Class SearchHintInfo.
|
||||
/// </summary>
|
||||
public class SearchHintInfo
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Class TVUtils
|
||||
/// Class TVUtils.
|
||||
/// </summary>
|
||||
public static class TVUtils
|
||||
{
|
||||
@@ -38,8 +38,9 @@ namespace MediaBrowser.Controller.Library
|
||||
};
|
||||
}
|
||||
|
||||
return new DayOfWeek[] { };
|
||||
return Array.Empty<DayOfWeek>();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using MediaBrowser.Model.Entities;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Class UserDataSaveEventArgs
|
||||
/// Class UserDataSaveEventArgs.
|
||||
/// </summary>
|
||||
public class UserDataSaveEventArgs : EventArgs
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using MediaBrowser.Model.LiveTv;
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ChannelInfo
|
||||
/// Class ChannelInfo.
|
||||
/// </summary>
|
||||
public class ChannelInfo
|
||||
{
|
||||
@@ -44,13 +44,13 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public ChannelType ChannelType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Supply the image path if it can be accessed directly from the file system
|
||||
/// Supply the image path if it can be accessed directly from the file system.
|
||||
/// </summary>
|
||||
/// <value>The image path.</value>
|
||||
public string ImagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Supply the image url if it can be downloaded
|
||||
/// Supply the image url if it can be downloaded.
|
||||
/// </summary>
|
||||
/// <value>The image URL.</value>
|
||||
public string ImageUrl { get; set; }
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ using MediaBrowser.Model.Querying;
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages all live tv services installed on the server
|
||||
/// Manages all live tv services installed on the server.
|
||||
/// </summary>
|
||||
public interface ILiveTvManager
|
||||
{
|
||||
@@ -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>
|
||||
|
||||
@@ -9,12 +9,11 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
public LiveTvConflictException()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public LiveTvConflictException(string message)
|
||||
: base(message)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,14 +140,14 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
|
||||
/// <summary>
|
||||
/// Returns the folder containing the item.
|
||||
/// If the item is a folder, it returns the folder itself
|
||||
/// If the item is a folder, it returns the folder itself.
|
||||
/// </summary>
|
||||
/// <value>The containing folder path.</value>
|
||||
[JsonIgnore]
|
||||
public override string ContainingFolderPath => Path;
|
||||
|
||||
//[JsonIgnore]
|
||||
//public override string MediaType
|
||||
// public override string MediaType
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public string ChannelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the program
|
||||
/// Name of the program.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
@@ -95,13 +95,13 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public string EpisodeTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Supply the image path if it can be accessed directly from the file system
|
||||
/// Supply the image path if it can be accessed directly from the file system.
|
||||
/// </summary>
|
||||
/// <value>The image path.</value>
|
||||
public string ImagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Supply the image url if it can be downloaded
|
||||
/// Supply the image url if it can be downloaded.
|
||||
/// </summary>
|
||||
/// <value>The image URL.</value>
|
||||
public string ImageUrl { get; set; }
|
||||
@@ -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()
|
||||
|
||||
@@ -169,13 +169,13 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
public float? CommunityRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Supply the image path if it can be accessed directly from the file system
|
||||
/// Supply the image path if it can be accessed directly from the file system.
|
||||
/// </summary>
|
||||
/// <value>The image path.</value>
|
||||
public string ImagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Supply the image url if it can be downloaded
|
||||
/// Supply the image url if it can be downloaded.
|
||||
/// </summary>
|
||||
/// <value>The image URL.</value>
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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)
|
||||
@@ -418,7 +425,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Predicts the audio sample rate that will be in the output stream
|
||||
/// Predicts the audio sample rate that will be in the output stream.
|
||||
/// </summary>
|
||||
public double? TargetVideoLevel
|
||||
{
|
||||
@@ -441,7 +448,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Predicts the audio sample rate that will be in the output stream
|
||||
/// Predicts the audio sample rate that will be in the output stream.
|
||||
/// </summary>
|
||||
public int? TargetVideoBitDepth
|
||||
{
|
||||
@@ -476,7 +483,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Predicts the audio sample rate that will be in the output stream
|
||||
/// Predicts the audio sample rate that will be in the output stream.
|
||||
/// </summary>
|
||||
public float? TargetFramerate
|
||||
{
|
||||
@@ -508,7 +515,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Predicts the audio sample rate that will be in the output stream
|
||||
/// Predicts the audio sample rate that will be in the output stream.
|
||||
/// </summary>
|
||||
public int? TargetPacketLength
|
||||
{
|
||||
@@ -524,7 +531,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Predicts the audio sample rate that will be in the output stream
|
||||
/// Predicts the audio sample rate that will be in the output stream.
|
||||
/// </summary>
|
||||
public string TargetVideoProfile
|
||||
{
|
||||
@@ -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);
|
||||
@@ -679,20 +687,20 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum TranscodingJobType
|
||||
/// Enum TranscodingJobType.
|
||||
/// </summary>
|
||||
public enum TranscodingJobType
|
||||
{
|
||||
/// <summary>
|
||||
/// The progressive
|
||||
/// The progressive.
|
||||
/// </summary>
|
||||
Progressive,
|
||||
/// <summary>
|
||||
/// The HLS
|
||||
/// The HLS.
|
||||
/// </summary>
|
||||
Hls,
|
||||
/// <summary>
|
||||
/// The dash
|
||||
/// The dash.
|
||||
/// </summary>
|
||||
Dash
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -11,7 +11,7 @@ using MediaBrowser.Model.System;
|
||||
namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IMediaEncoder
|
||||
/// Interface IMediaEncoder.
|
||||
/// </summary>
|
||||
public interface IMediaEncoder : ITranscoderSupport
|
||||
{
|
||||
@@ -27,12 +27,26 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
string EncoderPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Supportses the decoder.
|
||||
/// Whether given encoder codec is supported.
|
||||
/// </summary>
|
||||
/// <param name="encoder">The encoder.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
bool SupportsEncoder(string encoder);
|
||||
|
||||
/// <summary>
|
||||
/// Whether given decoder codec is supported.
|
||||
/// </summary>
|
||||
/// <param name="decoder">The decoder.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
bool SupportsDecoder(string decoder);
|
||||
|
||||
/// <summary>
|
||||
/// Whether given hardware acceleration type is supported.
|
||||
/// </summary>
|
||||
/// <param name="hwaccel">The hwaccel.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
bool SupportsHwaccel(string hwaccel);
|
||||
|
||||
/// <summary>
|
||||
/// Extracts the audio image.
|
||||
/// </summary>
|
||||
@@ -98,7 +112,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
void SetFFmpegPath();
|
||||
|
||||
void UpdateEncoderPath(string path, string pathType);
|
||||
bool SupportsEncoder(string encoder);
|
||||
|
||||
IEnumerable<string> GetPrimaryPlaylistVobFiles(string path, IIsoMount isoMount, uint? titleNumber);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using MediaBrowser.Model.IO;
|
||||
namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MediaEncoderHelpers
|
||||
/// Class MediaEncoderHelpers.
|
||||
/// </summary>
|
||||
public static class MediaEncoderHelpers
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -31,9 +31,9 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <summary>
|
||||
/// The request filter is executed before the service.
|
||||
/// </summary>
|
||||
/// <param name="request">The http request wrapper</param>
|
||||
/// <param name="response">The http response wrapper</param>
|
||||
/// <param name="requestDto">The request DTO</param>
|
||||
/// <param name="request">The http request wrapper.</param>
|
||||
/// <param name="response">The http response wrapper.</param>
|
||||
/// <param name="requestDto">The request DTO.</param>
|
||||
public void RequestFilter(IRequest request, HttpResponse response, object requestDto)
|
||||
{
|
||||
AuthService.Authenticate(request, this);
|
||||
@@ -60,8 +60,11 @@ namespace MediaBrowser.Controller.Net
|
||||
public interface IAuthenticationAttributes
|
||||
{
|
||||
bool EscapeParentalControl { get; }
|
||||
|
||||
bool AllowBeforeStartupWizard { get; }
|
||||
|
||||
bool AllowLocal { get; }
|
||||
|
||||
bool AllowLocalOnly { get; }
|
||||
|
||||
string[] GetRoles();
|
||||
|
||||
@@ -11,7 +11,7 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Starts sending data over a web socket periodically when a message is received, and then stops when a corresponding stop message is received
|
||||
/// Starts sending data over a web socket periodically when a message is received, and then stops when a corresponding stop message is received.
|
||||
/// </summary>
|
||||
/// <typeparam name="TReturnDataType">The type of the T return data type.</typeparam>
|
||||
/// <typeparam name="TStateType">The type of the T state type.</typeparam>
|
||||
@@ -20,7 +20,7 @@ namespace MediaBrowser.Controller.Net
|
||||
where TReturnDataType : class
|
||||
{
|
||||
/// <summary>
|
||||
/// The _active connections
|
||||
/// The _active connections.
|
||||
/// </summary>
|
||||
private readonly List<Tuple<IWebSocketConnection, CancellationTokenSource, TStateType>> _activeConnections =
|
||||
new List<Tuple<IWebSocketConnection, CancellationTokenSource, TStateType>>();
|
||||
@@ -38,7 +38,7 @@ namespace MediaBrowser.Controller.Net
|
||||
protected abstract Task<TReturnDataType> GetDataToSend();
|
||||
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// The logger.
|
||||
/// </summary>
|
||||
protected ILogger<BasePeriodicWebSocketListener<TReturnDataType, TStateType>> Logger;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace MediaBrowser.Controller.Net
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts sending messages over a web socket
|
||||
/// Starts sending messages over a web socket.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
private void Start(WebSocketMessageInfo message)
|
||||
@@ -180,7 +180,7 @@ namespace MediaBrowser.Controller.Net
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops sending messages over a web socket
|
||||
/// Stops sending messages over a web socket.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
private void Stop(WebSocketMessageInfo message)
|
||||
@@ -214,7 +214,7 @@ namespace MediaBrowser.Controller.Net
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
//TODO Investigate and properly fix.
|
||||
// TODO Investigate and properly fix.
|
||||
}
|
||||
|
||||
lock (_activeConnections)
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using MediaBrowser.Model.Services;
|
||||
namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IHttpResultFactory
|
||||
/// Interface IHttpResultFactory.
|
||||
/// </summary>
|
||||
public interface IHttpResultFactory
|
||||
{
|
||||
|
||||
@@ -29,19 +29,19 @@ namespace MediaBrowser.Controller.Net
|
||||
void Init(IEnumerable<Type> serviceTypes, IEnumerable<IWebSocketListener> listener, IEnumerable<string> urlPrefixes);
|
||||
|
||||
/// <summary>
|
||||
/// If set, all requests will respond with this message
|
||||
/// If set, all requests will respond with this message.
|
||||
/// </summary>
|
||||
string GlobalResponse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The HTTP request handler
|
||||
/// The HTTP request handler.
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
Task RequestHandler(HttpContext context);
|
||||
|
||||
/// <summary>
|
||||
/// Get the default CORS headers
|
||||
/// Get the default CORS headers.
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Threading.Tasks;
|
||||
namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
/// <summary>
|
||||
///This is an interface for listening to messages coming through a web socket connection
|
||||
///This is an interface for listening to messages coming through a web socket connection.
|
||||
/// </summary>
|
||||
public interface IWebSocketListener
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SecurityException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message that describes the error</param>
|
||||
/// <param name="message">The message that describes the error.</param>
|
||||
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
|
||||
public SecurityException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -3,7 +3,7 @@ using MediaBrowser.Model.Net;
|
||||
namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Class WebSocketMessageInfo
|
||||
/// Class WebSocketMessageInfo.
|
||||
/// </summary>
|
||||
public class WebSocketMessageInfo : WebSocketMessage<string>
|
||||
{
|
||||
|
||||
@@ -9,12 +9,12 @@ using MediaBrowser.Model.Querying;
|
||||
namespace MediaBrowser.Controller.Persistence
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides an interface to implement an Item repository
|
||||
/// Provides an interface to implement an Item repository.
|
||||
/// </summary>
|
||||
public interface IItemRepository : IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// Saves an item
|
||||
/// Saves an item.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
@@ -43,14 +43,14 @@ namespace MediaBrowser.Controller.Persistence
|
||||
BaseItem RetrieveItem(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets chapters for an item
|
||||
/// Gets chapters for an item.
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
List<ChapterInfo> GetChapters(BaseItem id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single chapter for an item
|
||||
/// Gets a single chapter for an item.
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="index"></param>
|
||||
|
||||
@@ -3,12 +3,12 @@ using System;
|
||||
namespace MediaBrowser.Controller.Persistence
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a base interface for all the repository interfaces
|
||||
/// Provides a base interface for all the repository interfaces.
|
||||
/// </summary>
|
||||
public interface IRepository : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name of the repository
|
||||
/// Gets the name of the repository.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
string Name { get; }
|
||||
|
||||
@@ -5,7 +5,7 @@ using MediaBrowser.Controller.Entities;
|
||||
namespace MediaBrowser.Controller.Persistence
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides an interface to implement a UserData repository
|
||||
/// Provides an interface to implement a UserData repository.
|
||||
/// </summary>
|
||||
public interface IUserDataRepository : IRepository
|
||||
{
|
||||
@@ -30,20 +30,19 @@ namespace MediaBrowser.Controller.Persistence
|
||||
UserItemData GetUserData(long userId, List<string> keys);
|
||||
|
||||
/// <summary>
|
||||
/// Return all user data associated with the given user
|
||||
/// Return all user data associated with the given user.
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
List<UserItemData> GetAllUserData(long userId);
|
||||
|
||||
/// <summary>
|
||||
/// Save all user data associated with the given user
|
||||
/// Save all user data associated with the given user.
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="userData"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
void SaveAllUserData(long userId, UserItemData[] userData, CancellationToken cancellationToken);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using MediaBrowser.Common.Plugins;
|
||||
namespace MediaBrowser.Controller.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IConfigurationPage
|
||||
/// Interface IConfigurationPage.
|
||||
/// </summary>
|
||||
public interface IPluginConfigurationPage
|
||||
{
|
||||
@@ -34,16 +34,16 @@ namespace MediaBrowser.Controller.Plugins
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum ConfigurationPageType
|
||||
/// Enum ConfigurationPageType.
|
||||
/// </summary>
|
||||
public enum ConfigurationPageType
|
||||
{
|
||||
/// <summary>
|
||||
/// The plugin configuration
|
||||
/// The plugin configuration.
|
||||
/// </summary>
|
||||
PluginConfiguration,
|
||||
/// <summary>
|
||||
/// The none
|
||||
/// The none.
|
||||
/// </summary>
|
||||
None
|
||||
}
|
||||
|
||||
@@ -22,6 +22,5 @@ namespace MediaBrowser.Controller.Plugins
|
||||
/// </summary>
|
||||
public interface IRunBeforeStartup
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user