|
|
@ -16,10 +16,6 @@
|
|
|
|
<input is="emby-input" type="number" id="rateLimit" pattern="[0-9]*" required min="0" max="10000" label="Rate Limit" />
|
|
|
|
<input is="emby-input" type="number" id="rateLimit" pattern="[0-9]*" required min="0" max="10000" label="Rate Limit" />
|
|
|
|
<div class="fieldDescription">Span of time between requests in milliseconds. The official server is limited to one request every two seconds.</div>
|
|
|
|
<div class="fieldDescription">Span of time between requests in milliseconds. The official server is limited to one request every two seconds.</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<label class="checkboxContainer">
|
|
|
|
|
|
|
|
<input is="emby-checkbox" type="checkbox" id="enable" />
|
|
|
|
|
|
|
|
<span>Enable this provider for metadata searches on artists and albums.</span>
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="checkboxContainer">
|
|
|
|
<label class="checkboxContainer">
|
|
|
|
<input is="emby-checkbox" type="checkbox" id="replaceArtistName" />
|
|
|
|
<input is="emby-checkbox" type="checkbox" id="replaceArtistName" />
|
|
|
|
<span>When an artist is found during a metadata search, replace the artist name with the value on the server.</span>
|
|
|
|
<span>When an artist is found during a metadata search, replace the artist name with the value on the server.</span>
|
|
|
@ -46,7 +42,7 @@
|
|
|
|
bubbles: true,
|
|
|
|
bubbles: true,
|
|
|
|
cancelable: false
|
|
|
|
cancelable: false
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
var rateLimit = document.querySelector('#rateLimit');
|
|
|
|
var rateLimit = document.querySelector('#rateLimit');
|
|
|
|
rateLimit.value = config.RateLimit;
|
|
|
|
rateLimit.value = config.RateLimit;
|
|
|
|
rateLimit.dispatchEvent(new Event('change', {
|
|
|
|
rateLimit.dispatchEvent(new Event('change', {
|
|
|
@ -54,26 +50,24 @@
|
|
|
|
cancelable: false
|
|
|
|
cancelable: false
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
document.querySelector('#enable').checked = config.Enable;
|
|
|
|
|
|
|
|
document.querySelector('#replaceArtistName').checked = config.ReplaceArtistName;
|
|
|
|
document.querySelector('#replaceArtistName').checked = config.ReplaceArtistName;
|
|
|
|
|
|
|
|
|
|
|
|
Dashboard.hideLoadingMsg();
|
|
|
|
Dashboard.hideLoadingMsg();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
document.querySelector('.musicBrainzConfigForm')
|
|
|
|
document.querySelector('.musicBrainzConfigForm')
|
|
|
|
.addEventListener('submit', function (e) {
|
|
|
|
.addEventListener('submit', function (e) {
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
|
|
|
|
|
|
|
|
ApiClient.getPluginConfiguration(MusicBrainzPluginConfig.uniquePluginId).then(function (config) {
|
|
|
|
ApiClient.getPluginConfiguration(MusicBrainzPluginConfig.uniquePluginId).then(function (config) {
|
|
|
|
config.Server = document.querySelector('#server').value;
|
|
|
|
config.Server = document.querySelector('#server').value;
|
|
|
|
config.RateLimit = document.querySelector('#rateLimit').value;
|
|
|
|
config.RateLimit = document.querySelector('#rateLimit').value;
|
|
|
|
config.Enable = document.querySelector('#enable').checked;
|
|
|
|
|
|
|
|
config.ReplaceArtistName = document.querySelector('#replaceArtistName').checked;
|
|
|
|
config.ReplaceArtistName = document.querySelector('#replaceArtistName').checked;
|
|
|
|
|
|
|
|
|
|
|
|
ApiClient.updatePluginConfiguration(MusicBrainzPluginConfig.uniquePluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
|
|
|
ApiClient.updatePluginConfiguration(MusicBrainzPluginConfig.uniquePluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|