Various fixes (#9361)
This commit is contained in:
parent
720852f708
commit
e7a7edbac0
|
@ -1,12 +1,13 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>AudioDB</title>
|
<title>TheAudioDB</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
<div id="configPage" data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
<h1>TheAudioDB</h1>
|
||||||
<form class="configForm">
|
<form class="configForm">
|
||||||
<label class="checkboxContainer">
|
<label class="checkboxContainer">
|
||||||
<input is="emby-checkbox" type="checkbox" id="replaceAlbumName" />
|
<input is="emby-checkbox" type="checkbox" id="replaceAlbumName" />
|
||||||
|
|
|
@ -7,16 +7,22 @@ namespace MediaBrowser.Providers.Plugins.MusicBrainz.Configuration;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PluginConfiguration : BasePluginConfiguration
|
public class PluginConfiguration : BasePluginConfiguration
|
||||||
{
|
{
|
||||||
private const string DefaultServer = "https://musicbrainz.org";
|
/// <summary>
|
||||||
|
/// The default server URL.
|
||||||
|
/// </summary>
|
||||||
|
public const string DefaultServer = "https://musicbrainz.org";
|
||||||
|
|
||||||
private const double DefaultRateLimit = 1.0;
|
/// <summary>
|
||||||
|
/// The default rate limit.
|
||||||
|
/// </summary>
|
||||||
|
public const double DefaultRateLimit = 1.0;
|
||||||
|
|
||||||
private string _server = DefaultServer;
|
private string _server = DefaultServer;
|
||||||
|
|
||||||
private double _rateLimit = DefaultRateLimit;
|
private double _rateLimit = DefaultRateLimit;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the server url.
|
/// Gets or sets the server URL.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Server
|
public string Server
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
<div id="musicBrainzConfigurationPage" data-role="page"
|
<!DOCTYPE html>
|
||||||
class="page type-interior pluginConfigurationPage musicBrainzConfigurationPage" data-require="emby-input,emby-button,emby-checkbox">
|
<html>
|
||||||
<div data-role="content">
|
<head>
|
||||||
<div class="content-primary">
|
<title>MusicBrainz</title>
|
||||||
<h1>MusicBrainz</h1>
|
</head>
|
||||||
<form class="musicBrainzConfigurationForm">
|
<body>
|
||||||
|
<div id="configPage" data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
||||||
|
<div data-role="content">
|
||||||
|
<div class="content-primary">
|
||||||
|
<h1>MusicBrainz</h1>
|
||||||
|
<form class="configForm">
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" type="text" id="server" required label="Server" />
|
<input is="emby-input" type="text" id="server" required label="Server" />
|
||||||
<div class="fieldDescription">This can be a mirror of the official server or even a custom server.</div>
|
<div class="fieldDescription">This can be a mirror of the official server or even a custom server.</div>
|
||||||
|
@ -28,7 +33,7 @@
|
||||||
uniquePluginId: "8c95c4d2-e50c-4fb0-a4f3-6c06ff0f9a1a"
|
uniquePluginId: "8c95c4d2-e50c-4fb0-a4f3-6c06ff0f9a1a"
|
||||||
};
|
};
|
||||||
|
|
||||||
document.querySelector('.musicBrainzConfigurationPage')
|
document.querySelector('.configPage')
|
||||||
.addEventListener('pageshow', function () {
|
.addEventListener('pageshow', function () {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
ApiClient.getPluginConfiguration(MusicBrainzPluginConfig.uniquePluginId).then(function (config) {
|
ApiClient.getPluginConfiguration(MusicBrainzPluginConfig.uniquePluginId).then(function (config) {
|
||||||
|
@ -52,7 +57,7 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
document.querySelector('.musicBrainzConfigurationForm')
|
document.querySelector('.configForm')
|
||||||
.addEventListener('submit', function (e) {
|
.addEventListener('submit', function (e) {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class MusicBrainzAlbumProvider : IRemoteMetadataProvider<MusicAlbum, Albu
|
||||||
{
|
{
|
||||||
// Fallback to official server
|
// Fallback to official server
|
||||||
_logger.LogWarning("Invalid MusicBrainz server specified, falling back to official server");
|
_logger.LogWarning("Invalid MusicBrainz server specified, falling back to official server");
|
||||||
var defaultServer = new Uri(configuration.Server);
|
var defaultServer = new Uri(PluginConfiguration.DefaultServer);
|
||||||
Query.DefaultServer = defaultServer.Host;
|
Query.DefaultServer = defaultServer.Host;
|
||||||
Query.DefaultPort = defaultServer.Port;
|
Query.DefaultPort = defaultServer.Port;
|
||||||
Query.DefaultUrlScheme = defaultServer.Scheme;
|
Query.DefaultUrlScheme = defaultServer.Scheme;
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class MusicBrainzArtistProvider : IRemoteMetadataProvider<MusicArtist, Ar
|
||||||
{
|
{
|
||||||
// Fallback to official server
|
// Fallback to official server
|
||||||
_logger.LogWarning("Invalid MusicBrainz server specified, falling back to official server");
|
_logger.LogWarning("Invalid MusicBrainz server specified, falling back to official server");
|
||||||
var defaultServer = new Uri(configuration.Server);
|
var defaultServer = new Uri(PluginConfiguration.DefaultServer);
|
||||||
Query.DefaultServer = defaultServer.Host;
|
Query.DefaultServer = defaultServer.Host;
|
||||||
Query.DefaultPort = defaultServer.Port;
|
Query.DefaultPort = defaultServer.Port;
|
||||||
Query.DefaultUrlScheme = defaultServer.Scheme;
|
Query.DefaultUrlScheme = defaultServer.Scheme;
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
<title>OMDb</title>
|
<title>OMDb</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
<div id="configPage" data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
<h1>OMDb</h1>
|
||||||
<form class="configForm">
|
<form class="configForm">
|
||||||
<label class="checkboxContainer">
|
<label class="checkboxContainer">
|
||||||
<input is="emby-checkbox" type="checkbox" id="castAndCrew" />
|
<input is="emby-checkbox" type="checkbox" id="castAndCrew" />
|
||||||
|
@ -33,16 +34,16 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
document.querySelector('.configForm')
|
document.querySelector('.configForm')
|
||||||
.addEventListener('submit', function (e) {
|
.addEventListener('submit', function (e) {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
||||||
config.CastAndCrew = document.querySelector('#castAndCrew').checked;
|
config.CastAndCrew = document.querySelector('#castAndCrew').checked;
|
||||||
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
||||||
});
|
});
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
<title>Studio Images</title>
|
<title>Studio Images</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
<div id="configPage" data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
<h1>Studio Images</h1>
|
||||||
<form class="configForm">
|
<form class="configForm">
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" type="text" id="repository" label="Repository" />
|
<input is="emby-input" type="text" id="repository" label="Repository" />
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
<title>TMDb</title>
|
<title>TMDb</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
<div id="configPage" data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
<h1>TMDb</h1>
|
||||||
<form class="configForm">
|
<form class="configForm">
|
||||||
<label class="checkboxContainer">
|
<label class="checkboxContainer">
|
||||||
<input is="emby-checkbox" type="checkbox" id="includeAdult" />
|
<input is="emby-checkbox" type="checkbox" id="includeAdult" />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user