remove deprecated flag to disable music plugins
This commit is contained in:
parent
f1b3811ca7
commit
8b0ef119c3
|
@ -103,6 +103,6 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool Supports(BaseItem item)
|
public bool Supports(BaseItem item)
|
||||||
=> Plugin.Instance.Configuration.Enable && item is MusicAlbum;
|
=> item is MusicAlbum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,13 +56,6 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
||||||
public async Task<MetadataResult<MusicAlbum>> GetMetadata(AlbumInfo info, CancellationToken cancellationToken)
|
public async Task<MetadataResult<MusicAlbum>> GetMetadata(AlbumInfo info, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var result = new MetadataResult<MusicAlbum>();
|
var result = new MetadataResult<MusicAlbum>();
|
||||||
|
|
||||||
// TODO maybe remove when artist metadata can be disabled
|
|
||||||
if (!Plugin.Instance.Configuration.Enable)
|
|
||||||
{
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
var id = info.GetReleaseGroupId();
|
var id = info.GetReleaseGroupId();
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(id))
|
if (!string.IsNullOrWhiteSpace(id))
|
||||||
|
|
|
@ -144,6 +144,6 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool Supports(BaseItem item)
|
public bool Supports(BaseItem item)
|
||||||
=> Plugin.Instance.Configuration.Enable && item is MusicArtist;
|
=> item is MusicArtist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,13 +57,6 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
||||||
public async Task<MetadataResult<MusicArtist>> GetMetadata(ArtistInfo info, CancellationToken cancellationToken)
|
public async Task<MetadataResult<MusicArtist>> GetMetadata(ArtistInfo info, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var result = new MetadataResult<MusicArtist>();
|
var result = new MetadataResult<MusicArtist>();
|
||||||
|
|
||||||
// TODO maybe remove when artist metadata can be disabled
|
|
||||||
if (!Plugin.Instance.Configuration.Enable)
|
|
||||||
{
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
var id = info.GetMusicBrainzArtistId();
|
var id = info.GetMusicBrainzArtistId();
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(id))
|
if (!string.IsNullOrWhiteSpace(id))
|
||||||
|
|
|
@ -6,8 +6,6 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
||||||
{
|
{
|
||||||
public class PluginConfiguration : BasePluginConfiguration
|
public class PluginConfiguration : BasePluginConfiguration
|
||||||
{
|
{
|
||||||
public bool Enable { get; set; }
|
|
||||||
|
|
||||||
public bool ReplaceAlbumName { get; set; }
|
public bool ReplaceAlbumName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
<form class="configForm">
|
<form class="configForm">
|
||||||
<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="replaceAlbumName" />
|
<input is="emby-checkbox" type="checkbox" id="replaceAlbumName" />
|
||||||
<span>When an album is found during a metadata search, replace the name with the value on the server.</span>
|
<span>When an album is found during a metadata search, replace the name with the value on the server.</span>
|
||||||
|
@ -32,7 +28,6 @@
|
||||||
.addEventListener('pageshow', function () {
|
.addEventListener('pageshow', function () {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
||||||
document.querySelector('#enable').checked = config.Enable;
|
|
||||||
document.querySelector('#replaceAlbumName').checked = config.ReplaceAlbumName;
|
document.querySelector('#replaceAlbumName').checked = config.ReplaceAlbumName;
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
@ -44,7 +39,6 @@
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
||||||
config.Enable = document.querySelector('#enable').checked;
|
|
||||||
config.ReplaceAlbumName = document.querySelector('#replaceAlbumName').checked;
|
config.ReplaceAlbumName = document.querySelector('#replaceAlbumName').checked;
|
||||||
|
|
||||||
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
||||||
|
|
|
@ -25,12 +25,6 @@ namespace MediaBrowser.Providers.Music
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(ArtistInfo searchInfo, CancellationToken cancellationToken)
|
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(ArtistInfo searchInfo, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// TODO maybe remove when artist metadata can be disabled
|
|
||||||
if (!Plugin.Instance.Configuration.Enable)
|
|
||||||
{
|
|
||||||
return Enumerable.Empty<RemoteSearchResult>();
|
|
||||||
}
|
|
||||||
|
|
||||||
var musicBrainzId = searchInfo.GetMusicBrainzArtistId();
|
var musicBrainzId = searchInfo.GetMusicBrainzArtistId();
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(musicBrainzId))
|
if (!string.IsNullOrWhiteSpace(musicBrainzId))
|
||||||
|
@ -236,12 +230,6 @@ namespace MediaBrowser.Providers.Music
|
||||||
Item = new MusicArtist()
|
Item = new MusicArtist()
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO maybe remove when artist metadata can be disabled
|
|
||||||
if (!Plugin.Instance.Configuration.Enable)
|
|
||||||
{
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
var musicBrainzId = id.GetMusicBrainzArtistId();
|
var musicBrainzId = id.GetMusicBrainzArtistId();
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(musicBrainzId))
|
if (string.IsNullOrWhiteSpace(musicBrainzId))
|
||||||
|
|
|
@ -43,8 +43,6 @@ namespace MediaBrowser.Providers.Plugins.MusicBrainz
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Enable { get; set; }
|
|
||||||
|
|
||||||
public bool ReplaceArtistName { get; set; }
|
public bool ReplaceArtistName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
@ -54,7 +50,6 @@
|
||||||
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();
|
||||||
|
@ -68,7 +63,6 @@
|
||||||
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);
|
||||||
|
|
|
@ -78,12 +78,6 @@ namespace MediaBrowser.Providers.Music
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(AlbumInfo searchInfo, CancellationToken cancellationToken)
|
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(AlbumInfo searchInfo, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// TODO maybe remove when artist metadata can be disabled
|
|
||||||
if (!Plugin.Instance.Configuration.Enable)
|
|
||||||
{
|
|
||||||
return Enumerable.Empty<RemoteSearchResult>();
|
|
||||||
}
|
|
||||||
|
|
||||||
var releaseId = searchInfo.GetReleaseId();
|
var releaseId = searchInfo.GetReleaseId();
|
||||||
var releaseGroupId = searchInfo.GetReleaseGroupId();
|
var releaseGroupId = searchInfo.GetReleaseGroupId();
|
||||||
|
|
||||||
|
@ -194,12 +188,6 @@ namespace MediaBrowser.Providers.Music
|
||||||
Item = new MusicAlbum()
|
Item = new MusicAlbum()
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO maybe remove when artist metadata can be disabled
|
|
||||||
if (!Plugin.Instance.Configuration.Enable)
|
|
||||||
{
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we have a release group Id but not a release Id...
|
// If we have a release group Id but not a release Id...
|
||||||
if (string.IsNullOrWhiteSpace(releaseId) && !string.IsNullOrWhiteSpace(releaseGroupId))
|
if (string.IsNullOrWhiteSpace(releaseId) && !string.IsNullOrWhiteSpace(releaseGroupId))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user