Do not convert 'Type' value to string unnecessarily, and do not replace 'General' type with null
This commit is contained in:
parent
422d5b2b68
commit
67edf1b7f5
|
@ -20,6 +20,9 @@ namespace MediaBrowser.Controller.Providers
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the specific media type for this id.
|
/// Gets the specific media type for this id.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This can be used along with the <see cref="Name"/> to localize the external id on the client.
|
||||||
|
/// </remarks>
|
||||||
ExternalIdMediaType Type { get; }
|
ExternalIdMediaType Type { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -16,11 +16,12 @@ namespace MediaBrowser.Model.Providers
|
||||||
public string Key { get; set; }
|
public string Key { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the media type (Album, Artist, etc).
|
/// Gets or sets the specific media type for this id.
|
||||||
/// This can be null if there is no specific type.
|
|
||||||
/// This string is also used to localize the media type on the client.
|
|
||||||
/// </summary>
|
/// </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>
|
/// <summary>
|
||||||
/// Gets or sets the URL format string.
|
/// Gets or sets the URL format string.
|
||||||
|
|
|
@ -908,7 +908,7 @@ namespace MediaBrowser.Providers.Manager
|
||||||
{
|
{
|
||||||
Name = i.Name,
|
Name = i.Name,
|
||||||
Key = i.Key,
|
Key = i.Key,
|
||||||
Type = i.Type == ExternalIdMediaType.General ? null : i.Type.ToString(),
|
Type = i.Type,
|
||||||
UrlFormatString = i.UrlFormatString
|
UrlFormatString = i.UrlFormatString
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user