diff options
Diffstat (limited to 'MediaBrowser.Controller')
18 files changed, 129 insertions, 62 deletions
diff --git a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs index afc6493e4..d6e315fd1 100644 --- a/MediaBrowser.Controller/Channels/ChannelFolderItem.cs +++ b/MediaBrowser.Controller/Channels/ChannelFolderItem.cs @@ -15,7 +15,6 @@ namespace MediaBrowser.Controller.Channels public ChannelFolderType ChannelFolderType { get; set; } public string OriginalImageUrl { get; set; } - public List<string> Tags { get; set; } protected override bool GetBlockUnratedValue(UserConfiguration config) { @@ -31,11 +30,6 @@ namespace MediaBrowser.Controller.Channels } } - public ChannelFolderItem() - { - Tags = new List<string>(); - } - public override string GetUserDataKey() { return ExternalId; diff --git a/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs b/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs index 64b480414..f16fd1120 100644 --- a/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs +++ b/MediaBrowser.Controller/Channels/ChannelMediaInfo.cs @@ -29,6 +29,8 @@ namespace MediaBrowser.Controller.Channels public MediaProtocol Protocol { get; set; } + public long? RunTimeTicks { get; set; } + public ChannelMediaInfo() { RequiredHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); diff --git a/MediaBrowser.Controller/Channels/IChannelFactory.cs b/MediaBrowser.Controller/Channels/IChannelFactory.cs index e275227ff..c7ed92586 100644 --- a/MediaBrowser.Controller/Channels/IChannelFactory.cs +++ b/MediaBrowser.Controller/Channels/IChannelFactory.cs @@ -6,4 +6,9 @@ namespace MediaBrowser.Controller.Channels { IEnumerable<IChannel> GetChannels(); } + + public interface IFactoryChannel + { + + } }
\ No newline at end of file diff --git a/MediaBrowser.Controller/Configuration/IServerConfigurationManager.cs b/MediaBrowser.Controller/Configuration/IServerConfigurationManager.cs index c3d1796f9..aac8cda2e 100644 --- a/MediaBrowser.Controller/Configuration/IServerConfigurationManager.cs +++ b/MediaBrowser.Controller/Configuration/IServerConfigurationManager.cs @@ -31,6 +31,6 @@ namespace MediaBrowser.Controller.Configuration /// Sets the preferred metadata service. /// </summary> /// <param name="service">The service.</param> - void SetPreferredMetadataService(string service); + void DisableMetadataService(string service); } } diff --git a/MediaBrowser.Controller/Drawing/IImageProcessor.cs b/MediaBrowser.Controller/Drawing/IImageProcessor.cs index 51466c4f9..a0128f111 100644 --- a/MediaBrowser.Controller/Drawing/IImageProcessor.cs +++ b/MediaBrowser.Controller/Drawing/IImageProcessor.cs @@ -73,6 +73,13 @@ namespace MediaBrowser.Controller.Drawing /// <param name="toStream">To stream.</param> /// <returns>Task.</returns> Task ProcessImage(ImageProcessingOptions options, Stream toStream); + + /// <summary> + /// Processes the image. + /// </summary> + /// <param name="options">The options.</param> + /// <returns>Task.</returns> + Task<string> ProcessImage(ImageProcessingOptions options); /// <summary> /// Gets the enhanced image. diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index 9ddd10f4a..695b1fd57 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.Entities.Audio /// <summary> /// Class MusicAlbum /// </summary> - public class MusicAlbum : Folder, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasTags, IHasLookupInfo<AlbumInfo> + public class MusicAlbum : Folder, IHasAlbumArtist, IHasArtist, IHasMusicGenres, IHasLookupInfo<AlbumInfo> { public List<Guid> SoundtrackIds { get; set; } @@ -19,7 +19,6 @@ namespace MediaBrowser.Controller.Entities.Audio { Artists = new List<string>(); SoundtrackIds = new List<Guid>(); - Tags = new List<string>(); } [IgnoreDataMember] @@ -66,12 +65,6 @@ namespace MediaBrowser.Controller.Entities.Audio } /// <summary> - /// Gets or sets the tags. - /// </summary> - /// <value>The tags.</value> - public List<string> Tags { get; set; } - - /// <summary> /// Gets the tracks. /// </summary> /// <value>The tracks.</value> diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index 0a5d8eec0..1544da7bc 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -13,16 +13,9 @@ namespace MediaBrowser.Controller.Entities.Audio /// <summary> /// Class MusicArtist /// </summary> - public class MusicArtist : Folder, IMetadataContainer, IItemByName, IHasMusicGenres, IHasDualAccess, IHasTags, IHasProductionLocations, IHasLookupInfo<ArtistInfo> + public class MusicArtist : Folder, IMetadataContainer, IItemByName, IHasMusicGenres, IHasDualAccess, IHasProductionLocations, IHasLookupInfo<ArtistInfo> { public bool IsAccessedByName { get; set; } - - /// <summary> - /// Gets or sets the tags. - /// </summary> - /// <value>The tags.</value> - public List<string> Tags { get; set; } - public List<string> ProductionLocations { get; set; } public override bool IsFolder @@ -60,7 +53,6 @@ namespace MediaBrowser.Controller.Entities.Audio public MusicArtist() { - Tags = new List<string>(); ProductionLocations = new List<string>(); } diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index b886cef19..12afe26b6 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -21,12 +21,13 @@ namespace MediaBrowser.Controller.Entities /// <summary> /// Class Folder /// </summary> - public class Folder : BaseItem, IHasThemeMedia + public class Folder : BaseItem, IHasThemeMedia, IHasTags { public static IUserManager UserManager { get; set; } public List<Guid> ThemeSongIds { get; set; } public List<Guid> ThemeVideoIds { get; set; } + public List<string> Tags { get; set; } public Folder() { @@ -34,6 +35,7 @@ namespace MediaBrowser.Controller.Entities ThemeSongIds = new List<Guid>(); ThemeVideoIds = new List<Guid>(); + Tags = new List<string>(); } /// <summary> diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index b0cb549f4..0d2be9f74 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -14,13 +14,12 @@ namespace MediaBrowser.Controller.Entities.Movies /// <summary> /// Class BoxSet /// </summary> - public class BoxSet : Folder, IHasTrailers, IHasTags, IHasKeywords, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>, IMetadataContainer + public class BoxSet : Folder, IHasTrailers, IHasKeywords, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>, IMetadataContainer { public BoxSet() { RemoteTrailers = new List<MediaUrl>(); LocalTrailerIds = new List<Guid>(); - Tags = new List<string>(); DisplayOrder = ItemSortBy.PremiereDate; Keywords = new List<string>(); @@ -38,7 +37,6 @@ namespace MediaBrowser.Controller.Entities.Movies /// Gets or sets the tags. /// </summary> /// <value>The tags.</value> - public List<string> Tags { get; set; } public List<string> Keywords { get; set; } public string PreferredMetadataLanguage { get; set; } diff --git a/MediaBrowser.Controller/Entities/Studio.cs b/MediaBrowser.Controller/Entities/Studio.cs index 8271a3df2..0d934ad0a 100644 --- a/MediaBrowser.Controller/Entities/Studio.cs +++ b/MediaBrowser.Controller/Entities/Studio.cs @@ -7,8 +7,15 @@ namespace MediaBrowser.Controller.Entities /// <summary> /// Class Studio /// </summary> - public class Studio : BaseItem, IItemByName + public class Studio : BaseItem, IItemByName, IHasTags { + public List<string> Tags { get; set; } + + public Studio() + { + Tags = new List<string>(); + } + /// <summary> /// Gets the user data key. /// </summary> diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index a9a2b024f..9c2ed27bb 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -13,7 +13,7 @@ namespace MediaBrowser.Controller.Entities.TV /// <summary> /// Class Series /// </summary> - public class Series : Folder, IHasSoundtracks, IHasTrailers, IHasTags, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo<SeriesInfo> + public class Series : Folder, IHasSoundtracks, IHasTrailers, IHasPreferredMetadataLanguage, IHasDisplayOrder, IHasLookupInfo<SeriesInfo> { public List<Guid> SpecialFeatureIds { get; set; } public List<Guid> SoundtrackIds { get; set; } @@ -36,7 +36,6 @@ namespace MediaBrowser.Controller.Entities.TV SoundtrackIds = new List<Guid>(); RemoteTrailers = new List<MediaUrl>(); LocalTrailerIds = new List<Guid>(); - Tags = new List<string>(); DisplaySpecialsWithSeasons = true; } @@ -52,12 +51,6 @@ namespace MediaBrowser.Controller.Entities.TV public string DisplayOrder { get; set; } /// <summary> - /// Gets or sets the tags. - /// </summary> - /// <value>The tags.</value> - public List<string> Tags { get; set; } - - /// <summary> /// Gets or sets the status. /// </summary> /// <value>The status.</value> diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 4d50e61ae..5685edc81 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -326,7 +326,7 @@ namespace MediaBrowser.Controller.Entities { if ((i.Attributes & FileAttributes.Directory) == FileAttributes.Directory) { - return !string.Equals(i.FullName, path, StringComparison.OrdinalIgnoreCase) && EntityResolutionHelper.IsMultiPartFolder(i.FullName) && EntityResolutionHelper.IsMultiPartFile(i.Name); + return !string.Equals(i.FullName, path, StringComparison.OrdinalIgnoreCase) && EntityResolutionHelper.IsMultiPartFolder(i.FullName); } return false; diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 1c60ea8e6..fb50deb66 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -319,6 +319,7 @@ <Compile Include="Sorting\SortExtensions.cs" /> <Compile Include="Subtitles\SubtitleResponse.cs" /> <Compile Include="Subtitles\SubtitleSearchRequest.cs" /> + <Compile Include="Sync\ISyncManager.cs" /> <Compile Include="Themes\IAppThemeManager.cs" /> <Compile Include="Themes\InternalThemeImage.cs" /> </ItemGroup> diff --git a/MediaBrowser.Controller/Net/IHttpResultFactory.cs b/MediaBrowser.Controller/Net/IHttpResultFactory.cs index f7984c32c..665c1f8d9 100644 --- a/MediaBrowser.Controller/Net/IHttpResultFactory.cs +++ b/MediaBrowser.Controller/Net/IHttpResultFactory.cs @@ -80,9 +80,13 @@ namespace MediaBrowser.Controller.Net /// <param name="responseHeaders">The response headers.</param> /// <param name="isHeadRequest">if set to <c>true</c> [is head request].</param> /// <returns>System.Object.</returns> - object GetStaticResult(IRequest requestContext, Guid cacheKey, DateTime? lastDateModified, - TimeSpan? cacheDuration, string contentType, Func<Task<Stream>> factoryFn, - IDictionary<string, string> responseHeaders = null, bool isHeadRequest = false); + object GetStaticResult(IRequest requestContext, + Guid cacheKey, + DateTime? lastDateModified, + TimeSpan? cacheDuration, + string contentType, Func<Task<Stream>> factoryFn, + IDictionary<string, string> responseHeaders = null, + bool isHeadRequest = false); /// <summary> /// Gets the static file result. @@ -101,11 +105,18 @@ namespace MediaBrowser.Controller.Net /// <param name="requestContext">The request context.</param> /// <param name="path">The path.</param> /// <param name="contentType">Type of the content.</param> + /// <param name="cacheCuration">The cache curation.</param> /// <param name="fileShare">The file share.</param> /// <param name="responseHeaders">The response headers.</param> /// <param name="isHeadRequest">if set to <c>true</c> [is head request].</param> /// <returns>System.Object.</returns> - object GetStaticFileResult(IRequest requestContext, string path, string contentType, FileShare fileShare = FileShare.Read, IDictionary<string, string> responseHeaders = null, bool isHeadRequest = false); + object GetStaticFileResult(IRequest requestContext, + string path, + string contentType, + TimeSpan? cacheCuration = null, + FileShare fileShare = FileShare.Read, + IDictionary<string, string> responseHeaders = null, + bool isHeadRequest = false); /// <summary> /// Gets the optimized serialized result using cache. diff --git a/MediaBrowser.Controller/Net/IHttpServer.cs b/MediaBrowser.Controller/Net/IHttpServer.cs index 20f07c74d..5b179d479 100644 --- a/MediaBrowser.Controller/Net/IHttpServer.cs +++ b/MediaBrowser.Controller/Net/IHttpServer.cs @@ -22,12 +22,6 @@ namespace MediaBrowser.Controller.Net void StartServer(IEnumerable<string> urlPrefixes); /// <summary> - /// Gets a value indicating whether [supports web sockets]. - /// </summary> - /// <value><c>true</c> if [supports web sockets]; otherwise, <c>false</c>.</value> - bool SupportsWebSockets { get; } - - /// <summary> /// Gets the local end points. /// </summary> /// <value>The local end points.</value> @@ -39,12 +33,6 @@ namespace MediaBrowser.Controller.Net void Stop(); /// <summary> - /// Gets or sets a value indicating whether [enable HTTP request logging]. - /// </summary> - /// <value><c>true</c> if [enable HTTP request logging]; otherwise, <c>false</c>.</value> - bool EnableHttpRequestLogging { get; set; } - - /// <summary> /// Occurs when [web socket connected]. /// </summary> event EventHandler<WebSocketConnectEventArgs> WebSocketConnected; diff --git a/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs b/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs index 42178c44c..ff94ceff3 100644 --- a/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs +++ b/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs @@ -15,6 +15,21 @@ namespace MediaBrowser.Controller.Resolvers public static class EntityResolutionHelper { /// <summary> + /// Any folder named in this list will be ignored - can be added to at runtime for extensibility + /// </summary> + public static readonly List<string> IgnoreFolders = new List<string> + { + "metadata", + "ps3_update", + "ps3_vprm", + "extrafanart", + "extrathumbs", + ".actors", + ".wd_tv" + + }; + + /// <summary> /// Any extension in this list is considered a video file - can be added to at runtime for extensibility /// </summary> public static List<string> VideoFileExtensions = new List<string> diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index c8ae0e6a7..e37a13923 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -218,6 +218,7 @@ namespace MediaBrowser.Controller.Session /// <param name="deviceId">The device identifier.</param> /// <param name="deviceName">Name of the device.</param> /// <param name="remoteEndPoint">The remote end point.</param> + /// <param name="isLocal">if set to <c>true</c> [is local].</param> /// <returns>Task{SessionInfo}.</returns> Task<AuthenticationResult> AuthenticateNewSession(string username, string password, @@ -225,7 +226,8 @@ namespace MediaBrowser.Controller.Session string appVersion, string deviceId, string deviceName, - string remoteEndPoint); + string remoteEndPoint, + bool isLocal); /// <summary> /// Reports the capabilities. @@ -282,12 +284,5 @@ namespace MediaBrowser.Controller.Session /// <param name="id">The identifier.</param> /// <returns>Task.</returns> Task RevokeToken(string id); - - /// <summary> - /// Determines whether the specified remote endpoint is local. - /// </summary> - /// <param name="remoteEndpoint">The remote endpoint.</param> - /// <returns><c>true</c> if the specified remote endpoint is local; otherwise, <c>false</c>.</returns> - bool IsInLocalNetwork(string remoteEndpoint); } }
\ No newline at end of file diff --git a/MediaBrowser.Controller/Sync/ISyncManager.cs b/MediaBrowser.Controller/Sync/ISyncManager.cs new file mode 100644 index 000000000..63a5d8a7c --- /dev/null +++ b/MediaBrowser.Controller/Sync/ISyncManager.cs @@ -0,0 +1,64 @@ +using MediaBrowser.Model.Querying; +using MediaBrowser.Model.Sync; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Sync +{ + public interface ISyncManager + { + /// <summary> + /// Creates the job. + /// </summary> + /// <param name="request">The request.</param> + /// <returns>Task.</returns> + Task<List<SyncJob>> CreateJob(SyncJobRequest request); + + /// <summary> + /// Creates the schedule. + /// </summary> + /// <param name="request">The request.</param> + /// <returns>Task.</returns> + Task<SyncSchedule> CreateSchedule(SyncScheduleRequest request); + + /// <summary> + /// Gets the jobs. + /// </summary> + /// <returns>QueryResult<SyncJob>.</returns> + QueryResult<SyncJob> GetJobs(SyncJobQuery query); + + /// <summary> + /// Gets the schedules. + /// </summary> + /// <returns>QueryResult<SyncSchedule>.</returns> + QueryResult<SyncSchedule> GetSchedules(SyncScheduleQuery query); + + /// <summary> + /// Gets the job. + /// </summary> + /// <param name="id">The identifier.</param> + /// <returns>SyncJob.</returns> + SyncJob GetJob(string id); + + /// <summary> + /// Gets the schedule. + /// </summary> + /// <param name="id">The identifier.</param> + /// <returns>SyncSchedule.</returns> + SyncSchedule GetSchedule(string id); + + /// <summary> + /// Cancels the job. + /// </summary> + /// <param name="id">The identifier.</param> + /// <returns>Task.</returns> + Task CancelJob(string id); + + /// <summary> + /// Cancels the schedule. + /// </summary> + /// <param name="id">The identifier.</param> + /// <returns>Task.</returns> + Task CancelSchedule(string id); + } +} |
