From d394076fb6608b1cf3c3068050a18c0be6d59939 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 30 Aug 2016 13:39:15 -0400 Subject: [PATCH 1/5] update image editor --- MediaBrowser.Dlna/Profiles/PanasonicVieraProfile.cs | 2 +- MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs | 6 +++--- MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs | 2 +- MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs | 2 +- MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs | 2 +- MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs | 2 +- MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs | 10 +++++----- MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml | 2 +- MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml | 6 +++--- .../Profiles/Xml/Sony Blu-ray Player 2013.xml | 2 +- .../Profiles/Xml/Sony Blu-ray Player 2014.xml | 2 +- .../Profiles/Xml/Sony Blu-ray Player 2015.xml | 2 +- .../Profiles/Xml/Sony Blu-ray Player 2016.xml | 2 +- MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml | 10 +++++----- .../Sync/CloudSyncProfile.cs | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/MediaBrowser.Dlna/Profiles/PanasonicVieraProfile.cs b/MediaBrowser.Dlna/Profiles/PanasonicVieraProfile.cs index 7b0f18fa6..5edf3afbf 100644 --- a/MediaBrowser.Dlna/Profiles/PanasonicVieraProfile.cs +++ b/MediaBrowser.Dlna/Profiles/PanasonicVieraProfile.cs @@ -66,7 +66,7 @@ namespace MediaBrowser.Dlna.Profiles { Container = "mkv", VideoCodec = "h264,mpeg2video", - AudioCodec = "aac,ac3,dca,mp3,mp2,pcm", + AudioCodec = "aac,ac3,dca,mp3,mp2,pcm,dts", Type = DlnaProfileType.Video }, diff --git a/MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs b/MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs index 63fcf60ec..aae520d6f 100644 --- a/MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs +++ b/MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs @@ -65,14 +65,14 @@ namespace MediaBrowser.Dlna.Profiles { Container = "avi", VideoCodec = "h264,mpeg4,mjpeg", - AudioCodec = "mp3,ac3,dca", + AudioCodec = "mp3,ac3,dca,dts", Type = DlnaProfileType.Video }, new DirectPlayProfile { Container = "mkv", VideoCodec = "h264,mpeg4,mjpeg4", - AudioCodec = "mp3,ac3,dca,aac", + AudioCodec = "mp3,ac3,dca,aac,dts", Type = DlnaProfileType.Video }, new DirectPlayProfile @@ -300,7 +300,7 @@ namespace MediaBrowser.Dlna.Profiles new CodecProfile { Type = CodecType.VideoAudio, - Codec = "ac3,wmav2,dca,aac,mp3", + Codec = "ac3,wmav2,dca,aac,mp3,dts", Conditions = new[] { diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs index bbdf370b8..fefb96117 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs @@ -115,7 +115,7 @@ namespace MediaBrowser.Dlna.Profiles { Container = "mkv", VideoCodec = "mpeg4,h264", - AudioCodec = "ac3,dca,aac,mp3,pcm", + AudioCodec = "ac3,dca,aac,mp3,pcm,dts", Type = DlnaProfileType.Video }, new DirectPlayProfile diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs index 1eed398ed..4f2ff3ad1 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs @@ -115,7 +115,7 @@ namespace MediaBrowser.Dlna.Profiles { Container = "mkv", VideoCodec = "mpeg4,h264", - AudioCodec = "ac3,dca,aac,mp3,pcm", + AudioCodec = "ac3,dca,aac,mp3,pcm,dts", Type = DlnaProfileType.Video }, new DirectPlayProfile diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs index 563c2db7b..57cd5dad6 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs @@ -103,7 +103,7 @@ namespace MediaBrowser.Dlna.Profiles { Container = "mkv", VideoCodec = "mpeg4,h264", - AudioCodec = "ac3,dca,aac,mp3,pcm", + AudioCodec = "ac3,dca,aac,mp3,pcm,dts", Type = DlnaProfileType.Video }, new DirectPlayProfile diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs index 21e0c092c..f504820d1 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs @@ -103,7 +103,7 @@ namespace MediaBrowser.Dlna.Profiles { Container = "mkv", VideoCodec = "mpeg4,h264", - AudioCodec = "ac3,dca,aac,mp3,pcm", + AudioCodec = "ac3,dca,aac,mp3,pcm,dts", Type = DlnaProfileType.Video }, new DirectPlayProfile diff --git a/MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs b/MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs index 1c0c7d297..5f9e30318 100644 --- a/MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs +++ b/MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs @@ -58,7 +58,7 @@ namespace MediaBrowser.Dlna.Profiles Container = "avi", Type = DlnaProfileType.Video, VideoCodec = "mpeg1video,mpeg2video,mpeg4,h264,vc1", - AudioCodec = "ac3,dca,mp2,mp3,pcm,dca" + AudioCodec = "ac3,dca,mp2,mp3,pcm,dts" }, new DirectPlayProfile @@ -66,7 +66,7 @@ namespace MediaBrowser.Dlna.Profiles Container = "mpeg", Type = DlnaProfileType.Video, VideoCodec = "mpeg1video,mpeg2video", - AudioCodec = "ac3,dca,mp2,mp3,pcm,dca" + AudioCodec = "ac3,dca,mp2,mp3,pcm,dts" }, new DirectPlayProfile @@ -74,7 +74,7 @@ namespace MediaBrowser.Dlna.Profiles Container = "mkv", Type = DlnaProfileType.Video, VideoCodec = "mpeg1video,mpeg2video,mpeg4,h264,vc1", - AudioCodec = "ac3,dca,aac,mp2,mp3,pcm,dca" + AudioCodec = "ac3,dca,aac,mp2,mp3,pcm,dts" }, new DirectPlayProfile @@ -82,7 +82,7 @@ namespace MediaBrowser.Dlna.Profiles Container = "ts,m2ts", Type = DlnaProfileType.Video, VideoCodec = "mpeg1video,mpeg2video,h264,vc1", - AudioCodec = "ac3,dca,mp2,mp3,aac,dca" + AudioCodec = "ac3,dca,mp2,mp3,aac,dts" }, new DirectPlayProfile @@ -90,7 +90,7 @@ namespace MediaBrowser.Dlna.Profiles Container = "mp4,mov", Type = DlnaProfileType.Video, VideoCodec = "h264,mpeg4", - AudioCodec = "ac3,aac,mp2,mp3,dca" + AudioCodec = "ac3,aac,mp2,mp3,dca,dts" }, new DirectPlayProfile diff --git a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml index 865449cb6..d26346ff6 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml @@ -39,7 +39,7 @@ - + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml index 77fa928cc..1918c0297 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml @@ -38,8 +38,8 @@ - - + + @@ -100,7 +100,7 @@ - + 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 1c626d3d5..f8b583b50 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml @@ -45,7 +45,7 @@ - + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml index bb55a1a80..eaa37c620 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml @@ -45,7 +45,7 @@ - + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml index 804770a59..368e892ff 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml @@ -43,7 +43,7 @@ - + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml index 920b6ccfa..9ec096b7f 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml @@ -43,7 +43,7 @@ - + diff --git a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml index ef8fa5757..ebd4eb9b5 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml @@ -36,11 +36,11 @@ true - - - - - + + + + + diff --git a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs index 175dbbc01..f40b64498 100644 --- a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs +++ b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs @@ -23,7 +23,7 @@ namespace MediaBrowser.Server.Implementations.Sync if (supportsDca) { - mkvAudio += ",dca"; + mkvAudio += ",dca,dts"; } var videoProfile = "high|main|baseline|constrained baseline"; From 0375990d8e6b0ebfb58c318fdb4255326d72d75d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 30 Aug 2016 14:17:37 -0400 Subject: [PATCH 2/5] Support grabbing channel number from url --- .../LiveTv/TunerHosts/M3uParser.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs index ffe95c862..8095a6989 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; @@ -70,7 +71,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts } else if (!string.IsNullOrWhiteSpace(extInf) && !line.StartsWith("#", StringComparison.OrdinalIgnoreCase)) { - var channel = GetChannelnfo(extInf, tunerHostId); + var channel = GetChannelnfo(extInf, tunerHostId, line); channel.Id = channelIdPrefix + urlHash + line.GetMD5().ToString("N"); channel.Path = line; channels.Add(channel); @@ -79,7 +80,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts } return channels; } - private M3UChannel GetChannelnfo(string extInf, string tunerHostId) + private M3UChannel GetChannelnfo(string extInf, string tunerHostId, string mediaUrl) { var titleIndex = extInf.LastIndexOf(','); var channel = new M3UChannel(); @@ -87,8 +88,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts channel.Number = extInf.Trim().Split(' ')[0] ?? "0"; channel.Name = extInf.Substring(titleIndex + 1); - - if(channel.Number == "-1") { channel.Number = "0"; } //Check for channel number with the format from SatIp int number; @@ -101,6 +100,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts channel.Name = channel.Name.Substring(numberIndex + 1); } } + + if (string.Equals(channel.Number, "-1", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(mediaUrl)) + { + channel.Number = Path.GetFileNameWithoutExtension(mediaUrl.Split('/').Last()); + } + + if (string.Equals(channel.Number, "-1", StringComparison.OrdinalIgnoreCase)) + { + channel.Number = "0"; + } + channel.ImageUrl = FindProperty("tvg-logo", extInf, null); channel.Number = FindProperty("tvg-id", extInf, channel.Number); channel.Number = FindProperty("channel-id", extInf, channel.Number); From 47ceccb2403c339cc938976ded1b3d5cb1860ee0 Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Wed, 31 Aug 2016 10:01:07 -0400 Subject: [PATCH 3/5] Read MCM CollectionNumber --- MediaBrowser.Controller/Providers/BaseItemXmlParser.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs index c0912708c..75da3b67a 100644 --- a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs +++ b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs @@ -768,6 +768,7 @@ namespace MediaBrowser.Controller.Providers break; case "TMDbCollectionId": + case "CollectionNumber": var tmdbCollection = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(tmdbCollection)) { From eefd697b85fcaa76fe8f7165ea48793b8477c91d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 31 Aug 2016 15:17:11 -0400 Subject: [PATCH 4/5] update app footer --- .../HttpServer/HttpListenerHost.cs | 7 ++- .../LiveTv/EmbyTV/EmbyTV.cs | 46 +++++++++---------- .../ApplicationHost.cs | 3 +- .../Browser/BrowserLauncher.cs | 5 ++ .../MediaBrowser.Server.Startup.Common.csproj | 1 - .../OmdbEpisodeProviderMigration.cs | 43 ----------------- .../ServerNotifyIcon.cs | 15 ++++++ 7 files changed, 49 insertions(+), 71 deletions(-) delete mode 100644 MediaBrowser.Server.Startup.Common/Migrations/OmdbEpisodeProviderMigration.cs diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 51a53fe21..28b7824c8 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -71,14 +71,17 @@ namespace MediaBrowser.Server.Implementations.HttpServer HostConfig.Instance.MapExceptionToStatusCode = new Dictionary { - {typeof (InvalidOperationException), 422}, + {typeof (InvalidOperationException), 500}, + {typeof (NotImplementedException), 500}, {typeof (ResourceNotFoundException), 404}, {typeof (FileNotFoundException), 404}, {typeof (DirectoryNotFoundException), 404}, {typeof (SecurityException), 401}, {typeof (PaymentRequiredException), 402}, {typeof (UnauthorizedAccessException), 500}, - {typeof (ApplicationException), 500} + {typeof (ApplicationException), 500}, + {typeof (PlatformNotSupportedException), 500}, + {typeof (NotSupportedException), 500} }; HostConfig.Instance.GlobalResponseHeaders = new Dictionary(); diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 6acb0783e..649024d16 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -851,29 +851,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV var recordPath = RecordingPath; var config = GetConfiguration(); - if (info.IsMovie) - { - var customRecordingPath = config.MovieRecordingPath; - var allowSubfolder = true; - if (!string.IsNullOrWhiteSpace(customRecordingPath)) - { - allowSubfolder = string.Equals(customRecordingPath, recordPath, StringComparison.OrdinalIgnoreCase); - recordPath = customRecordingPath; - } - - if (allowSubfolder && config.EnableRecordingSubfolders) - { - recordPath = Path.Combine(recordPath, "Movies"); - } - - var folderName = _fileSystem.GetValidFilename(info.Name).Trim(); - if (info.ProductionYear.HasValue) - { - folderName += " (" + info.ProductionYear.Value.ToString(CultureInfo.InvariantCulture) + ")"; - } - recordPath = Path.Combine(recordPath, folderName); - } - else if (info.IsSeries) + if (info.IsSeries) { var customRecordingPath = config.SeriesRecordingPath; var allowSubfolder = true; @@ -910,6 +888,28 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV recordPath = Path.Combine(recordPath, folderName); } } + else if (info.IsMovie) + { + var customRecordingPath = config.MovieRecordingPath; + var allowSubfolder = true; + if (!string.IsNullOrWhiteSpace(customRecordingPath)) + { + allowSubfolder = string.Equals(customRecordingPath, recordPath, StringComparison.OrdinalIgnoreCase); + recordPath = customRecordingPath; + } + + if (allowSubfolder && config.EnableRecordingSubfolders) + { + recordPath = Path.Combine(recordPath, "Movies"); + } + + var folderName = _fileSystem.GetValidFilename(info.Name).Trim(); + if (info.ProductionYear.HasValue) + { + folderName += " (" + info.ProductionYear.Value.ToString(CultureInfo.InvariantCulture) + ")"; + } + recordPath = Path.Combine(recordPath, folderName); + } else if (info.IsKids) { if (config.EnableRecordingSubfolders) diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 36bfa5661..170719b0f 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -382,7 +382,6 @@ namespace MediaBrowser.Server.Startup.Common { var migrations = new List { - new OmdbEpisodeProviderMigration(ServerConfigurationManager), new MovieDbEpisodeProviderMigration(ServerConfigurationManager), new DbMigration(ServerConfigurationManager, TaskManager), new UpdateLevelMigration(ServerConfigurationManager, this, HttpClient, JsonSerializer, _releaseAssetFilename) @@ -947,7 +946,7 @@ namespace MediaBrowser.Server.Startup.Common { if (!CanSelfRestart) { - throw new InvalidOperationException("The server is unable to self-restart. Please restart manually."); + throw new PlatformNotSupportedException("The server is unable to self-restart. Please restart manually."); } try diff --git a/MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs b/MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs index 6b3602a73..1a0e2d973 100644 --- a/MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs +++ b/MediaBrowser.Server.Startup.Common/Browser/BrowserLauncher.cs @@ -28,6 +28,11 @@ namespace MediaBrowser.Server.Startup.Common.Browser OpenUrl(appHost, "http://emby.media/community"); } + public static void OpenEmbyPremiere(IServerApplicationHost appHost) + { + OpenDashboardPage("supporterkey.html", appHost); + } + /// /// Opens the web client. /// diff --git a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj index c415dec8a..778002e50 100644 --- a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj +++ b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj @@ -73,7 +73,6 @@ - diff --git a/MediaBrowser.Server.Startup.Common/Migrations/OmdbEpisodeProviderMigration.cs b/MediaBrowser.Server.Startup.Common/Migrations/OmdbEpisodeProviderMigration.cs deleted file mode 100644 index ebc0e67de..000000000 --- a/MediaBrowser.Server.Startup.Common/Migrations/OmdbEpisodeProviderMigration.cs +++ /dev/null @@ -1,43 +0,0 @@ -using MediaBrowser.Controller.Configuration; -using System.Linq; - -namespace MediaBrowser.Server.Startup.Common.Migrations -{ - class OmdbEpisodeProviderMigration : IVersionMigration - { - private readonly IServerConfigurationManager _config; - private const string _providerName = "The Open Movie Database"; - - public OmdbEpisodeProviderMigration(IServerConfigurationManager config) - { - _config = config; - } - - public void Run() - { - var migrationKey = this.GetType().FullName; - var migrationKeyList = _config.Configuration.Migrations.ToList(); - - if (!migrationKeyList.Contains(migrationKey)) - { - foreach (var metaDataOption in _config.Configuration.MetadataOptions) - { - if (metaDataOption.ItemType == "Episode") - { - var disabledFetchers = metaDataOption.DisabledMetadataFetchers.ToList(); - if (!disabledFetchers.Contains(_providerName)) - { - disabledFetchers.Add(_providerName); - metaDataOption.DisabledMetadataFetchers = disabledFetchers.ToArray(); - } - } - } - - migrationKeyList.Add(migrationKey); - _config.Configuration.Migrations = migrationKeyList.ToArray(); - _config.SaveConfiguration(); - } - - } - } -} diff --git a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs index d04128a18..7805c0d68 100644 --- a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs +++ b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs @@ -20,6 +20,7 @@ namespace MediaBrowser.ServerApplication private ToolStripMenuItem cmdRestart; private ToolStripSeparator toolStripSeparator1; private ToolStripMenuItem cmdCommunity; + private ToolStripMenuItem cmdPremiere; private Container components; private readonly ILogger _logger; @@ -50,6 +51,7 @@ namespace MediaBrowser.ServerApplication cmdExit = new ToolStripMenuItem(); cmdCommunity = new ToolStripMenuItem(); + cmdPremiere = new ToolStripMenuItem(); toolStripSeparator1 = new ToolStripSeparator(); cmdRestart = new ToolStripMenuItem(); toolStripSeparator2 = new ToolStripSeparator(); @@ -69,6 +71,7 @@ namespace MediaBrowser.ServerApplication contextMenuStrip1.Items.AddRange(new ToolStripItem[] { cmdBrowse, cmdConfigure, + cmdPremiere, toolStripSeparator2, cmdRestart, toolStripSeparator1, @@ -89,6 +92,11 @@ namespace MediaBrowser.ServerApplication cmdCommunity.Name = "cmdCommunity"; cmdCommunity.Size = new System.Drawing.Size(208, 22); // + // cmdPremiere + // + cmdPremiere.Name = "cmdPremiere"; + cmdPremiere.Size = new System.Drawing.Size(208, 22); + // // toolStripSeparator1 // toolStripSeparator1.Name = "toolStripSeparator1"; @@ -118,6 +126,7 @@ namespace MediaBrowser.ServerApplication cmdRestart.Click += cmdRestart_Click; cmdConfigure.Click += cmdConfigure_Click; cmdCommunity.Click += cmdCommunity_Click; + cmdPremiere.Click += cmdPremiere_Click; cmdBrowse.Click += cmdBrowse_Click; _configurationManager.ConfigurationUpdated += Instance_ConfigurationUpdated; @@ -138,6 +147,7 @@ namespace MediaBrowser.ServerApplication cmdExit.Text = _localization.GetLocalizedString("LabelExit"); cmdCommunity.Text = _localization.GetLocalizedString("LabelVisitCommunity"); + cmdPremiere.Text = _localization.GetLocalizedString("Emby Premiere"); cmdBrowse.Text = _localization.GetLocalizedString("LabelBrowseLibrary"); cmdConfigure.Text = _localization.GetLocalizedString("LabelConfigureServer"); cmdRestart.Text = _localization.GetLocalizedString("LabelRestartServer"); @@ -163,6 +173,11 @@ namespace MediaBrowser.ServerApplication BrowserLauncher.OpenWebClient(_appHost); } + void cmdPremiere_Click(object sender, EventArgs e) + { + BrowserLauncher.OpenEmbyPremiere(_appHost); + } + void cmdCommunity_Click(object sender, EventArgs e) { BrowserLauncher.OpenCommunity(_appHost); From b80882fadc238b1a45cf7477482254af536e831b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 31 Aug 2016 15:18:17 -0400 Subject: [PATCH 5/5] fix 3.5 project --- .../MediaBrowser.Model.net35.csproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj index 7df8f3126..ad3811646 100644 --- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj +++ b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj @@ -51,7 +51,7 @@ - + Activity\ActivityLogEntry.cs @@ -249,7 +249,7 @@ Connect\PinStatusResult.cs - + Connect\UserLinkType.cs @@ -948,7 +948,7 @@ Querying\UserQuery.cs - + Registration\RegistrationInfo.cs @@ -1020,7 +1020,7 @@ Session\UserDataChangeInfo.cs - + Social\SocialShareInfo.cs @@ -1193,4 +1193,4 @@ --> - \ No newline at end of file +