diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csproj index b286885a55..8aba4263c1 100644 --- a/Emby.Drawing/Emby.Drawing.csproj +++ b/Emby.Drawing/Emby.Drawing.csproj @@ -57,6 +57,7 @@ + diff --git a/Emby.Drawing/GDI/DynamicImageHelpers.cs b/Emby.Drawing/GDI/DynamicImageHelpers.cs index c49007c5fd..b4a63b31e2 100644 --- a/Emby.Drawing/GDI/DynamicImageHelpers.cs +++ b/Emby.Drawing/GDI/DynamicImageHelpers.cs @@ -1,11 +1,9 @@ -using Emby.Drawing.ImageMagick; -using MediaBrowser.Common.IO; +using MediaBrowser.Common.IO; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; -using System.Linq; namespace Emby.Drawing.GDI { @@ -18,10 +16,10 @@ namespace Emby.Drawing.GDI int height) { const int numStrips = 4; - files = StripCollageBuilder.ProjectPaths(files, numStrips).ToList(); - + files = ImageHelpers.ProjectPaths(files, numStrips); + const int rows = 1; - int cols = numStrips; + int cols = numStrips; int cellWidth = 2 * (width / 3); int cellHeight = height; @@ -76,8 +74,8 @@ namespace Emby.Drawing.GDI int width, int height) { - files = StripCollageBuilder.ProjectPaths(files, 4).ToList(); - + files = ImageHelpers.ProjectPaths(files, 4); + const int rows = 2; const int cols = 2; diff --git a/Emby.Drawing/GDI/GDIImageEncoder.cs b/Emby.Drawing/GDI/GDIImageEncoder.cs index d968b8b5fe..7e3ca530b5 100644 --- a/Emby.Drawing/GDI/GDIImageEncoder.cs +++ b/Emby.Drawing/GDI/GDIImageEncoder.cs @@ -21,6 +21,8 @@ namespace Emby.Drawing.GDI { _fileSystem = fileSystem; _logger = logger; + + _logger.Info("GDI image processor initialized"); } public string[] SupportedInputFormats diff --git a/Emby.Drawing/ImageHelpers.cs b/Emby.Drawing/ImageHelpers.cs new file mode 100644 index 0000000000..90bde8b3bd --- /dev/null +++ b/Emby.Drawing/ImageHelpers.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Emby.Drawing +{ + internal static class ImageHelpers + { + internal static List ProjectPaths(List paths, int count) + { + if (count <= 0) + { + throw new ArgumentOutOfRangeException("count"); + } + if (paths.Count == 0) + { + throw new ArgumentOutOfRangeException("paths"); + } + + var list = new List(); + + AddToList(list, paths, count); + + return list.Take(count).ToList(); + } + + private static void AddToList(List list, List paths, int count) + { + while (list.Count < count) + { + foreach (var path in paths) + { + list.Add(path); + + if (list.Count >= count) + { + return; + } + } + } + } + } +} diff --git a/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs b/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs index 380c56059d..ff4a8f55bc 100644 --- a/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs +++ b/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs @@ -1,4 +1,5 @@ -using ImageMagickSharp; +using System.Linq; +using ImageMagickSharp; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Drawing; using MediaBrowser.Model.Drawing; @@ -195,15 +196,15 @@ namespace Emby.Drawing.ImageMagick if (ratio >= 1.4) { - new StripCollageBuilder(_appPaths).BuildThumbCollage(options.InputPaths, options.OutputPath, options.Width, options.Height, options.Text); + new StripCollageBuilder(_appPaths).BuildThumbCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height, options.Text); } else if (ratio >= .9) { - new StripCollageBuilder(_appPaths).BuildSquareCollage(options.InputPaths, options.OutputPath, options.Width, options.Height, options.Text); + new StripCollageBuilder(_appPaths).BuildSquareCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height, options.Text); } else { - new StripCollageBuilder(_appPaths).BuildPosterCollage(options.InputPaths, options.OutputPath, options.Width, options.Height, options.Text); + new StripCollageBuilder(_appPaths).BuildPosterCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height, options.Text); } } diff --git a/Emby.Drawing/ImageMagick/StripCollageBuilder.cs b/Emby.Drawing/ImageMagick/StripCollageBuilder.cs index 7cdd0077de..a50a75ccd1 100644 --- a/Emby.Drawing/ImageMagick/StripCollageBuilder.cs +++ b/Emby.Drawing/ImageMagick/StripCollageBuilder.cs @@ -2,7 +2,6 @@ using MediaBrowser.Common.Configuration; using System; using System.Collections.Generic; -using System.Linq; namespace Emby.Drawing.ImageMagick { @@ -15,7 +14,7 @@ namespace Emby.Drawing.ImageMagick _appPaths = appPaths; } - public void BuildPosterCollage(IEnumerable paths, string outputPath, int width, int height, string text) + public void BuildPosterCollage(List paths, string outputPath, int width, int height, string text) { if (!string.IsNullOrWhiteSpace(text)) { @@ -33,7 +32,7 @@ namespace Emby.Drawing.ImageMagick } } - public void BuildSquareCollage(IEnumerable paths, string outputPath, int width, int height, string text) + public void BuildSquareCollage(List paths, string outputPath, int width, int height, string text) { if (!string.IsNullOrWhiteSpace(text)) { @@ -51,7 +50,7 @@ namespace Emby.Drawing.ImageMagick } } - public void BuildThumbCollage(IEnumerable paths, string outputPath, int width, int height, string text) + public void BuildThumbCollage(List paths, string outputPath, int width, int height, string text) { if (!string.IsNullOrWhiteSpace(text)) { @@ -69,31 +68,10 @@ namespace Emby.Drawing.ImageMagick } } - internal static string[] ProjectPaths(IEnumerable paths, int count) + private MagickWand BuildThumbCollageWandWithText(List paths, string text, int width, int height) { - var clone = paths.ToList(); - var list = new List(); - - while (list.Count < count) - { - foreach (var path in clone) - { - list.Add(path); - - if (list.Count >= count) - { - break; - } - } - } - - return list.Take(count).ToArray(); - } - - private MagickWand BuildThumbCollageWandWithText(IEnumerable paths, string text, int width, int height) - { - var inputPaths = ProjectPaths(paths, 8); - using (var wandImages = new MagickWand(inputPaths)) + var inputPaths = ImageHelpers.ProjectPaths(paths, 8); + using (var wandImages = new MagickWand(inputPaths.ToArray())) { var wand = new MagickWand(width, height); wand.OpenImage("gradient:#111111-#111111"); @@ -165,10 +143,10 @@ namespace Emby.Drawing.ImageMagick } } - private MagickWand BuildPosterCollageWand(IEnumerable paths, int width, int height) + private MagickWand BuildPosterCollageWand(List paths, int width, int height) { - var inputPaths = ProjectPaths(paths, 4); - using (var wandImages = new MagickWand(inputPaths)) + var inputPaths = ImageHelpers.ProjectPaths(paths, 4); + using (var wandImages = new MagickWand(inputPaths.ToArray())) { var wand = new MagickWand(width, height); wand.OpenImage("gradient:#111111-#111111"); @@ -230,10 +208,10 @@ namespace Emby.Drawing.ImageMagick } } - private MagickWand BuildPosterCollageWandWithText(IEnumerable paths, string label, int width, int height) + private MagickWand BuildPosterCollageWandWithText(List paths, string label, int width, int height) { - var inputPaths = ProjectPaths(paths, 4); - using (var wandImages = new MagickWand(inputPaths)) + var inputPaths = ImageHelpers.ProjectPaths(paths, 4); + using (var wandImages = new MagickWand(inputPaths.ToArray())) { var wand = new MagickWand(width, height); wand.OpenImage("gradient:#111111-#111111"); @@ -305,10 +283,10 @@ namespace Emby.Drawing.ImageMagick } } - private MagickWand BuildThumbCollageWand(IEnumerable paths, int width, int height) + private MagickWand BuildThumbCollageWand(List paths, int width, int height) { - var inputPaths = ProjectPaths(paths, 8); - using (var wandImages = new MagickWand(inputPaths)) + var inputPaths = ImageHelpers.ProjectPaths(paths, 8); + using (var wandImages = new MagickWand(inputPaths.ToArray())) { var wand = new MagickWand(width, height); wand.OpenImage("gradient:#111111-#111111"); @@ -370,10 +348,10 @@ namespace Emby.Drawing.ImageMagick } } - private MagickWand BuildSquareCollageWand(IEnumerable paths, int width, int height) + private MagickWand BuildSquareCollageWand(List paths, int width, int height) { - var inputPaths = ProjectPaths(paths, 4); - using (var wandImages = new MagickWand(inputPaths)) + var inputPaths = ImageHelpers.ProjectPaths(paths, 4); + using (var wandImages = new MagickWand(inputPaths.ToArray())) { var wand = new MagickWand(width, height); wand.OpenImage("gradient:#111111-#111111"); @@ -435,10 +413,10 @@ namespace Emby.Drawing.ImageMagick } } - private MagickWand BuildSquareCollageWandWithText(IEnumerable paths, string label, int width, int height) + private MagickWand BuildSquareCollageWandWithText(List paths, string label, int width, int height) { - var inputPaths = ProjectPaths(paths, 4); - using (var wandImages = new MagickWand(inputPaths)) + var inputPaths = ImageHelpers.ProjectPaths(paths, 4); + using (var wandImages = new MagickWand(inputPaths.ToArray())) { var wand = new MagickWand(width, height); wand.OpenImage("gradient:#111111-#111111"); diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 59c2e95c76..2ba4f5aab7 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -764,7 +764,11 @@ namespace Emby.Drawing try { + _logger.Debug("Creating image collage and saving to {0}", options.OutputPath); + _imageEncoder.CreateImageCollage(options); + + _logger.Debug("Completed creation of image collage and saved to {0}", options.OutputPath); } finally { diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index 55aa778e2f..2cd9007544 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -346,7 +346,7 @@ namespace MediaBrowser.Api // We can really reduce the timeout for apps that are using the newer api if (!string.IsNullOrWhiteSpace(job.PlaySessionId) && job.Type != TranscodingJobType.Progressive) { - timerDuration = 60000; + timerDuration = 50000; } job.PingTimeout = timerDuration; diff --git a/MediaBrowser.Api/Dlna/DlnaServerService.cs b/MediaBrowser.Api/Dlna/DlnaServerService.cs index 29b7bf682c..bdf7d6b074 100644 --- a/MediaBrowser.Api/Dlna/DlnaServerService.cs +++ b/MediaBrowser.Api/Dlna/DlnaServerService.cs @@ -108,6 +108,9 @@ namespace MediaBrowser.Api.Dlna private readonly IConnectionManager _connectionManager; private readonly IMediaReceiverRegistrar _mediaReceiverRegistrar; + // TODO: Add utf-8 + private const string XMLContentType = "text/xml"; + public DlnaServerService(IDlnaManager dlnaManager, IContentDirectory contentDirectory, IConnectionManager connectionManager, IMediaReceiverRegistrar mediaReceiverRegistrar) { _dlnaManager = dlnaManager; @@ -122,49 +125,49 @@ namespace MediaBrowser.Api.Dlna var serverAddress = url.Substring(0, url.IndexOf("/dlna/", StringComparison.OrdinalIgnoreCase)); var xml = _dlnaManager.GetServerDescriptionXml(GetRequestHeaders(), request.UuId, serverAddress); - return ResultFactory.GetResult(xml, "text/xml"); + return ResultFactory.GetResult(xml, XMLContentType); } public object Get(GetContentDirectory request) { var xml = _contentDirectory.GetServiceXml(GetRequestHeaders()); - return ResultFactory.GetResult(xml, "text/xml"); + return ResultFactory.GetResult(xml, XMLContentType); } public object Get(GetMediaReceiverRegistrar request) { var xml = _mediaReceiverRegistrar.GetServiceXml(GetRequestHeaders()); - return ResultFactory.GetResult(xml, "text/xml"); + return ResultFactory.GetResult(xml, XMLContentType); } public object Get(GetConnnectionManager request) { var xml = _connectionManager.GetServiceXml(GetRequestHeaders()); - return ResultFactory.GetResult(xml, "text/xml"); + return ResultFactory.GetResult(xml, XMLContentType); } public async Task Post(ProcessMediaReceiverRegistrarControlRequest request) { var response = await PostAsync(request.RequestStream, _mediaReceiverRegistrar).ConfigureAwait(false); - return ResultFactory.GetResult(response.Xml, "text/xml"); + return ResultFactory.GetResult(response.Xml, XMLContentType); } public async Task Post(ProcessContentDirectoryControlRequest request) { var response = await PostAsync(request.RequestStream, _contentDirectory).ConfigureAwait(false); - return ResultFactory.GetResult(response.Xml, "text/xml"); + return ResultFactory.GetResult(response.Xml, XMLContentType); } public async Task Post(ProcessConnectionManagerControlRequest request) { var response = await PostAsync(request.RequestStream, _connectionManager).ConfigureAwait(false); - return ResultFactory.GetResult(response.Xml, "text/xml"); + return ResultFactory.GetResult(response.Xml, XMLContentType); } private async Task PostAsync(Stream requestStream, IUpnpService service) diff --git a/MediaBrowser.Controller/Dlna/SsdpMessageEventArgs.cs b/MediaBrowser.Controller/Dlna/SsdpMessageEventArgs.cs index 63f3a67aa0..804f34311a 100644 --- a/MediaBrowser.Controller/Dlna/SsdpMessageEventArgs.cs +++ b/MediaBrowser.Controller/Dlna/SsdpMessageEventArgs.cs @@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.Dlna public Dictionary Headers { get; set; } - public IPAddress LocalIp { get; set; } + public IPEndPoint LocalEndPoint { get; set; } public byte[] Message { get; set; } public SsdpMessageEventArgs() diff --git a/MediaBrowser.Dlna/PlayTo/PlayToManager.cs b/MediaBrowser.Dlna/PlayTo/PlayToManager.cs index 3c68af5505..5d37767a2a 100644 --- a/MediaBrowser.Dlna/PlayTo/PlayToManager.cs +++ b/MediaBrowser.Dlna/PlayTo/PlayToManager.cs @@ -72,8 +72,6 @@ namespace MediaBrowser.Dlna.PlayTo async void _deviceDiscovery_DeviceDiscovered(object sender, SsdpMessageEventArgs e) { - var localIp = e.LocalIp; - string usn; if (!e.Headers.TryGetValue("USN", out usn)) usn = string.Empty; @@ -125,7 +123,7 @@ namespace MediaBrowser.Dlna.PlayTo if (controller == null) { - var serverAddress = GetServerAddress(localIp); + var serverAddress = GetServerAddress(e.LocalEndPoint.Address); string accessToken = null; sessionInfo.SessionController = controller = new PlayToController(sessionInfo, diff --git a/MediaBrowser.Dlna/Profiles/DefaultProfile.cs b/MediaBrowser.Dlna/Profiles/DefaultProfile.cs index 59e1dc5400..819de59fc6 100644 --- a/MediaBrowser.Dlna/Profiles/DefaultProfile.cs +++ b/MediaBrowser.Dlna/Profiles/DefaultProfile.cs @@ -37,6 +37,7 @@ namespace MediaBrowser.Dlna.Profiles MusicSyncBitrate = 128000; EnableAlbumArtInDidl = false; + EnableDlnaProtocol = true; TranscodingProfiles = new[] { @@ -76,9 +77,6 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video } }; - - AddXmlRootAttribute("xmlns", "urn:schemas-upnp-org:device-1-0"); - AddXmlRootAttribute("xmlns:dlna", "urn:schemas-dlna-org:device-1-0"); } public void AddXmlRootAttribute(string name, string value) diff --git a/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs b/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs index f230b38ae4..431807aedd 100644 --- a/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs +++ b/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs @@ -14,22 +14,24 @@ namespace MediaBrowser.Dlna.Profiles Name = "Xbox 360"; // Required according to above - ModelName = "Windows Media Player Sharing"; + ModelName = "Windows Media Connect"; ModelNumber = "12.0"; - FriendlyName = "${HostName}: Emby:"; + FriendlyName = "${HostName}: 1"; ModelUrl = "http://go.microsoft.com/fwlink/?LinkId=105926"; Manufacturer = "Microsoft Corporation"; ManufacturerUrl = "http://www.microsoft.com"; XDlnaDoc = "DMS-1.50"; - ModelDescription = null; + ModelDescription = "Emby : UPnP Media Server"; + ModelNumber = "001"; TimelineOffsetSeconds = 40; RequiresPlainFolders = true; RequiresPlainVideoItems = true; EnableMSMediaReceiverRegistrar = true; + EnableDlnaProtocol = false; Identification = new DeviceIdentification { @@ -312,9 +314,6 @@ namespace MediaBrowser.Dlna.Profiles } } }; - - XmlRootAttributes = new XmlAttribute[] { }; - AddXmlRootAttribute("xmlns", "urn:schemas-upnp-org:device-1-0"); } } } diff --git a/MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml b/MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml index 4aacc8a484..644e1d7ef0 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml @@ -32,10 +32,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Default.xml b/MediaBrowser.Dlna/Profiles/Xml/Default.xml index 4755d60bd3..1ec01a8a65 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Default.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Default.xml @@ -26,10 +26,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml b/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml index 6bf90c8ff5..75250b0533 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml @@ -31,10 +31,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml b/MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml index cecdfdbe42..7e61e91740 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml @@ -32,10 +32,10 @@ true true false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml b/MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml index 59f374b2e5..8e8f41a8d0 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml @@ -33,10 +33,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml index 340a295e78..58f9dbcd1d 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml @@ -32,10 +32,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml b/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml index 057a052e15..8fa282a36e 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml @@ -30,10 +30,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml b/MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml index 8054f3b619..876ce93b57 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml @@ -32,10 +32,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml index e0517aa8ad..ed23217716 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml @@ -33,9 +33,10 @@ false false false + false + true + false - - diff --git a/MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml b/MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml index d2f03333ae..ebcfd2a22d 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml @@ -26,10 +26,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml index 70f3b0f8de..b77197659c 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml @@ -32,9 +32,10 @@ false false false + false + true + false - - diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml index b8a75ec94a..32b482fa25 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml @@ -32,9 +32,10 @@ false false false + false + true + false - - diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml index cf80c01924..038936e8b6 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml @@ -34,9 +34,10 @@ false false false + false + true + false - - diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml index eabdb303f1..4ef4ecb534 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml @@ -34,9 +34,10 @@ false false false + false + true + false - - diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml index e6669f8e8d..3df34da654 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml @@ -34,9 +34,10 @@ false false false + false + true + false - - diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml index 7aa877cd4f..073708cd5e 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml @@ -34,9 +34,10 @@ false false false + false + true + false - - diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml index 7611f26b00..5315649373 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml @@ -34,9 +34,10 @@ false false false + false + true + false - - diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml index 89e282cd06..e92f7eed78 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml @@ -34,10 +34,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Vlc.xml b/MediaBrowser.Dlna/Profiles/Xml/Vlc.xml index bc24f268cf..3ebfdaa726 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Vlc.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Vlc.xml @@ -32,10 +32,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml index 6cb9331514..accaa33a41 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml @@ -33,10 +33,10 @@ false false false - - - - + true + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml b/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml index 4ada245128..ab6f816a7f 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml @@ -8,11 +8,12 @@ - ${HostName}: Emby: + ${HostName}: 1 Microsoft Corporation http://www.microsoft.com - Windows Media Player Sharing - 12.0 + Windows Media Connect + Emby : UPnP Media Server + 001 http://go.microsoft.com/fwlink/?LinkId=105926 false false @@ -32,9 +33,10 @@ true true true - - - + false + false + true + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml b/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml index 0732923636..43301458a3 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml @@ -33,10 +33,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml b/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml index f989453609..d085db4072 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml @@ -32,10 +32,10 @@ false false false - - - - + false + true + false + diff --git a/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs b/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs index 5780aa10bb..649612e1e4 100644 --- a/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs +++ b/MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs @@ -51,10 +51,28 @@ namespace MediaBrowser.Dlna.Server builder.Append(""); builder.Append(""); builder.Append(""); @@ -74,34 +92,33 @@ namespace MediaBrowser.Dlna.Server builder.Append(""); AppendDeviceProperties(builder); - //AppendIconList(builder); + if (_profile.EnableDlnaProtocol) + { + AppendIconList(builder); + } AppendServiceList(builder); builder.Append(""); } private void AppendDeviceProperties(StringBuilder builder) { - builder.Append("uuid:" + SecurityElement.Escape(_serverUdn) + ""); + builder.Append("urn:schemas-upnp-org:device:MediaServer:1"); - if (!string.IsNullOrWhiteSpace(_profile.XDlnaCap)) + if (_profile.EnableDlnaProtocol) { builder.Append("" + SecurityElement.Escape(_profile.XDlnaCap ?? string.Empty) + ""); + + builder.Append("M-DMS-1.50"); + builder.Append("" + SecurityElement.Escape(_profile.XDlnaDoc ?? string.Empty) + ""); } - builder.Append("M-DMS-1.50"); - builder.Append("" + SecurityElement.Escape(_profile.XDlnaDoc ?? string.Empty) + ""); - builder.Append("" + SecurityElement.Escape(GetFriendlyName()) + ""); - builder.Append("urn:schemas-upnp-org:device:MediaServer:1"); builder.Append("" + SecurityElement.Escape(_profile.Manufacturer ?? string.Empty) + ""); builder.Append("" + SecurityElement.Escape(_profile.ManufacturerUrl ?? string.Empty) + ""); + + builder.Append("" + SecurityElement.Escape(_profile.ModelDescription ?? string.Empty) + ""); builder.Append("" + SecurityElement.Escape(_profile.ModelName ?? string.Empty) + ""); - if (!string.IsNullOrWhiteSpace(_profile.ModelDescription)) - { - builder.Append("" + SecurityElement.Escape(_profile.ModelDescription ?? string.Empty) + ""); - } - builder.Append("" + SecurityElement.Escape(_profile.ModelNumber ?? string.Empty) + ""); builder.Append("" + SecurityElement.Escape(_profile.ModelUrl ?? string.Empty) + ""); @@ -114,6 +131,7 @@ namespace MediaBrowser.Dlna.Server builder.Append("" + SecurityElement.Escape(_profile.SerialNumber) + ""); } + builder.Append("uuid:" + SecurityElement.Escape(_serverUdn) + ""); builder.Append("" + SecurityElement.Escape(_serverAddress) + ""); if (!EnableAbsoluteUrls) diff --git a/MediaBrowser.Dlna/Ssdp/Datagram.cs b/MediaBrowser.Dlna/Ssdp/Datagram.cs index cca59720f4..0a6d273037 100644 --- a/MediaBrowser.Dlna/Ssdp/Datagram.cs +++ b/MediaBrowser.Dlna/Ssdp/Datagram.cs @@ -30,7 +30,7 @@ namespace MediaBrowser.Dlna.Ssdp { var msg = Encoding.ASCII.GetBytes(Message); - var socket = CreateSocket(); + var socket = CreateSocket(!IgnoreBindFailure); if (socket == null) { @@ -102,13 +102,20 @@ namespace MediaBrowser.Dlna.Ssdp } } - private Socket CreateSocket() + private Socket CreateSocket(bool isBroadcast) { try { var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); + + if (isBroadcast) + { + socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true); + socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 4); + } + return socket; } catch (Exception ex) diff --git a/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs b/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs index 94342bf31e..3befa221b0 100644 --- a/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs +++ b/MediaBrowser.Dlna/Ssdp/DeviceDiscovery.cs @@ -87,11 +87,14 @@ namespace MediaBrowser.Dlna.Ssdp try { - var ip = _appHost.LocalIpAddress; + if (e.LocalEndPoint == null) + { + var ip = _appHost.LocalIpAddress; + e.LocalEndPoint = new IPEndPoint(IPAddress.Parse(ip), 0); + } - if (!string.IsNullOrWhiteSpace(ip)) + if (e.LocalEndPoint != null) { - e.LocalIp = IPAddress.Parse(ip); TryCreateDevice(e); } } @@ -140,7 +143,7 @@ namespace MediaBrowser.Dlna.Ssdp { var args = SsdpHelper.ParseSsdpResponse(receiveBuffer); args.EndPoint = endPoint; - args.LocalIp = localIp; + args.LocalEndPoint = new IPEndPoint(localIp, 0); if (!_ssdpHandler.IsSelfNotification(args)) { diff --git a/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs b/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs index 19c567a33e..e6e9624d59 100644 --- a/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs +++ b/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs @@ -139,15 +139,7 @@ namespace MediaBrowser.Dlna.Ssdp values["MX"] = "3"; // UDP is unreliable, so send 3 requests at a time (per Upnp spec, sec 1.1.2) - SendDatagram("M-SEARCH * HTTP/1.1", values, localIp, 2); - } - - public void SendDatagram(string header, - Dictionary values, - EndPoint localAddress, - int sendCount) - { - SendDatagram(header, values, _ssdpEndp, localAddress, false, sendCount); + SendDatagram("M-SEARCH * HTTP/1.1", values, _ssdpEndp, localIp, false, 2); } public void SendDatagram(string header, @@ -433,27 +425,9 @@ namespace MediaBrowser.Dlna.Ssdp if (string.Equals(server, _serverSignature, StringComparison.OrdinalIgnoreCase)) { - return true; + //return true; } return false; - //string usn; - //args.Headers.TryGetValue("USN", out usn); - - //if (string.IsNullOrWhiteSpace(usn)) - //{ - // return false; - //} - - //_logger.Debug("IsSelfNotification test: " + usn); - - //return RegisteredDevices.Any(i => - //{ - // var isSameDevice = string.Equals(usn, i.USN, StringComparison.OrdinalIgnoreCase) || - // i.USN.IndexOf(usn, StringComparison.OrdinalIgnoreCase) != 1 || - // usn.IndexOf(i.USN, StringComparison.OrdinalIgnoreCase) != 1; - - // return isSameDevice; - //}); } public void Dispose() @@ -542,7 +516,7 @@ namespace MediaBrowser.Dlna.Ssdp _logger.Debug("{0} said {1}", dev.USN, type); } - SendDatagram(header, values, new IPEndPoint(dev.Address, 0), sendCount); + SendDatagram(header, values, _ssdpEndp, new IPEndPoint(dev.Address, 0), false, sendCount); } public void RegisterNotification(Guid uuid, Uri descriptionUri, IPAddress address, IEnumerable services) diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index afd67eb153..7f16072173 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -17,7 +17,7 @@ namespace MediaBrowser.Model.Configuration DownMixAudioBoost = 2; EncodingQuality = EncodingQuality.Auto; EnableThrottling = true; - ThrottleThresholdSeconds = 120; + ThrottleThresholdSeconds = 110; } } } diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index 2b0df9778c..fc508991e5 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -77,6 +77,7 @@ namespace MediaBrowser.Model.Dlna public bool EnableMSMediaReceiverRegistrar { get; set; } public bool IgnoreTranscodeByteRangeRequests { get; set; } + public bool EnableDlnaProtocol { get; set; } public XmlAttribute[] XmlRootAttributes { get; set; } diff --git a/MediaBrowser.Providers/TV/SeriesMetadataService.cs b/MediaBrowser.Providers/TV/SeriesMetadataService.cs index b0cd7382a1..eeff03703b 100644 --- a/MediaBrowser.Providers/TV/SeriesMetadataService.cs +++ b/MediaBrowser.Providers/TV/SeriesMetadataService.cs @@ -52,7 +52,7 @@ namespace MediaBrowser.Providers.TV target.Status = source.Status; } - if (replaceData || target.AirDays.Count == 0) + if (replaceData || target.AirDays == null || target.AirDays.Count == 0) { target.AirDays = source.AirDays; } diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs index b5b63181a0..fa5841bb83 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs @@ -108,9 +108,9 @@ namespace MediaBrowser.Server.Implementations.EntryPoints { var endpoint = e.EndPoint as IPEndPoint; - if (endpoint != null && e.LocalIp != null) + if (endpoint != null && e.LocalEndPoint != null) { - NatUtility.Handle(e.LocalIp, e.Message, endpoint, NatProtocol.Upnp); + NatUtility.Handle(e.LocalEndPoint.Address, e.Message, endpoint, NatProtocol.Upnp); } } diff --git a/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs b/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs index 542d677215..e1dd5c6186 100644 --- a/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs +++ b/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs @@ -252,6 +252,9 @@ namespace MediaBrowser.Server.Implementations.Localization throw new ArgumentNullException("rating"); } + // Fairly common for some users to have "Rated R" in their rating field + rating = rating.Replace("Rated ", string.Empty, StringComparison.OrdinalIgnoreCase); + var ratingsDictionary = GetParentalRatingsDictionary(); ParentalRating value; diff --git a/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs b/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs index bd22a8a70b..79ebc67d99 100644 --- a/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs +++ b/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs @@ -103,7 +103,7 @@ namespace MediaBrowser.Server.Implementations.Photos return parts.GetMD5().ToString("N"); } - protected Task CreateThumbCollage(IHasImages primaryItem, List items, string outputPath, bool drawText) + protected Task CreateThumbCollage(IHasImages primaryItem, List items, string outputPath, bool drawText) { return CreateCollage(primaryItem, items, outputPath, 960, 540, drawText, primaryItem.Name); } @@ -115,22 +115,22 @@ namespace MediaBrowser.Server.Implementations.Photos .Where(i => !string.IsNullOrWhiteSpace(i)); } - protected Task CreatePosterCollage(IHasImages primaryItem, List items, string outputPath) + protected Task CreatePosterCollage(IHasImages primaryItem, List items, string outputPath) { return CreateCollage(primaryItem, items, outputPath, 600, 900, true, primaryItem.Name); } - protected Task CreateSquareCollage(IHasImages primaryItem, List items, string outputPath, bool drawText) + protected Task CreateSquareCollage(IHasImages primaryItem, List items, string outputPath, bool drawText) { return CreateCollage(primaryItem, items, outputPath, 800, 800, drawText, primaryItem.Name); } - protected Task CreateThumbCollage(IHasImages primaryItem, List items, string outputPath, int width, int height, bool drawText, string text) + protected Task CreateThumbCollage(IHasImages primaryItem, List items, string outputPath, int width, int height, bool drawText, string text) { return CreateCollage(primaryItem, items, outputPath, width, height, drawText, text); } - private Task CreateCollage(IHasImages primaryItem, List items, string outputPath, int width, int height, bool drawText, string text) + private Task CreateCollage(IHasImages primaryItem, List items, string outputPath, int width, int height, bool drawText, string text) { Directory.CreateDirectory(Path.GetDirectoryName(outputPath)); @@ -143,7 +143,13 @@ namespace MediaBrowser.Server.Implementations.Photos InputPaths = GetStripCollageImagePaths(primaryItem, items).ToArray() }; - return ImageProcessor.CreateImageCollage(options); + if (options.InputPaths.Length == 0) + { + return Task.FromResult(false); + } + + ImageProcessor.CreateImageCollage(options); + return Task.FromResult(true); } public string Name @@ -166,26 +172,23 @@ namespace MediaBrowser.Server.Implementations.Photos if (imageType == ImageType.Thumb) { - await CreateThumbCollage(item, itemsWithImages, outputPath, drawText).ConfigureAwait(false); - return true; + return await CreateThumbCollage(item, itemsWithImages, outputPath, drawText).ConfigureAwait(false); } if (imageType == ImageType.Primary) { if (item is UserView) { - await CreateSquareCollage(item, itemsWithImages, outputPath, drawText).ConfigureAwait(false); + return await CreateSquareCollage(item, itemsWithImages, outputPath, drawText).ConfigureAwait(false); } else if (item is PhotoAlbum || item is Playlist) { - await CreateSquareCollage(item, itemsWithImages, outputPath, drawText).ConfigureAwait(false); + return await CreateSquareCollage(item, itemsWithImages, outputPath, drawText).ConfigureAwait(false); } else { - await CreatePosterCollage(item, itemsWithImages, outputPath).ConfigureAwait(false); + return await CreatePosterCollage(item, itemsWithImages, outputPath).ConfigureAwait(false); } - - return true; } throw new ArgumentException("Unexpected image type"); diff --git a/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs b/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs index b5ecc94a29..9d2eb297f8 100644 --- a/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs +++ b/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs @@ -8,37 +8,37 @@ using System.Threading.Tasks; namespace MediaBrowser.Server.Implementations.Photos { - //public class PhotoAlbumImageProvider : IDynamicImageProvider - //{ - // public IEnumerable GetSupportedImages(IHasImages item) - // { - // return new List { ImageType.Primary }; - // } + public class PhotoAlbumImageProvider : IDynamicImageProvider + { + public IEnumerable GetSupportedImages(IHasImages item) + { + return new List { ImageType.Primary }; + } - // public Task GetImage(IHasImages item, ImageType type, CancellationToken cancellationToken) - // { - // var album = (PhotoAlbum)item; + public Task GetImage(IHasImages item, ImageType type, CancellationToken cancellationToken) + { + var album = (PhotoAlbum)item; - // var image = album.Children - // .OfType() - // .Select(i => i.GetImagePath(type)) - // .FirstOrDefault(i => !string.IsNullOrEmpty(i)); + var image = album.Children + .OfType() + .Select(i => i.GetImagePath(type)) + .FirstOrDefault(i => !string.IsNullOrEmpty(i)); - // return Task.FromResult(new DynamicImageResponse - // { - // Path = image, - // HasImage = !string.IsNullOrEmpty(image) - // }); - // } + return Task.FromResult(new DynamicImageResponse + { + Path = image, + HasImage = !string.IsNullOrEmpty(image) + }); + } - // public string Name - // { - // get { return "Image Extractor"; } - // } + public string Name + { + get { return "Image Extractor"; } + } - // public bool Supports(IHasImages item) - // { - // return item is PhotoAlbum; - // } - //} + public bool Supports(IHasImages item) + { + return item is PhotoAlbum; + } + } } diff --git a/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs b/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs index 9307626960..b07caa1bd9 100644 --- a/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs +++ b/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs @@ -224,8 +224,7 @@ namespace MediaBrowser.Server.Implementations.UserViews return false; } - await CreateThumbCollage(item, itemsWithImages, outputPath, 960, 540, false, item.Name).ConfigureAwait(false); - return true; + return await CreateThumbCollage(item, itemsWithImages, outputPath, 960, 540, false, item.Name).ConfigureAwait(false); } return await base.CreateImage(item, itemsWithImages, outputPath, imageType, imageIndex).ConfigureAwait(false); diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index 5c6228193e..34a7f0eace 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -9,6 +9,7 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using WebMarkupMin.Core; using WebMarkupMin.Core.Minifiers; using WebMarkupMin.Core.Settings; @@ -32,9 +33,9 @@ namespace MediaBrowser.WebDashboard.Api } public async Task GetResource(string path, - string mode, + string mode, string localizationCulture, - string appVersion, + string appVersion, bool enableMinification) { var isHtml = IsHtml(path); @@ -58,7 +59,7 @@ namespace MediaBrowser.WebDashboard.Api { // Don't apply any caching for html pages // jQuery ajax doesn't seem to handle if-modified-since correctly - if (isHtml) + if (isHtml && path.IndexOf("cordovaindex.html", StringComparison.OrdinalIgnoreCase) == -1) { resourceStream = await ModifyHtml(resourceStream, mode, localizationCulture, enableMinification).ConfigureAwait(false); } @@ -137,7 +138,12 @@ namespace MediaBrowser.WebDashboard.Api { try { - var minifier = new HtmlMinifier(new HtmlMinificationSettings()); + var minifier = new HtmlMinifier(new HtmlMinificationSettings + { + AttributeQuotesRemovalMode = HtmlAttributeQuotesRemovalMode.KeepQuotes, + RemoveOptionalEndTags = false, + RemoveTagsWithoutContent = false + }); var result = minifier.Minify(html, false); if (result.Errors.Count > 0) @@ -313,7 +319,7 @@ namespace MediaBrowser.WebDashboard.Api if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase)) { - apiClientFiles.Add("thirdparty/apiclient/cordova/serverdiscovery.js"); + apiClientFiles.Add("thirdparty/cordova/serverdiscovery.js"); } else { @@ -321,6 +327,11 @@ namespace MediaBrowser.WebDashboard.Api } apiClientFiles.Add("thirdparty/apiclient/connectionmanager.js"); + if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase)) + { + apiClientFiles.Add("thirdparty/cordova/remotecontrols.js"); + } + foreach (var file in apiClientFiles) { using (var fs = _fileSystem.GetFileStream(GetDashboardResourcePath(file), FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true)) diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index ce2e2d4229..8ead5ef77b 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -213,7 +213,13 @@ PreserveNewest - + + PreserveNewest + + + PreserveNewest + + PreserveNewest @@ -1665,6 +1671,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -2288,6 +2297,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -2297,6 +2309,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/SharedVersion.cs b/SharedVersion.cs index e4ebaa224e..64d43a05e9 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; //[assembly: AssemblyVersion("3.0.*")] -[assembly: AssemblyVersion("3.0.5607.1")] +[assembly: AssemblyVersion("3.0.5607.2")]