diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-12-05 13:37:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-05 13:37:55 -0500 |
| commit | c32d8656382a0eacb301692e0084377fc433ae9b (patch) | |
| tree | 121dd382bf71a9b5c96e00771c0ba18a7d28ab87 /MediaBrowser.Controller | |
| parent | e7ffdf3fbdae7d4ec76a0a4e0e37792b079c56e5 (diff) | |
| parent | b3fbdde04305a0406b5322ec6947f8a30ddc12af (diff) | |
Merge pull request #3055 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Controller')
12 files changed, 32 insertions, 40 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index f6a8f1d5a..98899253e 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -2236,7 +2236,7 @@ namespace MediaBrowser.Controller.Entities } var filename = System.IO.Path.GetFileNameWithoutExtension(Path); - var extensions = new List<string> { ".nfo", ".xml", ".srt" }; + var extensions = new List<string> { ".nfo", ".xml", ".srt", ".vtt", ".sub", ".idx", ".txt", ".edl" }; extensions.AddRange(SupportedImageExtensions); return FileSystem.GetFiles(FileSystem.GetDirectoryName(Path), extensions.ToArray(extensions.Count), false, false) diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 504d03a27..08b6a123d 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -466,11 +466,11 @@ namespace MediaBrowser.Controller.Entities item.SetParent(null); await LibraryManager.DeleteItem(item, new DeleteOptions { DeleteFileLocation = false }).ConfigureAwait(false); - LibraryManager.ReportItemRemoved(item); + LibraryManager.ReportItemRemoved(item, this); } } - LibraryManager.CreateItems(newItems, cancellationToken); + LibraryManager.CreateItems(newItems, this, cancellationToken); } } else diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 1d09783d1..ccd0a7636 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -215,23 +215,6 @@ namespace MediaBrowser.Controller.Entities.TV return list; } - [IgnoreDataMember] - public bool ContainsEpisodesWithoutSeasonFolders - { - get - { - var children = Children; - foreach (var child in children) - { - if (child is Video) - { - return true; - } - } - return false; - } - } - public override List<BaseItem> GetChildren(User user, bool includeLinkedChildren) { return GetSeasons(user, new DtoOptions(true)); diff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.cs index e9f7d5932..3f7f8248b 100644 --- a/MediaBrowser.Controller/IServerApplicationHost.cs +++ b/MediaBrowser.Controller/IServerApplicationHost.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Net; using System.Threading.Tasks; using MediaBrowser.Model.Net; +using System.Threading; namespace MediaBrowser.Controller { @@ -19,14 +20,18 @@ namespace MediaBrowser.Controller /// Gets the system info. /// </summary> /// <returns>SystemInfo.</returns> - Task<SystemInfo> GetSystemInfo(); + Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken); + + Task<PublicSystemInfo> GetPublicSystemInfo(CancellationToken cancellationToken); /// <summary> /// Gets a value indicating whether [supports automatic run at startup]. /// </summary> /// <value><c>true</c> if [supports automatic run at startup]; otherwise, <c>false</c>.</value> bool SupportsAutoRunAtStartup { get; } - + + bool CanLaunchWebBrowser { get; } + /// <summary> /// Gets the HTTP server port. /// </summary> @@ -61,13 +66,13 @@ namespace MediaBrowser.Controller /// Gets the local ip address. /// </summary> /// <value>The local ip address.</value> - Task<List<IpAddressInfo>> GetLocalIpAddresses(); + Task<List<IpAddressInfo>> GetLocalIpAddresses(CancellationToken cancellationToken); /// <summary> /// Gets the local API URL. /// </summary> /// <value>The local API URL.</value> - Task<string> GetLocalApiUrl(); + Task<string> GetLocalApiUrl(CancellationToken cancellationToken); /// <summary> /// Gets the local API URL. diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 37e0d5661..9ef372eb6 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -195,16 +195,12 @@ namespace MediaBrowser.Controller.Library /// <summary> /// Creates the item. /// </summary> - /// <param name="item">The item.</param> - /// <param name="cancellationToken">The cancellation token.</param> void CreateItem(BaseItem item, CancellationToken cancellationToken); /// <summary> /// Creates the items. /// </summary> - /// <param name="items">The items.</param> - /// <param name="cancellationToken">The cancellation token.</param> - void CreateItems(IEnumerable<BaseItem> items, CancellationToken cancellationToken); + void CreateItems(IEnumerable<BaseItem> items, BaseItem parent, CancellationToken cancellationToken); /// <summary> /// Updates the item. @@ -237,8 +233,7 @@ namespace MediaBrowser.Controller.Library /// <summary> /// Reports the item removed. /// </summary> - /// <param name="item">The item.</param> - void ReportItemRemoved(BaseItem item); + void ReportItemRemoved(BaseItem item, BaseItem parent); /// <summary> /// Finds the type of the collection. diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.cs index d4232c77e..03e1d352e 100644 --- a/MediaBrowser.Controller/Library/IUserManager.cs +++ b/MediaBrowser.Controller/Library/IUserManager.cs @@ -143,7 +143,7 @@ namespace MediaBrowser.Controller.Library /// <summary> /// Authenticates the user. /// </summary> - Task<User> AuthenticateUser(string username, string password, string passwordSha1, string passwordMd5, string remoteEndPoint); + Task<User> AuthenticateUser(string username, string password, string passwordSha1, string passwordMd5, string remoteEndPoint, bool isUserSession); /// <summary> /// Starts the forgot password process. diff --git a/MediaBrowser.Controller/Library/ItemChangeEventArgs.cs b/MediaBrowser.Controller/Library/ItemChangeEventArgs.cs index a2951f548..e671490d3 100644 --- a/MediaBrowser.Controller/Library/ItemChangeEventArgs.cs +++ b/MediaBrowser.Controller/Library/ItemChangeEventArgs.cs @@ -13,6 +13,8 @@ namespace MediaBrowser.Controller.Library /// <value>The item.</value> public BaseItem Item { get; set; } + public BaseItem Parent { get; set; } + /// <summary> /// Gets or sets the item. /// </summary> diff --git a/MediaBrowser.Controller/LiveTv/ITunerHost.cs b/MediaBrowser.Controller/LiveTv/ITunerHost.cs index 242011db0..80c40f8bd 100644 --- a/MediaBrowser.Controller/LiveTv/ITunerHost.cs +++ b/MediaBrowser.Controller/LiveTv/ITunerHost.cs @@ -46,6 +46,10 @@ namespace MediaBrowser.Controller.LiveTv Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken); Task<List<TunerHostInfo>> DiscoverDevices(int discoveryDurationMs, CancellationToken cancellationToken); + bool IsSupported + { + get; + } } public interface IConfigurableTunerHost { diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 8f8791922..1fab6defc 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -393,6 +393,10 @@ namespace MediaBrowser.Controller.MediaEncoding { return "wmav2"; } + if (string.Equals(codec, "opus", StringComparison.OrdinalIgnoreCase)) + { + return "libopus"; + } return codec.ToLower(); } diff --git a/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs b/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs index 6be94e7e6..17b82b3ca 100644 --- a/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs +++ b/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs @@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.Net /// </summary> /// <param name="state">The state.</param> /// <returns>Task{`1}.</returns> - protected abstract Task<TReturnDataType> GetDataToSend(TStateType state); + protected abstract Task<TReturnDataType> GetDataToSend(TStateType state, CancellationToken cancellationToken); /// <summary> /// The logger @@ -209,7 +209,9 @@ namespace MediaBrowser.Controller.Net { var state = tuple.Item4; - var data = await GetDataToSend(state).ConfigureAwait(false); + var cancellationToken = tuple.Item2.Token; + + var data = await GetDataToSend(state, cancellationToken).ConfigureAwait(false); if (data != null) { @@ -218,7 +220,7 @@ namespace MediaBrowser.Controller.Net MessageType = Name, Data = data - }, tuple.Item2.Token).ConfigureAwait(false); + }, cancellationToken).ConfigureAwait(false); state.DateLastSendUtc = DateTime.UtcNow; } diff --git a/MediaBrowser.Controller/Session/ISessionController.cs b/MediaBrowser.Controller/Session/ISessionController.cs index f8a6ed1fc..0d8c207b6 100644 --- a/MediaBrowser.Controller/Session/ISessionController.cs +++ b/MediaBrowser.Controller/Session/ISessionController.cs @@ -55,10 +55,7 @@ namespace MediaBrowser.Controller.Session /// <summary> /// Sends the restart required message. /// </summary> - /// <param name="info">The information.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task.</returns> - Task SendRestartRequiredNotification(SystemInfo info, CancellationToken cancellationToken); + Task SendRestartRequiredNotification(CancellationToken cancellationToken); /// <summary> /// Sends the user data change info. diff --git a/MediaBrowser.Controller/Sync/ISyncManager.cs b/MediaBrowser.Controller/Sync/ISyncManager.cs index 0bf4b914f..5e9085a40 100644 --- a/MediaBrowser.Controller/Sync/ISyncManager.cs +++ b/MediaBrowser.Controller/Sync/ISyncManager.cs @@ -29,7 +29,7 @@ namespace MediaBrowser.Controller.Sync /// Gets the jobs. /// </summary> /// <returns>QueryResult<SyncJob>.</returns> - Task<QueryResult<SyncJob>> GetJobs(SyncJobQuery query); + QueryResult<SyncJob> GetJobs(SyncJobQuery query); /// <summary> /// Gets the job items. |
