Fix a small number of compile warnings
This commit is contained in:
parent
6d4f3c42a2
commit
22a860a806
|
@ -2734,7 +2734,7 @@ namespace Emby.Server.Implementations.Data
|
|||
|
||||
foreach (var providerId in newItem.ProviderIds)
|
||||
{
|
||||
if (providerId.Key == MetadataProviders.TmdbCollection.ToString())
|
||||
if (providerId.Key == MetadataProvider.TmdbCollection.ToString())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -4324,7 +4324,7 @@ namespace Emby.Server.Implementations.Data
|
|||
var index = 0;
|
||||
foreach (var pair in query.ExcludeProviderIds)
|
||||
{
|
||||
if (string.Equals(pair.Key, MetadataProviders.TmdbCollection.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||
if (string.Equals(pair.Key, MetadataProvider.TmdbCollection.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -4353,7 +4353,7 @@ namespace Emby.Server.Implementations.Data
|
|||
var index = 0;
|
||||
foreach (var pair in query.HasAnyProviderId)
|
||||
{
|
||||
if (string.Equals(pair.Key, MetadataProviders.TmdbCollection.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||
if (string.Equals(pair.Key, MetadataProvider.TmdbCollection.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
|||
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tmdb, id);
|
||||
item.SetProviderId(MetadataProvider.Tmdb, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
|||
|
||||
if (!string.IsNullOrWhiteSpace(tmdbid))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tmdb, tmdbid);
|
||||
item.SetProviderId(MetadataProvider.Tmdb, tmdbid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
|||
|
||||
if (!string.IsNullOrWhiteSpace(imdbid))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, imdbid);
|
||||
item.SetProviderId(MetadataProvider.Imdb, imdbid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
|
|||
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tvdb, id);
|
||||
item.SetProviderId(MetadataProvider.Tvdb, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1893,22 +1893,22 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
writer.WriteStartDocument(true);
|
||||
writer.WriteStartElement("tvshow");
|
||||
string id;
|
||||
if (timer.SeriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out id))
|
||||
if (timer.SeriesProviderIds.TryGetValue(MetadataProvider.Tvdb.ToString(), out id))
|
||||
{
|
||||
writer.WriteElementString("id", id);
|
||||
}
|
||||
|
||||
if (timer.SeriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out id))
|
||||
if (timer.SeriesProviderIds.TryGetValue(MetadataProvider.Imdb.ToString(), out id))
|
||||
{
|
||||
writer.WriteElementString("imdb_id", id);
|
||||
}
|
||||
|
||||
if (timer.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out id))
|
||||
if (timer.SeriesProviderIds.TryGetValue(MetadataProvider.Tmdb.ToString(), out id))
|
||||
{
|
||||
writer.WriteElementString("tmdbid", id);
|
||||
}
|
||||
|
||||
if (timer.SeriesProviderIds.TryGetValue(MetadataProviders.Zap2It.ToString(), out id))
|
||||
if (timer.SeriesProviderIds.TryGetValue(MetadataProvider.Zap2It.ToString(), out id))
|
||||
{
|
||||
writer.WriteElementString("zap2itid", id);
|
||||
}
|
||||
|
@ -2075,14 +2075,14 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
writer.WriteElementString("credits", person);
|
||||
}
|
||||
|
||||
var tmdbCollection = item.GetProviderId(MetadataProviders.TmdbCollection);
|
||||
var tmdbCollection = item.GetProviderId(MetadataProvider.TmdbCollection);
|
||||
|
||||
if (!string.IsNullOrEmpty(tmdbCollection))
|
||||
{
|
||||
writer.WriteElementString("collectionnumber", tmdbCollection);
|
||||
}
|
||||
|
||||
var imdb = item.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdb = item.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(imdb))
|
||||
{
|
||||
if (!isSeriesEpisode)
|
||||
|
@ -2096,7 +2096,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
lockData = false;
|
||||
}
|
||||
|
||||
var tvdb = item.GetProviderId(MetadataProviders.Tvdb);
|
||||
var tvdb = item.GetProviderId(MetadataProvider.Tvdb);
|
||||
if (!string.IsNullOrEmpty(tvdb))
|
||||
{
|
||||
writer.WriteElementString("tvdbid", tvdb);
|
||||
|
@ -2105,7 +2105,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
lockData = false;
|
||||
}
|
||||
|
||||
var tmdb = item.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdb = item.GetProviderId(MetadataProvider.Tmdb);
|
||||
if (!string.IsNullOrEmpty(tmdb))
|
||||
{
|
||||
writer.WriteElementString("tmdbid", tmdb);
|
||||
|
|
|
@ -342,7 +342,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
|||
{
|
||||
info.SeriesId = programId.Substring(0, 10);
|
||||
|
||||
info.SeriesProviderIds[MetadataProviders.Zap2It.ToString()] = info.SeriesId;
|
||||
info.SeriesProviderIds[MetadataProvider.Zap2It.ToString()] = info.SeriesId;
|
||||
|
||||
if (details.metadata != null)
|
||||
{
|
||||
|
|
|
@ -655,7 +655,7 @@ namespace MediaBrowser.Api.Library
|
|||
EnableImages = false
|
||||
}
|
||||
|
||||
}).Where(i => string.Equals(request.TvdbId, i.GetProviderId(MetadataProviders.Tvdb), StringComparison.OrdinalIgnoreCase)).ToArray();
|
||||
}).Where(i => string.Equals(request.TvdbId, i.GetProviderId(MetadataProvider.Tvdb), StringComparison.OrdinalIgnoreCase)).ToArray();
|
||||
|
||||
foreach (var item in series)
|
||||
{
|
||||
|
@ -688,11 +688,11 @@ namespace MediaBrowser.Api.Library
|
|||
|
||||
if (!string.IsNullOrWhiteSpace(request.ImdbId))
|
||||
{
|
||||
movies = movies.Where(i => string.Equals(request.ImdbId, i.GetProviderId(MetadataProviders.Imdb), StringComparison.OrdinalIgnoreCase)).ToList();
|
||||
movies = movies.Where(i => string.Equals(request.ImdbId, i.GetProviderId(MetadataProvider.Imdb), StringComparison.OrdinalIgnoreCase)).ToList();
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(request.TmdbId))
|
||||
{
|
||||
movies = movies.Where(i => string.Equals(request.TmdbId, i.GetProviderId(MetadataProviders.Tmdb), StringComparison.OrdinalIgnoreCase)).ToList();
|
||||
movies = movies.Where(i => string.Equals(request.TmdbId, i.GetProviderId(MetadataProvider.Tmdb), StringComparison.OrdinalIgnoreCase)).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -273,7 +273,7 @@ namespace MediaBrowser.Api.Movies
|
|||
EnableGroupByMetadataKey = true,
|
||||
DtoOptions = dtoOptions
|
||||
|
||||
}).GroupBy(i => i.GetProviderId(MetadataProviders.Imdb) ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture))
|
||||
}).GroupBy(i => i.GetProviderId(MetadataProvider.Imdb) ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture))
|
||||
.Select(x => x.First())
|
||||
.Take(itemLimit)
|
||||
.ToList();
|
||||
|
@ -314,7 +314,7 @@ namespace MediaBrowser.Api.Movies
|
|||
EnableGroupByMetadataKey = true,
|
||||
DtoOptions = dtoOptions
|
||||
|
||||
}).GroupBy(i => i.GetProviderId(MetadataProviders.Imdb) ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture))
|
||||
}).GroupBy(i => i.GetProviderId(MetadataProvider.Imdb) ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture))
|
||||
.Select(x => x.First())
|
||||
.Take(itemLimit)
|
||||
.ToList();
|
||||
|
|
|
@ -97,14 +97,14 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
list.Insert(0, albumArtist + "-" + Name);
|
||||
}
|
||||
|
||||
var id = this.GetProviderId(MetadataProviders.MusicBrainzAlbum);
|
||||
var id = this.GetProviderId(MetadataProvider.MusicBrainzAlbum);
|
||||
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
list.Insert(0, "MusicAlbum-Musicbrainz-" + id);
|
||||
}
|
||||
|
||||
id = this.GetProviderId(MetadataProviders.MusicBrainzReleaseGroup);
|
||||
id = this.GetProviderId(MetadataProvider.MusicBrainzReleaseGroup);
|
||||
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||
private static List<string> GetUserDataKeys(MusicArtist item)
|
||||
{
|
||||
var list = new List<string>();
|
||||
var id = item.GetProviderId(MetadataProviders.MusicBrainzArtist);
|
||||
var id = item.GetProviderId(MetadataProvider.MusicBrainzArtist);
|
||||
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
|
|
|
@ -173,7 +173,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||
{
|
||||
var list = base.GetRelatedUrls();
|
||||
|
||||
var imdbId = this.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = this.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
list.Add(new ExternalUrl
|
||||
|
|
|
@ -164,13 +164,13 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
|
||||
var key = this.GetProviderId(MetadataProviders.Imdb);
|
||||
var key = this.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
list.Insert(0, key);
|
||||
}
|
||||
|
||||
key = this.GetProviderId(MetadataProviders.Tvdb);
|
||||
key = this.GetProviderId(MetadataProvider.Tvdb);
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
list.Insert(0, key);
|
||||
|
@ -493,7 +493,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||
{
|
||||
var list = base.GetRelatedUrls();
|
||||
|
||||
var imdbId = this.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = this.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
list.Add(new ExternalUrl
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
var list = base.GetRelatedUrls();
|
||||
|
||||
var imdbId = this.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = this.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
list.Add(new ExternalUrl
|
||||
|
|
|
@ -611,7 +611,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
var filterValue = query.HasImdbId.Value;
|
||||
|
||||
var hasValue = !string.IsNullOrEmpty(item.GetProviderId(MetadataProviders.Imdb));
|
||||
var hasValue = !string.IsNullOrEmpty(item.GetProviderId(MetadataProvider.Imdb));
|
||||
|
||||
if (hasValue != filterValue)
|
||||
{
|
||||
|
@ -623,7 +623,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
var filterValue = query.HasTmdbId.Value;
|
||||
|
||||
var hasValue = !string.IsNullOrEmpty(item.GetProviderId(MetadataProviders.Tmdb));
|
||||
var hasValue = !string.IsNullOrEmpty(item.GetProviderId(MetadataProvider.Tmdb));
|
||||
|
||||
if (hasValue != filterValue)
|
||||
{
|
||||
|
@ -635,7 +635,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
var filterValue = query.HasTvdbId.Value;
|
||||
|
||||
var hasValue = !string.IsNullOrEmpty(item.GetProviderId(MetadataProviders.Tvdb));
|
||||
var hasValue = !string.IsNullOrEmpty(item.GetProviderId(MetadataProvider.Tvdb));
|
||||
|
||||
if (hasValue != filterValue)
|
||||
{
|
||||
|
|
|
@ -272,13 +272,13 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
if (ExtraType.HasValue)
|
||||
{
|
||||
var key = this.GetProviderId(MetadataProviders.Tmdb);
|
||||
var key = this.GetProviderId(MetadataProvider.Tmdb);
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
list.Insert(0, GetUserDataKey(key));
|
||||
}
|
||||
|
||||
key = this.GetProviderId(MetadataProviders.Imdb);
|
||||
key = this.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
list.Insert(0, GetUserDataKey(key));
|
||||
|
@ -286,13 +286,13 @@ namespace MediaBrowser.Controller.Entities
|
|||
}
|
||||
else
|
||||
{
|
||||
var key = this.GetProviderId(MetadataProviders.Imdb);
|
||||
var key = this.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
list.Insert(0, key);
|
||||
}
|
||||
|
||||
key = this.GetProviderId(MetadataProviders.Tmdb);
|
||||
key = this.GetProviderId(MetadataProvider.Tmdb);
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
list.Insert(0, key);
|
||||
|
|
|
@ -26,13 +26,13 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
|
||||
if (!IsSeries)
|
||||
{
|
||||
var key = this.GetProviderId(MetadataProviders.Imdb);
|
||||
var key = this.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
list.Insert(0, key);
|
||||
}
|
||||
|
||||
key = this.GetProviderId(MetadataProviders.Tmdb);
|
||||
key = this.GetProviderId(MetadataProvider.Tmdb);
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
{
|
||||
list.Insert(0, key);
|
||||
|
@ -253,7 +253,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
{
|
||||
var list = base.GetRelatedUrls();
|
||||
|
||||
var imdbId = this.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = this.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
if (IsMovie)
|
||||
|
|
|
@ -543,7 +543,7 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
|||
var tmdbCollection = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(tmdbCollection))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.TmdbCollection, tmdbCollection);
|
||||
item.SetProviderId(MetadataProvider.TmdbCollection, tmdbCollection);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -1057,23 +1057,23 @@ namespace MediaBrowser.MediaEncoding.Probing
|
|||
// These support mulitple values, but for now we only store the first.
|
||||
var mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MusicBrainz Album Artist Id"));
|
||||
if (mb == null) mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MUSICBRAINZ_ALBUMARTISTID"));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzAlbumArtist, mb);
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzAlbumArtist, mb);
|
||||
|
||||
mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MusicBrainz Artist Id"));
|
||||
if (mb == null) mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MUSICBRAINZ_ARTISTID"));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzArtist, mb);
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzArtist, mb);
|
||||
|
||||
mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MusicBrainz Album Id"));
|
||||
if (mb == null) mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MUSICBRAINZ_ALBUMID"));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzAlbum, mb);
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzAlbum, mb);
|
||||
|
||||
mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MusicBrainz Release Group Id"));
|
||||
if (mb == null) mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MUSICBRAINZ_RELEASEGROUPID"));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzReleaseGroup, mb);
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzReleaseGroup, mb);
|
||||
|
||||
mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MusicBrainz Release Track Id"));
|
||||
if (mb == null) mb = GetMultipleMusicBrainzId(FFProbeHelpers.GetDictionaryValue(tags, "MUSICBRAINZ_RELEASETRACKID"));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzTrack, mb);
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzTrack, mb);
|
||||
}
|
||||
|
||||
private string GetMultipleMusicBrainzId(string value)
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace MediaBrowser.Model.Entities
|
|||
/// <summary>
|
||||
/// Enum MetadataProviders
|
||||
/// </summary>
|
||||
public enum MetadataProviders
|
||||
public enum MetadataProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// The imdb
|
|
@ -14,7 +14,7 @@ namespace MediaBrowser.Model.Entities
|
|||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <returns><c>true</c> if [has provider identifier] [the specified instance]; otherwise, <c>false</c>.</returns>
|
||||
public static bool HasProviderId(this IHasProviderIds instance, MetadataProviders provider)
|
||||
public static bool HasProviderId(this IHasProviderIds instance, MetadataProvider provider)
|
||||
{
|
||||
return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString()));
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace MediaBrowser.Model.Entities
|
|||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string? GetProviderId(this IHasProviderIds instance, MetadataProviders provider)
|
||||
public static string? GetProviderId(this IHasProviderIds instance, MetadataProvider provider)
|
||||
{
|
||||
return instance.GetProviderId(provider.ToString());
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ namespace MediaBrowser.Model.Entities
|
|||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
public static void SetProviderId(this IHasProviderIds instance, MetadataProviders provider, string value)
|
||||
public static void SetProviderId(this IHasProviderIds instance, MetadataProvider provider, string value)
|
||||
{
|
||||
instance.SetProviderId(provider.ToString(), value);
|
||||
}
|
||||
|
|
|
@ -158,11 +158,11 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
audio.SetStudios(data.Studios);
|
||||
}
|
||||
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzAlbumArtist, data.GetProviderId(MetadataProviders.MusicBrainzAlbumArtist));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzArtist, data.GetProviderId(MetadataProviders.MusicBrainzArtist));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzAlbum, data.GetProviderId(MetadataProviders.MusicBrainzAlbum));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzReleaseGroup, data.GetProviderId(MetadataProviders.MusicBrainzReleaseGroup));
|
||||
audio.SetProviderId(MetadataProviders.MusicBrainzTrack, data.GetProviderId(MetadataProviders.MusicBrainzTrack));
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzAlbumArtist, data.GetProviderId(MetadataProvider.MusicBrainzAlbumArtist));
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzArtist, data.GetProviderId(MetadataProvider.MusicBrainzArtist));
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzAlbum, data.GetProviderId(MetadataProvider.MusicBrainzAlbum));
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzReleaseGroup, data.GetProviderId(MetadataProvider.MusicBrainzReleaseGroup));
|
||||
audio.SetProviderId(MetadataProvider.MusicBrainzTrack, data.GetProviderId(MetadataProvider.MusicBrainzTrack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
public string Name => "IMDb";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Imdb.ToString();
|
||||
public string Key => MetadataProvider.Imdb.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => "https://www.imdb.com/title/{0}";
|
||||
|
@ -37,7 +37,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
public string Name => "IMDb";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Imdb.ToString();
|
||||
public string Key => MetadataProvider.Imdb.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => "https://www.imdb.com/name/{0}";
|
||||
|
|
|
@ -21,11 +21,11 @@ namespace MediaBrowser.Providers.Music
|
|||
|
||||
public static string GetReleaseGroupId(this AlbumInfo info)
|
||||
{
|
||||
var id = info.GetProviderId(MetadataProviders.MusicBrainzReleaseGroup);
|
||||
var id = info.GetProviderId(MetadataProvider.MusicBrainzReleaseGroup);
|
||||
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
return info.SongInfos.Select(i => i.GetProviderId(MetadataProviders.MusicBrainzReleaseGroup))
|
||||
return info.SongInfos.Select(i => i.GetProviderId(MetadataProvider.MusicBrainzReleaseGroup))
|
||||
.FirstOrDefault(i => !string.IsNullOrEmpty(i));
|
||||
}
|
||||
|
||||
|
@ -34,11 +34,11 @@ namespace MediaBrowser.Providers.Music
|
|||
|
||||
public static string GetReleaseId(this AlbumInfo info)
|
||||
{
|
||||
var id = info.GetProviderId(MetadataProviders.MusicBrainzAlbum);
|
||||
var id = info.GetProviderId(MetadataProvider.MusicBrainzAlbum);
|
||||
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
return info.SongInfos.Select(i => i.GetProviderId(MetadataProviders.MusicBrainzAlbum))
|
||||
return info.SongInfos.Select(i => i.GetProviderId(MetadataProvider.MusicBrainzAlbum))
|
||||
.FirstOrDefault(i => !string.IsNullOrEmpty(i));
|
||||
}
|
||||
|
||||
|
@ -47,16 +47,16 @@ namespace MediaBrowser.Providers.Music
|
|||
|
||||
public static string GetMusicBrainzArtistId(this AlbumInfo info)
|
||||
{
|
||||
info.ProviderIds.TryGetValue(MetadataProviders.MusicBrainzAlbumArtist.ToString(), out string id);
|
||||
info.ProviderIds.TryGetValue(MetadataProvider.MusicBrainzAlbumArtist.ToString(), out string id);
|
||||
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
info.ArtistProviderIds.TryGetValue(MetadataProviders.MusicBrainzArtist.ToString(), out id);
|
||||
info.ArtistProviderIds.TryGetValue(MetadataProvider.MusicBrainzArtist.ToString(), out id);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
return info.SongInfos.Select(i => i.GetProviderId(MetadataProviders.MusicBrainzAlbumArtist))
|
||||
return info.SongInfos.Select(i => i.GetProviderId(MetadataProvider.MusicBrainzAlbumArtist))
|
||||
.FirstOrDefault(i => !string.IsNullOrEmpty(i));
|
||||
}
|
||||
|
||||
|
@ -65,11 +65,11 @@ namespace MediaBrowser.Providers.Music
|
|||
|
||||
public static string GetMusicBrainzArtistId(this ArtistInfo info)
|
||||
{
|
||||
info.ProviderIds.TryGetValue(MetadataProviders.MusicBrainzArtist.ToString(), out var id);
|
||||
info.ProviderIds.TryGetValue(MetadataProvider.MusicBrainzArtist.ToString(), out var id);
|
||||
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
return info.SongInfos.Select(i => i.GetProviderId(MetadataProviders.MusicBrainzAlbumArtist))
|
||||
return info.SongInfos.Select(i => i.GetProviderId(MetadataProvider.MusicBrainzAlbumArtist))
|
||||
.FirstOrDefault(i => !string.IsNullOrEmpty(i));
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
/// <inheritdoc />
|
||||
public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
|
||||
{
|
||||
var id = item.GetProviderId(MetadataProviders.MusicBrainzReleaseGroup);
|
||||
var id = item.GetProviderId(MetadataProvider.MusicBrainzReleaseGroup);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
|
|
|
@ -104,11 +104,11 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
item.Genres = new[] { result.strGenre };
|
||||
}
|
||||
|
||||
item.SetProviderId(MetadataProviders.AudioDbArtist, result.idArtist);
|
||||
item.SetProviderId(MetadataProviders.AudioDbAlbum, result.idAlbum);
|
||||
item.SetProviderId(MetadataProvider.AudioDbArtist, result.idArtist);
|
||||
item.SetProviderId(MetadataProvider.AudioDbAlbum, result.idAlbum);
|
||||
|
||||
item.SetProviderId(MetadataProviders.MusicBrainzAlbumArtist, result.strMusicBrainzArtistID);
|
||||
item.SetProviderId(MetadataProviders.MusicBrainzReleaseGroup, result.strMusicBrainzID);
|
||||
item.SetProviderId(MetadataProvider.MusicBrainzAlbumArtist, result.strMusicBrainzArtistID);
|
||||
item.SetProviderId(MetadataProvider.MusicBrainzReleaseGroup, result.strMusicBrainzID);
|
||||
|
||||
string overview = null;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
/// <inheritdoc />
|
||||
public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
|
||||
{
|
||||
var id = item.GetProviderId(MetadataProviders.MusicBrainzArtist);
|
||||
var id = item.GetProviderId(MetadataProvider.MusicBrainzArtist);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
|
|
|
@ -92,8 +92,8 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
item.Genres = new[] { result.strGenre };
|
||||
}
|
||||
|
||||
item.SetProviderId(MetadataProviders.AudioDbArtist, result.idArtist);
|
||||
item.SetProviderId(MetadataProviders.MusicBrainzArtist, result.strMusicBrainzID);
|
||||
item.SetProviderId(MetadataProvider.AudioDbArtist, result.idArtist);
|
||||
item.SetProviderId(MetadataProvider.MusicBrainzArtist, result.strMusicBrainzID);
|
||||
|
||||
string overview = null;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
public string Name => "TheAudioDb";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.AudioDbAlbum.ToString();
|
||||
public string Key => MetadataProvider.AudioDbAlbum.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
|
||||
|
@ -25,7 +25,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
public string Name => "TheAudioDb Album";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.AudioDbAlbum.ToString();
|
||||
public string Key => MetadataProvider.AudioDbAlbum.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
|
||||
|
@ -40,7 +40,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
public string Name => "TheAudioDb";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.AudioDbArtist.ToString();
|
||||
public string Key => MetadataProvider.AudioDbArtist.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
|
||||
|
@ -55,7 +55,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
|
|||
public string Name => "TheAudioDb Artist";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.AudioDbArtist.ToString();
|
||||
public string Key => MetadataProvider.AudioDbArtist.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
|
||||
|
|
|
@ -163,17 +163,17 @@ namespace MediaBrowser.Providers.Music
|
|||
Name = i.Artists[0].Item1
|
||||
};
|
||||
|
||||
result.AlbumArtist.SetProviderId(MetadataProviders.MusicBrainzArtist, i.Artists[0].Item2);
|
||||
result.AlbumArtist.SetProviderId(MetadataProvider.MusicBrainzArtist, i.Artists[0].Item2);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(i.ReleaseId))
|
||||
{
|
||||
result.SetProviderId(MetadataProviders.MusicBrainzAlbum, i.ReleaseId);
|
||||
result.SetProviderId(MetadataProvider.MusicBrainzAlbum, i.ReleaseId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(i.ReleaseGroupId))
|
||||
{
|
||||
result.SetProviderId(MetadataProviders.MusicBrainzReleaseGroup, i.ReleaseGroupId);
|
||||
result.SetProviderId(MetadataProvider.MusicBrainzReleaseGroup, i.ReleaseGroupId);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -247,12 +247,12 @@ namespace MediaBrowser.Providers.Music
|
|||
{
|
||||
if (!string.IsNullOrEmpty(releaseId))
|
||||
{
|
||||
result.Item.SetProviderId(MetadataProviders.MusicBrainzAlbum, releaseId);
|
||||
result.Item.SetProviderId(MetadataProvider.MusicBrainzAlbum, releaseId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(releaseGroupId))
|
||||
{
|
||||
result.Item.SetProviderId(MetadataProviders.MusicBrainzReleaseGroup, releaseGroupId);
|
||||
result.Item.SetProviderId(MetadataProvider.MusicBrainzReleaseGroup, releaseGroupId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ namespace MediaBrowser.Providers.Music
|
|||
}
|
||||
}
|
||||
|
||||
result.SetProviderId(MetadataProviders.MusicBrainzArtist, artistId);
|
||||
result.SetProviderId(MetadataProvider.MusicBrainzArtist, artistId);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(artistId) || string.IsNullOrWhiteSpace(result.Name))
|
||||
{
|
||||
|
@ -249,7 +249,7 @@ namespace MediaBrowser.Providers.Music
|
|||
|
||||
if (singleResult != null)
|
||||
{
|
||||
musicBrainzId = singleResult.GetProviderId(MetadataProviders.MusicBrainzArtist);
|
||||
musicBrainzId = singleResult.GetProviderId(MetadataProvider.MusicBrainzArtist);
|
||||
result.Item.Overview = singleResult.Overview;
|
||||
|
||||
if (Plugin.Instance.Configuration.ReplaceArtistName)
|
||||
|
@ -262,7 +262,7 @@ namespace MediaBrowser.Providers.Music
|
|||
if (!string.IsNullOrWhiteSpace(musicBrainzId))
|
||||
{
|
||||
result.HasMetadata = true;
|
||||
result.Item.SetProviderId(MetadataProviders.MusicBrainzArtist, musicBrainzId);
|
||||
result.Item.SetProviderId(MetadataProvider.MusicBrainzArtist, musicBrainzId);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace MediaBrowser.Providers.Music
|
|||
public string Name => "MusicBrainz Release Group";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.MusicBrainzReleaseGroup.ToString();
|
||||
public string Key => MetadataProvider.MusicBrainzReleaseGroup.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release-group/{0}";
|
||||
|
@ -26,7 +26,7 @@ namespace MediaBrowser.Providers.Music
|
|||
public string Name => "MusicBrainz Album Artist";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.MusicBrainzAlbumArtist.ToString();
|
||||
public string Key => MetadataProvider.MusicBrainzAlbumArtist.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
|
||||
|
@ -41,7 +41,7 @@ namespace MediaBrowser.Providers.Music
|
|||
public string Name => "MusicBrainz Album";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.MusicBrainzAlbum.ToString();
|
||||
public string Key => MetadataProvider.MusicBrainzAlbum.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release/{0}";
|
||||
|
@ -56,7 +56,7 @@ namespace MediaBrowser.Providers.Music
|
|||
public string Name => "MusicBrainz";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.MusicBrainzArtist.ToString();
|
||||
public string Key => MetadataProvider.MusicBrainzArtist.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
|
||||
|
@ -72,7 +72,7 @@ namespace MediaBrowser.Providers.Music
|
|||
|
||||
/// <inheritdoc />
|
||||
|
||||
public string Key => MetadataProviders.MusicBrainzArtist.ToString();
|
||||
public string Key => MetadataProvider.MusicBrainzArtist.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
|
||||
|
@ -87,7 +87,7 @@ namespace MediaBrowser.Providers.Music
|
|||
public string Name => "MusicBrainz Track";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.MusicBrainzTrack.ToString();
|
||||
public string Key => MetadataProvider.MusicBrainzTrack.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/track/{0}";
|
||||
|
|
|
@ -63,12 +63,12 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
return result;
|
||||
}
|
||||
|
||||
if (info.SeriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out string seriesImdbId) && !string.IsNullOrEmpty(seriesImdbId))
|
||||
if (info.SeriesProviderIds.TryGetValue(MetadataProvider.Imdb.ToString(), out string seriesImdbId) && !string.IsNullOrEmpty(seriesImdbId))
|
||||
{
|
||||
if (info.IndexNumber.HasValue && info.ParentIndexNumber.HasValue)
|
||||
{
|
||||
result.HasMetadata = await new OmdbProvider(_jsonSerializer, _httpClient, _fileSystem, _appHost, _configurationManager)
|
||||
.FetchEpisodeData(result, info.IndexNumber.Value, info.ParentIndexNumber.Value, info.GetProviderId(MetadataProviders.Imdb), seriesImdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
||||
.FetchEpisodeData(result, info.IndexNumber.Value, info.ParentIndexNumber.Value, info.GetProviderId(MetadataProvider.Imdb), seriesImdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
|
||||
public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
|
||||
{
|
||||
var imdbId = item.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = item.GetProviderId(MetadataProvider.Imdb);
|
||||
|
||||
var list = new List<RemoteImageInfo>();
|
||||
|
||||
|
|
|
@ -68,12 +68,12 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
{
|
||||
var episodeSearchInfo = searchInfo as EpisodeInfo;
|
||||
|
||||
var imdbId = searchInfo.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = searchInfo.GetProviderId(MetadataProvider.Imdb);
|
||||
|
||||
var urlQuery = "plot=full&r=json";
|
||||
if (type == "episode" && episodeSearchInfo != null)
|
||||
{
|
||||
episodeSearchInfo.SeriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out imdbId);
|
||||
episodeSearchInfo.SeriesProviderIds.TryGetValue(MetadataProvider.Imdb.ToString(), out imdbId);
|
||||
}
|
||||
|
||||
var name = searchInfo.Name;
|
||||
|
@ -165,7 +165,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
item.IndexNumberEnd = episodeSearchInfo.IndexNumberEnd.Value;
|
||||
}
|
||||
|
||||
item.SetProviderId(MetadataProviders.Imdb, result.imdbID);
|
||||
item.SetProviderId(MetadataProvider.Imdb, result.imdbID);
|
||||
|
||||
if (result.Year.Length > 0
|
||||
&& int.TryParse(result.Year.Substring(0, Math.Min(result.Year.Length, 4)), NumberStyles.Integer, CultureInfo.InvariantCulture, out var parsedYear))
|
||||
|
@ -210,7 +210,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
QueriedById = true
|
||||
};
|
||||
|
||||
var imdbId = info.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = info.GetProviderId(MetadataProvider.Imdb);
|
||||
if (string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
imdbId = await GetSeriesImdbId(info, cancellationToken).ConfigureAwait(false);
|
||||
|
@ -219,7 +219,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
|
||||
if (!string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
result.Item.SetProviderId(MetadataProviders.Imdb, imdbId);
|
||||
result.Item.SetProviderId(MetadataProvider.Imdb, imdbId);
|
||||
result.HasMetadata = true;
|
||||
|
||||
await new OmdbProvider(_jsonSerializer, _httpClient, _fileSystem, _appHost, _configurationManager).Fetch(result, imdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
||||
|
@ -242,7 +242,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
QueriedById = true
|
||||
};
|
||||
|
||||
var imdbId = info.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = info.GetProviderId(MetadataProvider.Imdb);
|
||||
if (string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
imdbId = await GetMovieImdbId(info, cancellationToken).ConfigureAwait(false);
|
||||
|
@ -251,7 +251,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
|
||||
if (!string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
result.Item.SetProviderId(MetadataProviders.Imdb, imdbId);
|
||||
result.Item.SetProviderId(MetadataProvider.Imdb, imdbId);
|
||||
result.HasMetadata = true;
|
||||
|
||||
await new OmdbProvider(_jsonSerializer, _httpClient, _fileSystem, _appHost, _configurationManager).Fetch(result, imdbId, info.MetadataLanguage, info.MetadataCountryCode, cancellationToken).ConfigureAwait(false);
|
||||
|
@ -264,14 +264,14 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
{
|
||||
var results = await GetSearchResultsInternal(info, "movie", false, cancellationToken).ConfigureAwait(false);
|
||||
var first = results.FirstOrDefault();
|
||||
return first == null ? null : first.GetProviderId(MetadataProviders.Imdb);
|
||||
return first == null ? null : first.GetProviderId(MetadataProvider.Imdb);
|
||||
}
|
||||
|
||||
private async Task<string> GetSeriesImdbId(SeriesInfo info, CancellationToken cancellationToken)
|
||||
{
|
||||
var results = await GetSearchResultsInternal(info, "series", false, cancellationToken).ConfigureAwait(false);
|
||||
var first = results.FirstOrDefault();
|
||||
return first == null ? null : first.GetProviderId(MetadataProviders.Imdb);
|
||||
return first == null ? null : first.GetProviderId(MetadataProvider.Imdb);
|
||||
}
|
||||
|
||||
public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken)
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
|
||||
if (!string.IsNullOrWhiteSpace(result.imdbID))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, result.imdbID);
|
||||
item.SetProviderId(MetadataProvider.Imdb, result.imdbID);
|
||||
}
|
||||
|
||||
ParseAdditionalMetadata(itemResult, result);
|
||||
|
@ -195,7 +195,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
|
||||
if (!string.IsNullOrWhiteSpace(result.imdbID))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, result.imdbID);
|
||||
item.SetProviderId(MetadataProvider.Imdb, result.imdbID);
|
||||
}
|
||||
|
||||
ParseAdditionalMetadata(itemResult, result);
|
||||
|
@ -243,7 +243,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
|
|||
|
||||
internal static bool IsValidSeries(Dictionary<string, string> seriesProviderIds)
|
||||
{
|
||||
if (seriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out string id) && !string.IsNullOrEmpty(id))
|
||||
if (seriesProviderIds.TryGetValue(MetadataProvider.Imdb.ToString(), out string id) && !string.IsNullOrEmpty(id))
|
||||
{
|
||||
// This check should ideally never be necessary but we're seeing some cases of this and haven't tracked them down yet.
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
|
|
|
@ -173,7 +173,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
string language,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
searchInfo.SeriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(),
|
||||
searchInfo.SeriesProviderIds.TryGetValue(MetadataProvider.Tvdb.ToString(),
|
||||
out var seriesTvdbId);
|
||||
|
||||
var episodeQuery = new EpisodeQuery();
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
"Episode {SeasonNumber}x{EpisodeNumber} not found for series {SeriesTvdbId}",
|
||||
episodeInfo.ParentIndexNumber,
|
||||
episodeInfo.IndexNumber,
|
||||
series.GetProviderId(MetadataProviders.Tvdb));
|
||||
series.GetProviderId(MetadataProvider.Tvdb));
|
||||
return imageResult;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
}
|
||||
catch (TvDbServerException e)
|
||||
{
|
||||
_logger.LogError(e, "Failed to retrieve episode images for series {TvDbId}", series.GetProviderId(MetadataProviders.Tvdb));
|
||||
_logger.LogError(e, "Failed to retrieve episode images for series {TvDbId}", series.GetProviderId(MetadataProvider.Tvdb));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
QueriedById = true
|
||||
};
|
||||
|
||||
string seriesTvdbId = searchInfo.GetProviderId(MetadataProviders.Tvdb);
|
||||
string seriesTvdbId = searchInfo.GetProviderId(MetadataProvider.Tvdb);
|
||||
string episodeTvdbId = null;
|
||||
try
|
||||
{
|
||||
|
@ -143,8 +143,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
result.ResetPeople();
|
||||
|
||||
var item = result.Item;
|
||||
item.SetProviderId(MetadataProviders.Tvdb, episode.Id.ToString());
|
||||
item.SetProviderId(MetadataProviders.Imdb, episode.ImdbId);
|
||||
item.SetProviderId(MetadataProvider.Tvdb, episode.Id.ToString());
|
||||
item.SetProviderId(MetadataProvider.Imdb, episode.ImdbId);
|
||||
|
||||
if (string.Equals(id.SeriesDisplayOrder, "dvd", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
|
||||
private async Task<RemoteImageInfo> GetImageFromSeriesData(Series series, string personName, CancellationToken cancellationToken)
|
||||
{
|
||||
var tvdbId = Convert.ToInt32(series.GetProviderId(MetadataProviders.Tvdb));
|
||||
var tvdbId = Convert.ToInt32(series.GetProviderId(MetadataProvider.Tvdb));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
return Array.Empty<RemoteImageInfo>();
|
||||
}
|
||||
|
||||
var tvdbId = Convert.ToInt32(series.GetProviderId(MetadataProviders.Tvdb));
|
||||
var tvdbId = Convert.ToInt32(series.GetProviderId(MetadataProvider.Tvdb));
|
||||
var seasonNumber = season.IndexNumber.Value;
|
||||
var language = item.GetPreferredMetadataLanguage();
|
||||
var remoteImages = new List<RemoteImageInfo>();
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
var language = item.GetPreferredMetadataLanguage();
|
||||
var remoteImages = new List<RemoteImageInfo>();
|
||||
var keyTypes = new[] { KeyType.Poster, KeyType.Series, KeyType.Fanart };
|
||||
var tvdbId = Convert.ToInt32(item.GetProviderId(MetadataProviders.Tvdb));
|
||||
var tvdbId = Convert.ToInt32(item.GetProviderId(MetadataProvider.Tvdb));
|
||||
foreach (KeyType keyType in keyTypes)
|
||||
{
|
||||
var imageQuery = new ImagesQuery
|
||||
|
|
|
@ -95,22 +95,22 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
{
|
||||
var series = result.Item;
|
||||
|
||||
if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out var tvdbId) && !string.IsNullOrEmpty(tvdbId))
|
||||
if (seriesProviderIds.TryGetValue(MetadataProvider.Tvdb.ToString(), out var tvdbId) && !string.IsNullOrEmpty(tvdbId))
|
||||
{
|
||||
series.SetProviderId(MetadataProviders.Tvdb, tvdbId);
|
||||
series.SetProviderId(MetadataProvider.Tvdb, tvdbId);
|
||||
}
|
||||
|
||||
if (seriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out var imdbId) && !string.IsNullOrEmpty(imdbId))
|
||||
if (seriesProviderIds.TryGetValue(MetadataProvider.Imdb.ToString(), out var imdbId) && !string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
series.SetProviderId(MetadataProviders.Imdb, imdbId);
|
||||
tvdbId = await GetSeriesByRemoteId(imdbId, MetadataProviders.Imdb.ToString(), metadataLanguage,
|
||||
series.SetProviderId(MetadataProvider.Imdb, imdbId);
|
||||
tvdbId = await GetSeriesByRemoteId(imdbId, MetadataProvider.Imdb.ToString(), metadataLanguage,
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
if (seriesProviderIds.TryGetValue(MetadataProviders.Zap2It.ToString(), out var zap2It) && !string.IsNullOrEmpty(zap2It))
|
||||
if (seriesProviderIds.TryGetValue(MetadataProvider.Zap2It.ToString(), out var zap2It) && !string.IsNullOrEmpty(zap2It))
|
||||
{
|
||||
series.SetProviderId(MetadataProviders.Zap2It, zap2It);
|
||||
tvdbId = await GetSeriesByRemoteId(zap2It, MetadataProviders.Zap2It.ToString(), metadataLanguage,
|
||||
series.SetProviderId(MetadataProvider.Zap2It, zap2It);
|
||||
tvdbId = await GetSeriesByRemoteId(zap2It, MetadataProvider.Zap2It.ToString(), metadataLanguage,
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
|
||||
try
|
||||
{
|
||||
if (string.Equals(idType, MetadataProviders.Zap2It.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||
if (string.Equals(idType, MetadataProvider.Zap2It.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
result = await _tvdbClientManager.GetSeriesByZap2ItIdAsync(id, language, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
|
@ -176,9 +176,9 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
/// <returns>True, if the dictionary contains a valid TV provider ID, otherwise false.</returns>
|
||||
internal static bool IsValidSeries(Dictionary<string, string> seriesProviderIds)
|
||||
{
|
||||
return seriesProviderIds.ContainsKey(MetadataProviders.Tvdb.ToString()) ||
|
||||
seriesProviderIds.ContainsKey(MetadataProviders.Imdb.ToString()) ||
|
||||
seriesProviderIds.ContainsKey(MetadataProviders.Zap2It.ToString());
|
||||
return seriesProviderIds.ContainsKey(MetadataProvider.Tvdb.ToString()) ||
|
||||
seriesProviderIds.ContainsKey(MetadataProvider.Imdb.ToString()) ||
|
||||
seriesProviderIds.ContainsKey(MetadataProvider.Zap2It.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -255,15 +255,15 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
var seriesSesult =
|
||||
await _tvdbClientManager.GetSeriesByIdAsync(seriesSearchResult.Id, language, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
remoteSearchResult.SetProviderId(MetadataProviders.Imdb, seriesSesult.Data.ImdbId);
|
||||
remoteSearchResult.SetProviderId(MetadataProviders.Zap2It, seriesSesult.Data.Zap2itId);
|
||||
remoteSearchResult.SetProviderId(MetadataProvider.Imdb, seriesSesult.Data.ImdbId);
|
||||
remoteSearchResult.SetProviderId(MetadataProvider.Zap2It, seriesSesult.Data.Zap2itId);
|
||||
}
|
||||
catch (TvDbServerException e)
|
||||
{
|
||||
_logger.LogError(e, "Unable to retrieve series with id {TvdbId}", seriesSearchResult.Id);
|
||||
}
|
||||
|
||||
remoteSearchResult.SetProviderId(MetadataProviders.Tvdb, seriesSearchResult.Id.ToString());
|
||||
remoteSearchResult.SetProviderId(MetadataProvider.Tvdb, seriesSearchResult.Id.ToString());
|
||||
list.Add(new Tuple<List<string>, RemoteSearchResult>(tvdbTitles, remoteSearchResult));
|
||||
}
|
||||
|
||||
|
@ -325,15 +325,15 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
private void MapSeriesToResult(MetadataResult<Series> result, TvDbSharper.Dto.Series tvdbSeries, string metadataLanguage)
|
||||
{
|
||||
Series series = result.Item;
|
||||
series.SetProviderId(MetadataProviders.Tvdb, tvdbSeries.Id.ToString());
|
||||
series.SetProviderId(MetadataProvider.Tvdb, tvdbSeries.Id.ToString());
|
||||
series.Name = tvdbSeries.SeriesName;
|
||||
series.Overview = (tvdbSeries.Overview ?? string.Empty).Trim();
|
||||
result.ResultLanguage = metadataLanguage;
|
||||
series.AirDays = TVUtils.GetAirDays(tvdbSeries.AirsDayOfWeek);
|
||||
series.AirTime = tvdbSeries.AirsTime;
|
||||
series.CommunityRating = (float?)tvdbSeries.SiteRating;
|
||||
series.SetProviderId(MetadataProviders.Imdb, tvdbSeries.ImdbId);
|
||||
series.SetProviderId(MetadataProviders.Zap2It, tvdbSeries.Zap2itId);
|
||||
series.SetProviderId(MetadataProvider.Imdb, tvdbSeries.ImdbId);
|
||||
series.SetProviderId(MetadataProvider.Zap2It, tvdbSeries.Zap2itId);
|
||||
if (Enum.TryParse(tvdbSeries.Status, true, out SeriesStatus seriesStatus))
|
||||
{
|
||||
series.Status = seriesStatus;
|
||||
|
@ -411,7 +411,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
|
||||
public async Task Identify(SeriesInfo info)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(info.GetProviderId(MetadataProviders.Tvdb)))
|
||||
if (!string.IsNullOrWhiteSpace(info.GetProviderId(MetadataProvider.Tvdb)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -423,8 +423,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
|
|||
|
||||
if (entry != null)
|
||||
{
|
||||
var id = entry.GetProviderId(MetadataProviders.Tvdb);
|
||||
info.SetProviderId(MetadataProviders.Tvdb, id);
|
||||
var id = entry.GetProviderId(MetadataProvider.Tvdb);
|
||||
info.SetProviderId(MetadataProvider.Tvdb, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
|
|||
public string Name => TmdbUtils.ProviderName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.TmdbCollection.ToString();
|
||||
public string Key => MetadataProvider.TmdbCollection.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "collection/{0}";
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
|
|||
|
||||
public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = item.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = item.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
|
|||
|
||||
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(BoxSetInfo searchInfo, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = searchInfo.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = searchInfo.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
|
|||
ImageUrl = images.Count == 0 ? null : (tmdbImageUrl + images[0].File_Path)
|
||||
};
|
||||
|
||||
result.SetProviderId(MetadataProviders.Tmdb, info.Id.ToString(_usCulture));
|
||||
result.SetProviderId(MetadataProvider.Tmdb, info.Id.ToString(_usCulture));
|
||||
|
||||
return new[] { result };
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
|
|||
|
||||
public async Task<MetadataResult<BoxSet>> GetMetadata(BoxSetInfo id, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = id.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = id.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
// We don't already have an Id, need to fetch it
|
||||
if (string.IsNullOrEmpty(tmdbId))
|
||||
|
@ -103,7 +103,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
|
|||
|
||||
if (searchResult != null)
|
||||
{
|
||||
tmdbId = searchResult.GetProviderId(MetadataProviders.Tmdb);
|
||||
tmdbId = searchResult.GetProviderId(MetadataProvider.Tmdb);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
|
|||
Overview = obj.Overview
|
||||
};
|
||||
|
||||
item.SetProviderId(MetadataProviders.Tmdb, obj.Id.ToString(_usCulture));
|
||||
item.SetProviderId(MetadataProvider.Tmdb, obj.Id.ToString(_usCulture));
|
||||
|
||||
return item;
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
|
||||
public async Task<MetadataResult<T>> GetMetadata(ItemLookupInfo itemId, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = itemId.GetProviderId(MetadataProviders.Tmdb);
|
||||
var imdbId = itemId.GetProviderId(MetadataProviders.Imdb);
|
||||
var tmdbId = itemId.GetProviderId(MetadataProvider.Tmdb);
|
||||
var imdbId = itemId.GetProviderId(MetadataProvider.Imdb);
|
||||
|
||||
// Don't search for music video id's because it is very easy to misidentify.
|
||||
if (string.IsNullOrEmpty(tmdbId) && string.IsNullOrEmpty(imdbId) && typeof(T) != typeof(MusicVideo))
|
||||
|
@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
|
||||
if (searchResult != null)
|
||||
{
|
||||
tmdbId = searchResult.GetProviderId(MetadataProviders.Tmdb);
|
||||
tmdbId = searchResult.GetProviderId(MetadataProvider.Tmdb);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,12 +146,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
.ToArray();
|
||||
}
|
||||
|
||||
movie.SetProviderId(MetadataProviders.Tmdb, movieData.Id.ToString(_usCulture));
|
||||
movie.SetProviderId(MetadataProviders.Imdb, movieData.Imdb_Id);
|
||||
movie.SetProviderId(MetadataProvider.Tmdb, movieData.Id.ToString(_usCulture));
|
||||
movie.SetProviderId(MetadataProvider.Imdb, movieData.Imdb_Id);
|
||||
|
||||
if (movieData.Belongs_To_Collection != null)
|
||||
{
|
||||
movie.SetProviderId(MetadataProviders.TmdbCollection,
|
||||
movie.SetProviderId(MetadataProvider.TmdbCollection,
|
||||
movieData.Belongs_To_Collection.Id.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
if (movie is Movie movieItem)
|
||||
|
@ -240,7 +240,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
|
||||
if (actor.Id > 0)
|
||||
{
|
||||
personInfo.SetProviderId(MetadataProviders.Tmdb, actor.Id.ToString(CultureInfo.InvariantCulture));
|
||||
personInfo.SetProviderId(MetadataProvider.Tmdb, actor.Id.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
resultItem.AddPerson(personInfo);
|
||||
|
@ -282,7 +282,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
|
||||
if (person.Id > 0)
|
||||
{
|
||||
personInfo.SetProviderId(MetadataProviders.Tmdb, person.Id.ToString(CultureInfo.InvariantCulture));
|
||||
personInfo.SetProviderId(MetadataProvider.Tmdb, person.Id.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
resultItem.AddPerson(personInfo);
|
||||
|
|
|
@ -158,11 +158,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
/// <returns>Task{MovieImages}.</returns>
|
||||
private async Task<Images> FetchImages(BaseItem item, string language, IJsonSerializer jsonSerializer, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = item.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = item.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(tmdbId))
|
||||
{
|
||||
var imdbId = item.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = item.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
var movieInfo = await TmdbMovieProvider.Current.FetchMainResult(imdbId, false, language, cancellationToken).ConfigureAwait(false);
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
public string Name => TmdbUtils.ProviderName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
public string Key => MetadataProvider.Tmdb.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "movie/{0}";
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
|
||||
public async Task<IEnumerable<RemoteSearchResult>> GetMovieSearchResults(ItemLookupInfo searchInfo, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = searchInfo.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = searchInfo.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
|
@ -100,11 +100,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
}
|
||||
}
|
||||
|
||||
remoteResult.SetProviderId(MetadataProviders.Tmdb, obj.Id.ToString(_usCulture));
|
||||
remoteResult.SetProviderId(MetadataProvider.Tmdb, obj.Id.ToString(_usCulture));
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(obj.Imdb_Id))
|
||||
{
|
||||
remoteResult.SetProviderId(MetadataProviders.Imdb, obj.Imdb_Id);
|
||||
remoteResult.SetProviderId(MetadataProvider.Imdb, obj.Imdb_Id);
|
||||
}
|
||||
|
||||
return new[] { remoteResult };
|
||||
|
|
|
@ -199,7 +199,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
}
|
||||
}
|
||||
|
||||
remoteResult.SetProviderId(MetadataProviders.Tmdb, i.Id.ToString(_usCulture));
|
||||
remoteResult.SetProviderId(MetadataProvider.Tmdb, i.Id.ToString(_usCulture));
|
||||
|
||||
return remoteResult;
|
||||
|
||||
|
@ -252,7 +252,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||
}
|
||||
}
|
||||
|
||||
remoteResult.SetProviderId(MetadataProviders.Tmdb, i.Id.ToString(_usCulture));
|
||||
remoteResult.SetProviderId(MetadataProvider.Tmdb, i.Id.ToString(_usCulture));
|
||||
|
||||
return remoteResult;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
|
|||
public string Name => TmdbUtils.ProviderName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
public string Key => MetadataProvider.Tmdb.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "person/{0}";
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
|
|||
public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken)
|
||||
{
|
||||
var person = (Person)item;
|
||||
var id = person.GetProviderId(MetadataProviders.Tmdb);
|
||||
var id = person.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
|
|||
|
||||
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(PersonLookupInfo searchInfo, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = searchInfo.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = searchInfo.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
var tmdbSettings = await TmdbMovieProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
|
@ -80,8 +80,8 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
|
|||
ImageUrl = images.Count == 0 ? null : (tmdbImageUrl + images[0].File_Path)
|
||||
};
|
||||
|
||||
result.SetProviderId(MetadataProviders.Tmdb, info.Id.ToString(_usCulture));
|
||||
result.SetProviderId(MetadataProviders.Imdb, info.Imdb_Id);
|
||||
result.SetProviderId(MetadataProvider.Tmdb, info.Id.ToString(_usCulture));
|
||||
result.SetProviderId(MetadataProvider.Imdb, info.Imdb_Id);
|
||||
|
||||
return new[] { result };
|
||||
}
|
||||
|
@ -123,14 +123,14 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
|
|||
ImageUrl = string.IsNullOrEmpty(i.Profile_Path) ? null : baseImageUrl + i.Profile_Path
|
||||
};
|
||||
|
||||
result.SetProviderId(MetadataProviders.Tmdb, i.Id.ToString(_usCulture));
|
||||
result.SetProviderId(MetadataProvider.Tmdb, i.Id.ToString(_usCulture));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<MetadataResult<Person>> GetMetadata(PersonLookupInfo id, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = id.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = id.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
// We don't already have an Id, need to fetch it
|
||||
if (string.IsNullOrEmpty(tmdbId))
|
||||
|
@ -185,11 +185,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
|
|||
item.EndDate = date.ToUniversalTime();
|
||||
}
|
||||
|
||||
item.SetProviderId(MetadataProviders.Tmdb, info.Id.ToString(_usCulture));
|
||||
item.SetProviderId(MetadataProvider.Tmdb, info.Id.ToString(_usCulture));
|
||||
|
||||
if (!string.IsNullOrEmpty(info.Imdb_Id))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, info.Imdb_Id);
|
||||
item.SetProviderId(MetadataProvider.Imdb, info.Imdb_Id);
|
||||
}
|
||||
|
||||
result.HasMetadata = true;
|
||||
|
@ -211,7 +211,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
|
|||
{
|
||||
var results = await GetSearchResults(info, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
return results.Select(i => i.GetProviderId(MetadataProviders.Tmdb)).FirstOrDefault();
|
||||
return results.Select(i => i.GetProviderId(MetadataProvider.Tmdb)).FirstOrDefault();
|
||||
}
|
||||
|
||||
internal async Task EnsurePersonInfo(string id, CancellationToken cancellationToken)
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
var episode = (Controller.Entities.TV.Episode)item;
|
||||
var series = episode.Series;
|
||||
|
||||
var seriesId = series != null ? series.GetProviderId(MetadataProviders.Tmdb) : null;
|
||||
var seriesId = series != null ? series.GetProviderId(MetadataProvider.Tmdb) : null;
|
||||
|
||||
var list = new List<RemoteImageInfo>();
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
return result;
|
||||
}
|
||||
|
||||
info.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out string seriesTmdbId);
|
||||
info.SeriesProviderIds.TryGetValue(MetadataProvider.Tmdb.ToString(), out string seriesTmdbId);
|
||||
|
||||
if (string.IsNullOrEmpty(seriesTmdbId))
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
|
||||
if (response.External_Ids.Tvdb_Id > 0)
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tvdb, response.External_Ids.Tvdb_Id.ToString(CultureInfo.InvariantCulture));
|
||||
item.SetProviderId(MetadataProvider.Tvdb, response.External_Ids.Tvdb_Id.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
item.PremiereDate = response.Air_Date;
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
var season = (Season)item;
|
||||
var series = season.Series;
|
||||
|
||||
var seriesId = series?.GetProviderId(MetadataProviders.Tmdb);
|
||||
var seriesId = series?.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (string.IsNullOrEmpty(seriesId))
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
{
|
||||
var result = new MetadataResult<Season>();
|
||||
|
||||
info.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out string seriesTmdbId);
|
||||
info.SeriesProviderIds.TryGetValue(MetadataProvider.Tmdb.ToString(), out string seriesTmdbId);
|
||||
|
||||
var seasonNumber = info.IndexNumber;
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
|
||||
if (seasonInfo.External_Ids.Tvdb_Id > 0)
|
||||
{
|
||||
result.Item.SetProviderId(MetadataProviders.Tvdb, seasonInfo.External_Ids.Tvdb_Id.ToString(CultureInfo.InvariantCulture));
|
||||
result.Item.SetProviderId(MetadataProvider.Tvdb, seasonInfo.External_Ids.Tvdb_Id.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
var credits = seasonInfo.Credits;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
public string Name => TmdbUtils.ProviderName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
public string Key => MetadataProvider.Tmdb.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "tv/{0}";
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
private async Task<Images> FetchImages(BaseItem item, string language, IJsonSerializer jsonSerializer,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = item.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = item.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
|
||||
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken)
|
||||
{
|
||||
var tmdbId = searchInfo.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = searchInfo.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
|
@ -85,18 +85,18 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
ImageUrl = string.IsNullOrWhiteSpace(obj.Poster_Path) ? null : tmdbImageUrl + obj.Poster_Path
|
||||
};
|
||||
|
||||
remoteResult.SetProviderId(MetadataProviders.Tmdb, obj.Id.ToString(_usCulture));
|
||||
remoteResult.SetProviderId(MetadataProviders.Imdb, obj.External_Ids.Imdb_Id);
|
||||
remoteResult.SetProviderId(MetadataProvider.Tmdb, obj.Id.ToString(_usCulture));
|
||||
remoteResult.SetProviderId(MetadataProvider.Imdb, obj.External_Ids.Imdb_Id);
|
||||
|
||||
if (obj.External_Ids.Tvdb_Id > 0)
|
||||
{
|
||||
remoteResult.SetProviderId(MetadataProviders.Tvdb, obj.External_Ids.Tvdb_Id.ToString(_usCulture));
|
||||
remoteResult.SetProviderId(MetadataProvider.Tvdb, obj.External_Ids.Tvdb_Id.ToString(_usCulture));
|
||||
}
|
||||
|
||||
return new[] { remoteResult };
|
||||
}
|
||||
|
||||
var imdbId = searchInfo.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = searchInfo.GetProviderId(MetadataProvider.Imdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
}
|
||||
}
|
||||
|
||||
var tvdbId = searchInfo.GetProviderId(MetadataProviders.Tvdb);
|
||||
var tvdbId = searchInfo.GetProviderId(MetadataProvider.Tvdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(tvdbId))
|
||||
{
|
||||
|
@ -128,11 +128,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
var result = new MetadataResult<Series>();
|
||||
result.QueriedById = true;
|
||||
|
||||
var tmdbId = info.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdbId = info.GetProviderId(MetadataProvider.Tmdb);
|
||||
|
||||
if (string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
var imdbId = info.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdbId = info.GetProviderId(MetadataProvider.Imdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
|
@ -140,14 +140,14 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
|
||||
if (searchResult != null)
|
||||
{
|
||||
tmdbId = searchResult.GetProviderId(MetadataProviders.Tmdb);
|
||||
tmdbId = searchResult.GetProviderId(MetadataProvider.Tmdb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
var tvdbId = info.GetProviderId(MetadataProviders.Tvdb);
|
||||
var tvdbId = info.GetProviderId(MetadataProvider.Tvdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(tvdbId))
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
|
||||
if (searchResult != null)
|
||||
{
|
||||
tmdbId = searchResult.GetProviderId(MetadataProviders.Tmdb);
|
||||
tmdbId = searchResult.GetProviderId(MetadataProvider.Tmdb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
|
||||
if (searchResult != null)
|
||||
{
|
||||
tmdbId = searchResult.GetProviderId(MetadataProviders.Tmdb);
|
||||
tmdbId = searchResult.GetProviderId(MetadataProvider.Tmdb);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
|
||||
series.Name = seriesInfo.Name;
|
||||
series.OriginalTitle = seriesInfo.Original_Name;
|
||||
series.SetProviderId(MetadataProviders.Tmdb, seriesInfo.Id.ToString(_usCulture));
|
||||
series.SetProviderId(MetadataProvider.Tmdb, seriesInfo.Id.ToString(_usCulture));
|
||||
|
||||
string voteAvg = seriesInfo.Vote_Average.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
|
@ -261,17 +261,17 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
{
|
||||
if (!string.IsNullOrWhiteSpace(ids.Imdb_Id))
|
||||
{
|
||||
series.SetProviderId(MetadataProviders.Imdb, ids.Imdb_Id);
|
||||
series.SetProviderId(MetadataProvider.Imdb, ids.Imdb_Id);
|
||||
}
|
||||
|
||||
if (ids.Tvrage_Id > 0)
|
||||
{
|
||||
series.SetProviderId(MetadataProviders.TvRage, ids.Tvrage_Id.ToString(_usCulture));
|
||||
series.SetProviderId(MetadataProvider.TvRage, ids.Tvrage_Id.ToString(_usCulture));
|
||||
}
|
||||
|
||||
if (ids.Tvdb_Id > 0)
|
||||
{
|
||||
series.SetProviderId(MetadataProviders.Tvdb, ids.Tvdb_Id.ToString(_usCulture));
|
||||
series.SetProviderId(MetadataProvider.Tvdb, ids.Tvdb_Id.ToString(_usCulture));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -331,7 +331,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
|
||||
if (actor.Id > 0)
|
||||
{
|
||||
personInfo.SetProviderId(MetadataProviders.Tmdb, actor.Id.ToString(CultureInfo.InvariantCulture));
|
||||
personInfo.SetProviderId(MetadataProvider.Tmdb, actor.Id.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
seriesResult.AddPerson(personInfo);
|
||||
|
@ -540,7 +540,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
|
|||
ImageUrl = string.IsNullOrWhiteSpace(tv.Poster_Path) ? null : tmdbImageUrl + tv.Poster_Path
|
||||
};
|
||||
|
||||
remoteResult.SetProviderId(MetadataProviders.Tmdb, tv.Id.ToString(_usCulture));
|
||||
remoteResult.SetProviderId(MetadataProvider.Tmdb, tv.Id.ToString(_usCulture));
|
||||
|
||||
return remoteResult;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace MediaBrowser.Providers.TV
|
|||
|
||||
public async Task<bool> Run(Series series, bool addNewItems, CancellationToken cancellationToken)
|
||||
{
|
||||
var tvdbId = series.GetProviderId(MetadataProviders.Tvdb);
|
||||
var tvdbId = series.GetProviderId(MetadataProvider.Tvdb);
|
||||
if (string.IsNullOrEmpty(tvdbId))
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace MediaBrowser.Providers.TV
|
|||
public string Name => "Zap2It";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Zap2It.ToString();
|
||||
public string Key => MetadataProvider.Zap2It.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => "http://tvlistings.zap2it.com/overview.html?programSeriesId={0}";
|
||||
|
@ -26,7 +26,7 @@ namespace MediaBrowser.Providers.TV
|
|||
public string Name => "TheTVDB";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Tvdb.ToString();
|
||||
public string Key => MetadataProvider.Tvdb.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=series&id={0}";
|
||||
|
@ -42,7 +42,7 @@ namespace MediaBrowser.Providers.TV
|
|||
public string Name => "TheTVDB";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Tvdb.ToString();
|
||||
public string Key => MetadataProvider.Tvdb.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => null;
|
||||
|
@ -57,7 +57,7 @@ namespace MediaBrowser.Providers.TV
|
|||
public string Name => "TheTVDB";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => MetadataProviders.Tvdb.ToString();
|
||||
public string Key => MetadataProvider.Tvdb.ToString();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=episode&id={0}";
|
||||
|
|
|
@ -212,7 +212,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
var m = Regex.Match(xml, "tt([0-9]{7,8})", RegexOptions.IgnoreCase);
|
||||
if (m.Success)
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, m.Value);
|
||||
item.SetProviderId(MetadataProvider.Imdb, m.Value);
|
||||
}
|
||||
|
||||
// Support Tmdb
|
||||
|
@ -225,7 +225,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
var tmdbId = xml.Substring(index + srch.Length).TrimEnd('/').Split('-')[0];
|
||||
if (!string.IsNullOrWhiteSpace(tmdbId) && int.TryParse(tmdbId, NumberStyles.Integer, CultureInfo.InvariantCulture, out var value))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tmdb, value.ToString(UsCulture));
|
||||
item.SetProviderId(MetadataProvider.Tmdb, value.ToString(UsCulture));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
var tvdbId = xml.Substring(index + srch.Length).TrimEnd('/');
|
||||
if (!string.IsNullOrWhiteSpace(tvdbId) && int.TryParse(tvdbId, NumberStyles.Integer, CultureInfo.InvariantCulture, out var value))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tvdb, value.ToString(UsCulture));
|
||||
item.SetProviderId(MetadataProvider.Tvdb, value.ToString(UsCulture));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,12 +49,12 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
|
||||
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, imdbId);
|
||||
item.SetProviderId(MetadataProvider.Imdb, imdbId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(tmdbId))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tmdb, tmdbId);
|
||||
item.SetProviderId(MetadataProvider.Tmdb, tmdbId);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -67,7 +67,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
var tmdbcolid = reader.GetAttribute("tmdbcolid");
|
||||
if (!string.IsNullOrWhiteSpace(tmdbcolid) && movie != null)
|
||||
{
|
||||
movie.SetProviderId(MetadataProviders.TmdbCollection, tmdbcolid);
|
||||
movie.SetProviderId(MetadataProvider.TmdbCollection, tmdbcolid);
|
||||
}
|
||||
|
||||
var val = reader.ReadInnerXml();
|
||||
|
|
|
@ -51,17 +51,17 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
|
||||
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, imdbId);
|
||||
item.SetProviderId(MetadataProvider.Imdb, imdbId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(tmdbId))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tmdb, tmdbId);
|
||||
item.SetProviderId(MetadataProvider.Tmdb, tmdbId);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(tvdbId))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Tvdb, tvdbId);
|
||||
item.SetProviderId(MetadataProvider.Tvdb, tvdbId);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -543,15 +543,15 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
writer.WriteElementString("aspectratio", hasAspectRatio.AspectRatio);
|
||||
}
|
||||
|
||||
var tmdbCollection = item.GetProviderId(MetadataProviders.TmdbCollection);
|
||||
var tmdbCollection = item.GetProviderId(MetadataProvider.TmdbCollection);
|
||||
|
||||
if (!string.IsNullOrEmpty(tmdbCollection))
|
||||
{
|
||||
writer.WriteElementString("collectionnumber", tmdbCollection);
|
||||
writtenProviderIds.Add(MetadataProviders.TmdbCollection.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.TmdbCollection.ToString());
|
||||
}
|
||||
|
||||
var imdb = item.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdb = item.GetProviderId(MetadataProvider.Imdb);
|
||||
if (!string.IsNullOrEmpty(imdb))
|
||||
{
|
||||
if (item is Series)
|
||||
|
@ -563,25 +563,25 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
writer.WriteElementString("imdbid", imdb);
|
||||
}
|
||||
|
||||
writtenProviderIds.Add(MetadataProviders.Imdb.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.Imdb.ToString());
|
||||
}
|
||||
|
||||
// Series xml saver already saves this
|
||||
if (!(item is Series))
|
||||
{
|
||||
var tvdb = item.GetProviderId(MetadataProviders.Tvdb);
|
||||
var tvdb = item.GetProviderId(MetadataProvider.Tvdb);
|
||||
if (!string.IsNullOrEmpty(tvdb))
|
||||
{
|
||||
writer.WriteElementString("tvdbid", tvdb);
|
||||
writtenProviderIds.Add(MetadataProviders.Tvdb.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.Tvdb.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
var tmdb = item.GetProviderId(MetadataProviders.Tmdb);
|
||||
var tmdb = item.GetProviderId(MetadataProvider.Tmdb);
|
||||
if (!string.IsNullOrEmpty(tmdb))
|
||||
{
|
||||
writer.WriteElementString("tmdbid", tmdb);
|
||||
writtenProviderIds.Add(MetadataProviders.Tmdb.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.Tmdb.ToString());
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(item.PreferredMetadataLanguage))
|
||||
|
@ -686,67 +686,67 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
}
|
||||
}
|
||||
|
||||
var externalId = item.GetProviderId(MetadataProviders.AudioDbArtist);
|
||||
var externalId = item.GetProviderId(MetadataProvider.AudioDbArtist);
|
||||
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("audiodbartistid", externalId);
|
||||
writtenProviderIds.Add(MetadataProviders.AudioDbArtist.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.AudioDbArtist.ToString());
|
||||
}
|
||||
|
||||
externalId = item.GetProviderId(MetadataProviders.AudioDbAlbum);
|
||||
externalId = item.GetProviderId(MetadataProvider.AudioDbAlbum);
|
||||
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("audiodbalbumid", externalId);
|
||||
writtenProviderIds.Add(MetadataProviders.AudioDbAlbum.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.AudioDbAlbum.ToString());
|
||||
}
|
||||
|
||||
externalId = item.GetProviderId(MetadataProviders.Zap2It);
|
||||
externalId = item.GetProviderId(MetadataProvider.Zap2It);
|
||||
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("zap2itid", externalId);
|
||||
writtenProviderIds.Add(MetadataProviders.Zap2It.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.Zap2It.ToString());
|
||||
}
|
||||
|
||||
externalId = item.GetProviderId(MetadataProviders.MusicBrainzAlbum);
|
||||
externalId = item.GetProviderId(MetadataProvider.MusicBrainzAlbum);
|
||||
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("musicbrainzalbumid", externalId);
|
||||
writtenProviderIds.Add(MetadataProviders.MusicBrainzAlbum.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.MusicBrainzAlbum.ToString());
|
||||
}
|
||||
|
||||
externalId = item.GetProviderId(MetadataProviders.MusicBrainzAlbumArtist);
|
||||
externalId = item.GetProviderId(MetadataProvider.MusicBrainzAlbumArtist);
|
||||
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("musicbrainzalbumartistid", externalId);
|
||||
writtenProviderIds.Add(MetadataProviders.MusicBrainzAlbumArtist.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.MusicBrainzAlbumArtist.ToString());
|
||||
}
|
||||
|
||||
externalId = item.GetProviderId(MetadataProviders.MusicBrainzArtist);
|
||||
externalId = item.GetProviderId(MetadataProvider.MusicBrainzArtist);
|
||||
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("musicbrainzartistid", externalId);
|
||||
writtenProviderIds.Add(MetadataProviders.MusicBrainzArtist.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.MusicBrainzArtist.ToString());
|
||||
}
|
||||
|
||||
externalId = item.GetProviderId(MetadataProviders.MusicBrainzReleaseGroup);
|
||||
externalId = item.GetProviderId(MetadataProvider.MusicBrainzReleaseGroup);
|
||||
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("musicbrainzreleasegroupid", externalId);
|
||||
writtenProviderIds.Add(MetadataProviders.MusicBrainzReleaseGroup.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.MusicBrainzReleaseGroup.ToString());
|
||||
}
|
||||
|
||||
externalId = item.GetProviderId(MetadataProviders.TvRage);
|
||||
externalId = item.GetProviderId(MetadataProvider.TvRage);
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("tvrageid", externalId);
|
||||
writtenProviderIds.Add(MetadataProviders.TvRage.ToString());
|
||||
writtenProviderIds.Add(MetadataProvider.TvRage.ToString());
|
||||
}
|
||||
|
||||
if (item.ProviderIds != null)
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
/// <inheritdoc />
|
||||
protected override void WriteCustomElements(BaseItem item, XmlWriter writer)
|
||||
{
|
||||
var imdb = item.GetProviderId(MetadataProviders.Imdb);
|
||||
var imdb = item.GetProviderId(MetadataProvider.Imdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(imdb))
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
{
|
||||
var series = (Series)item;
|
||||
|
||||
var tvdb = item.GetProviderId(MetadataProviders.Tvdb);
|
||||
var tvdb = item.GetProviderId(MetadataProvider.Tvdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(tvdb))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user