mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
implement option to disable audiodb for now
This commit is contained in:
parent
76e49a1eb7
commit
26c778eb16
@ -102,6 +102,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool Supports(BaseItem item) => item is MusicAlbum;
|
public bool Supports(BaseItem item)
|
||||||
|
=> Plugin.Instance.Configuration.Enable && item is MusicAlbum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,12 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||||||
{
|
{
|
||||||
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))
|
||||||
@ -78,6 +84,11 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||||||
|
|
||||||
private void ProcessResult(MusicAlbum item, Album result, string preferredLanguage)
|
private void ProcessResult(MusicAlbum item, Album result, string preferredLanguage)
|
||||||
{
|
{
|
||||||
|
if (Plugin.Instance.Configuration.ReplaceAlbumName && !string.IsNullOrWhiteSpace(result.strAlbum))
|
||||||
|
{
|
||||||
|
item.Album = result.strAlbum;
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(result.strArtist))
|
if (!string.IsNullOrWhiteSpace(result.strArtist))
|
||||||
{
|
{
|
||||||
item.AlbumArtists = new string[] { result.strArtist };
|
item.AlbumArtists = new string[] { result.strArtist };
|
||||||
|
@ -143,6 +143,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool Supports(BaseItem item) => item is MusicArtist;
|
public bool Supports(BaseItem item)
|
||||||
|
=> Plugin.Instance.Configuration.Enable && item is MusicArtist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,12 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||||||
{
|
{
|
||||||
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))
|
||||||
|
@ -5,5 +5,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||||||
public class PluginConfiguration : BasePluginConfiguration
|
public class PluginConfiguration : BasePluginConfiguration
|
||||||
{
|
{
|
||||||
public bool Enable { get; set; }
|
public bool Enable { get; set; }
|
||||||
|
|
||||||
|
public bool ReplaceAlbumName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
<input is="emby-checkbox" type="checkbox" id="enable" />
|
<input is="emby-checkbox" type="checkbox" id="enable" />
|
||||||
<span>Enable this provider for metadata searches on artists and albums.</span>
|
<span>Enable this provider for metadata searches on artists and albums.</span>
|
||||||
</label>
|
</label>
|
||||||
|
<label class="checkboxContainer">
|
||||||
|
<input is="emby-checkbox" type="checkbox" id="replaceArtistName" />
|
||||||
|
<span>When an album is found during a metadata search, replace the name with the value on the server.</span>
|
||||||
|
</label>
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
|
<button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user