aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-05-17 15:59:13 -0400
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-05-17 15:59:13 -0400
commit67edf1b7f5f423ab5fa53644bacdba6974b430db (patch)
tree6dc99e6d4886adc0074dc1e2a42953b198a28f19
parent422d5b2b68bdce4da385a19382a7a52060cb10b2 (diff)
Do not convert 'Type' value to string unnecessarily, and do not replace 'General' type with null
-rw-r--r--MediaBrowser.Controller/Providers/IExternalId.cs3
-rw-r--r--MediaBrowser.Model/Providers/ExternalIdInfo.cs9
-rw-r--r--MediaBrowser.Providers/Manager/ProviderManager.cs2
3 files changed, 9 insertions, 5 deletions
diff --git a/MediaBrowser.Controller/Providers/IExternalId.cs b/MediaBrowser.Controller/Providers/IExternalId.cs
index 0fcf0c09d..149c58847 100644
--- a/MediaBrowser.Controller/Providers/IExternalId.cs
+++ b/MediaBrowser.Controller/Providers/IExternalId.cs
@@ -20,6 +20,9 @@ namespace MediaBrowser.Controller.Providers
/// <summary>
/// Gets the specific media type for this id.
/// </summary>
+ /// <remarks>
+ /// This can be used along with the <see cref="Name"/> to localize the external id on the client.
+ /// </remarks>
ExternalIdMediaType Type { get; }
/// <summary>
diff --git a/MediaBrowser.Model/Providers/ExternalIdInfo.cs b/MediaBrowser.Model/Providers/ExternalIdInfo.cs
index ca0c857c4..493c6136e 100644
--- a/MediaBrowser.Model/Providers/ExternalIdInfo.cs
+++ b/MediaBrowser.Model/Providers/ExternalIdInfo.cs
@@ -16,11 +16,12 @@ namespace MediaBrowser.Model.Providers
public string Key { get; set; }
/// <summary>
- /// Gets or sets the media type (Album, Artist, etc).
- /// This can be null if there is no specific type.
- /// This string is also used to localize the media type on the client.
+ /// Gets or sets the specific media type for this id.
/// </summary>
- public string Type { get; set; }
+ /// <remarks>
+ /// This can be used along with the <see cref="Name"/> to localize the external id on the client.
+ /// </remarks>
+ public ExternalIdMediaType Type { get; set; }
/// <summary>
/// Gets or sets the URL format string.
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index 49083c01b..4ab758123 100644
--- a/MediaBrowser.Providers/Manager/ProviderManager.cs
+++ b/MediaBrowser.Providers/Manager/ProviderManager.cs
@@ -908,7 +908,7 @@ namespace MediaBrowser.Providers.Manager
{
Name = i.Name,
Key = i.Key,
- Type = i.Type == ExternalIdMediaType.General ? null : i.Type.ToString(),
+ Type = i.Type,
UrlFormatString = i.UrlFormatString
});
}