diff options
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserViewBuilder.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Providers/IImageEnhancer.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Session/SessionInfo.cs | 40 |
3 files changed, 32 insertions, 15 deletions
diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs index 85c10c272..35ada4aef 100644 --- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs +++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs @@ -5,7 +5,6 @@ using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.LiveTv; -using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.TV; using MediaBrowser.Model.Channels; using MediaBrowser.Model.Entities; @@ -18,7 +17,6 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; -using MoreLinq; namespace MediaBrowser.Controller.Entities { diff --git a/MediaBrowser.Controller/Providers/IImageEnhancer.cs b/MediaBrowser.Controller/Providers/IImageEnhancer.cs index 56f8d02be..e5a51a56e 100644 --- a/MediaBrowser.Controller/Providers/IImageEnhancer.cs +++ b/MediaBrowser.Controller/Providers/IImageEnhancer.cs @@ -44,11 +44,12 @@ namespace MediaBrowser.Controller.Providers /// Enhances the image async. /// </summary> /// <param name="item">The item.</param> - /// <param name="originalImage">The original image.</param> + /// <param name="inputFile">The input file.</param> + /// <param name="outputFile">The output file.</param> /// <param name="imageType">Type of the image.</param> /// <param name="imageIndex">Index of the image.</param> /// <returns>Task{Image}.</returns> /// <exception cref="System.ArgumentNullException"></exception> - Task<ImageStream> EnhanceImageAsync(IHasImages item, ImageStream originalImage, ImageType imageType, int imageIndex); + Task EnhanceImageAsync(IHasImages item, string inputFile, string outputFile, ImageType imageType, int imageIndex); } }
\ No newline at end of file diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index 078d4d70f..64b20c13e 100644 --- a/MediaBrowser.Controller/Session/SessionInfo.cs +++ b/MediaBrowser.Controller/Session/SessionInfo.cs @@ -14,17 +14,8 @@ namespace MediaBrowser.Controller.Session public SessionInfo() { QueueableMediaTypes = new List<string>(); - PlayableMediaTypes = new List<string> - { - MediaType.Audio, - MediaType.Book, - MediaType.Game, - MediaType.Photo, - MediaType.Video - }; AdditionalUsers = new List<SessionUserInfo>(); - SupportedCommands = new List<string>(); PlayState = new PlayerStateInfo(); } @@ -32,6 +23,8 @@ namespace MediaBrowser.Controller.Session public List<SessionUserInfo> AdditionalUsers { get; set; } + public ClientCapabilities Capabilities { get; set; } + /// <summary> /// Gets or sets the remote end point. /// </summary> @@ -48,7 +41,17 @@ namespace MediaBrowser.Controller.Session /// Gets or sets the playable media types. /// </summary> /// <value>The playable media types.</value> - public List<string> PlayableMediaTypes { get; set; } + public List<string> PlayableMediaTypes + { + get + { + if (Capabilities == null) + { + return new List<string>(); + } + return Capabilities.PlayableMediaTypes; + } + } /// <summary> /// Gets or sets the id. @@ -126,7 +129,17 @@ namespace MediaBrowser.Controller.Session /// Gets or sets the supported commands. /// </summary> /// <value>The supported commands.</value> - public List<string> SupportedCommands { get; set; } + public List<string> SupportedCommands + { + get + { + if (Capabilities == null) + { + return new List<string>(); + } + return Capabilities.SupportedCommands; + } + } public TranscodingInfo TranscodingInfo { get; set; } @@ -151,6 +164,11 @@ namespace MediaBrowser.Controller.Session { get { + if (Capabilities == null || !Capabilities.SupportsMediaControl) + { + return false; + } + if (SessionController != null) { return SessionController.SupportsMediaControl; |
