mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
Merge pull request #4608 from jellyfin/enable-music
Remove deprecated flag to disable music plugins
This commit is contained in:
commit
3e1631fed1
10 changed files with 11 additions and 65 deletions
|
@ -103,6 +103,6 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
|
||||
/// <inheritdoc />
|
||||
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)
|
||||
{
|
||||
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();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
|
|
|
@ -144,6 +144,6 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
|
||||
/// <inheritdoc />
|
||||
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)
|
||||
{
|
||||
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();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
|
|
|
@ -6,8 +6,6 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
{
|
||||
public class PluginConfiguration : BasePluginConfiguration
|
||||
{
|
||||
public bool Enable { get; set; }
|
||||
|
||||
public bool ReplaceAlbumName { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
<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">
|
||||
<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>
|
||||
|
@ -32,7 +28,6 @@
|
|||
.addEventListener('pageshow', function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
||||
document.querySelector('#enable').checked = config.Enable;
|
||||
document.querySelector('#replaceAlbumName').checked = config.ReplaceAlbumName;
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
@ -44,7 +39,6 @@
|
|||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
|
||||
config.Enable = document.querySelector('#enable').checked;
|
||||
config.ReplaceAlbumName = document.querySelector('#replaceAlbumName').checked;
|
||||
|
||||
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
||||
|
|
|
@ -25,12 +25,6 @@ namespace MediaBrowser.Providers.Music
|
|||
/// <inheritdoc />
|
||||
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();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(musicBrainzId))
|
||||
|
@ -236,12 +230,6 @@ namespace MediaBrowser.Providers.Music
|
|||
Item = new MusicArtist()
|
||||
};
|
||||
|
||||
// TODO maybe remove when artist metadata can be disabled
|
||||
if (!Plugin.Instance.Configuration.Enable)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var musicBrainzId = id.GetMusicBrainzArtistId();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(musicBrainzId))
|
||||
|
|
|
@ -43,8 +43,6 @@ namespace MediaBrowser.Providers.Plugins.MusicBrainz
|
|||
}
|
||||
}
|
||||
|
||||
public bool Enable { 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" />
|
||||
<div class="fieldDescription">Span of time between requests in milliseconds. The official server is limited to one request every two seconds.</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">
|
||||
<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>
|
||||
|
@ -54,7 +50,6 @@
|
|||
cancelable: false
|
||||
}));
|
||||
|
||||
document.querySelector('#enable').checked = config.Enable;
|
||||
document.querySelector('#replaceArtistName').checked = config.ReplaceArtistName;
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
@ -68,7 +63,6 @@
|
|||
ApiClient.getPluginConfiguration(MusicBrainzPluginConfig.uniquePluginId).then(function (config) {
|
||||
config.Server = document.querySelector('#server').value;
|
||||
config.RateLimit = document.querySelector('#rateLimit').value;
|
||||
config.Enable = document.querySelector('#enable').checked;
|
||||
config.ReplaceArtistName = document.querySelector('#replaceArtistName').checked;
|
||||
|
||||
ApiClient.updatePluginConfiguration(MusicBrainzPluginConfig.uniquePluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
||||
|
|
|
@ -78,12 +78,6 @@ namespace MediaBrowser.Providers.Music
|
|||
/// <inheritdoc />
|
||||
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 releaseGroupId = searchInfo.GetReleaseGroupId();
|
||||
|
||||
|
@ -194,12 +188,6 @@ namespace MediaBrowser.Providers.Music
|
|||
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 (string.IsNullOrWhiteSpace(releaseId) && !string.IsNullOrWhiteSpace(releaseGroupId))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue