update app footer
This commit is contained in:
parent
0375990d8e
commit
eefd697b85
|
@ -71,14 +71,17 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
|
||||
HostConfig.Instance.MapExceptionToStatusCode = new Dictionary<Type, int>
|
||||
{
|
||||
{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<string, string>();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -382,7 +382,6 @@ namespace MediaBrowser.Server.Startup.Common
|
|||
{
|
||||
var migrations = new List<IVersionMigration>
|
||||
{
|
||||
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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the web client.
|
||||
/// </summary>
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
<Compile Include="Migrations\IVersionMigration.cs" />
|
||||
<Compile Include="Migrations\DbMigration.cs" />
|
||||
<Compile Include="Migrations\MovieDbEpisodeProviderMigration.cs" />
|
||||
<Compile Include="Migrations\OmdbEpisodeProviderMigration.cs" />
|
||||
<Compile Include="Migrations\UpdateLevelMigration.cs" />
|
||||
<Compile Include="NativeEnvironment.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user