Add escape hatch for Series merging

This is an universal solution for plugins to override how series are merged.
The reason to override is so we can set the same provider id on multiple items without merging them, while using another id for merging them. Having an (optional) provider id not tied to any online database allows plugins to use their own rules for merging series.
This commit is contained in:
Mikal Stordal 2022-06-25 23:47:21 +02:00
parent 28594ececa
commit 8e1796f08a
2 changed files with 11 additions and 0 deletions

View File

@ -184,6 +184,11 @@ namespace MediaBrowser.Controller.Entities.TV
list.Insert(0, key); list.Insert(0, key);
} }
if (this.TryGetProviderId(MetadataProvider.Custom, out key))
{
list.Insert(0, key);
}
return list; return list;
} }

View File

@ -7,6 +7,12 @@ namespace MediaBrowser.Model.Entities
/// </summary> /// </summary>
public enum MetadataProvider public enum MetadataProvider
{ {
/// <summary>
/// This metadata provider is for users and/or plugins to override the
/// default merging behaviour.
/// </summary>
Custom = 0,
/// <summary> /// <summary>
/// The imdb. /// The imdb.
/// </summary> /// </summary>