| | 1 | | using System; |
| | 2 | |
|
| | 3 | | namespace MediaBrowser.Model.Providers |
| | 4 | | { |
| | 5 | | /// <summary> |
| | 6 | | /// Represents the external id information for serialization to the client. |
| | 7 | | /// </summary> |
| | 8 | | public class ExternalIdInfo |
| | 9 | | { |
| | 10 | | /// <summary> |
| | 11 | | /// Initializes a new instance of the <see cref="ExternalIdInfo"/> class. |
| | 12 | | /// </summary> |
| | 13 | | /// <param name="name">Name of the external id provider (IE: IMDB, MusicBrainz, etc).</param> |
| | 14 | | /// <param name="key">Key for this id. This key should be unique across all providers.</param> |
| | 15 | | /// <param name="type">Specific media type for this id.</param> |
| | 16 | | /// <param name="urlFormatString">URL format string.</param> |
| | 17 | | public ExternalIdInfo(string name, string key, ExternalIdMediaType? type, string? urlFormatString) |
| | 18 | | { |
| 19 | 19 | | Name = name; |
| 19 | 20 | | Key = key; |
| 19 | 21 | | Type = type; |
| | 22 | | #pragma warning disable CS0618 // Type or member is obsolete - Remove 10.11 |
| 19 | 23 | | UrlFormatString = urlFormatString; |
| | 24 | | #pragma warning restore CS0618 // Type or member is obsolete |
| 19 | 25 | | } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc). |
| | 29 | | /// </summary> |
| | 30 | | // TODO: This should be renamed to ProviderName |
| | 31 | | public string Name { get; set; } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Gets or sets the unique key for this id. This key should be unique across all providers. |
| | 35 | | /// </summary> |
| | 36 | | // TODO: This property is not actually unique across the concrete types at the moment. It should be updated to b |
| | 37 | | public string Key { get; set; } |
| | 38 | |
|
| | 39 | | /// <summary> |
| | 40 | | /// Gets or sets the specific media type for this id. This is used to distinguish between the different |
| | 41 | | /// external id types for providers with multiple ids. |
| | 42 | | /// A null value indicates there is no specific media type associated with the external id, or this is the |
| | 43 | | /// default id for the external provider so there is no need to specify a type. |
| | 44 | | /// </summary> |
| | 45 | | /// <remarks> |
| | 46 | | /// This can be used along with the <see cref="Name"/> to localize the external id on the client. |
| | 47 | | /// </remarks> |
| | 48 | | public ExternalIdMediaType? Type { get; set; } |
| | 49 | |
|
| | 50 | | /// <summary> |
| | 51 | | /// Gets or sets the URL format string. |
| | 52 | | /// </summary> |
| | 53 | | [Obsolete("Obsolete in 10.10, to be removed in 10.11")] |
| | 54 | | public string? UrlFormatString { get; set; } |
| | 55 | | } |
| | 56 | | } |