Core server preparation for new "TV Maze Provider Plugin"

This commit is contained in:
softworkz 2016-08-23 03:26:34 +02:00
parent 430b187ef6
commit ac4023ed47
5 changed files with 33 additions and 1 deletions

View File

@ -724,6 +724,15 @@ namespace MediaBrowser.Controller.Providers
} }
break; break;
} }
case "TvMazeId":
{
var id = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(id))
{
item.SetProviderId(MetadataProviders.TvMaze, id);
}
break;
}
case "AudioDbArtistId": case "AudioDbArtistId":
{ {
var id = reader.ReadElementContentAsString(); var id = reader.ReadElementContentAsString();

View File

@ -553,6 +553,13 @@ namespace MediaBrowser.LocalMetadata.Savers
builder.Append("<TVRageId>" + SecurityElement.Escape(externalId) + "</TVRageId>"); builder.Append("<TVRageId>" + SecurityElement.Escape(externalId) + "</TVRageId>");
} }
externalId = item.GetProviderId(MetadataProviders.TvMaze);
if (!string.IsNullOrEmpty(externalId))
{
builder.Append("<TvMazeId>" + SecurityElement.Escape(externalId) + "</TvMazeId>");
}
var hasTagline = item as IHasTaglines; var hasTagline = item as IHasTaglines;
if (hasTagline != null) if (hasTagline != null)
{ {

View File

@ -39,6 +39,7 @@ namespace MediaBrowser.Model.Entities
TvRage = 15, TvRage = 15,
AudioDbArtist = 16, AudioDbArtist = 16,
AudioDbAlbum = 17, AudioDbAlbum = 17,
MusicBrainzTrack = 18 MusicBrainzTrack = 18,
TvMaze = 19
} }
} }

View File

@ -827,6 +827,15 @@ namespace MediaBrowser.XbmcMetadata.Parsers
} }
break; break;
} }
case "tvmazeid":
{
var id = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(id))
{
item.SetProviderId(MetadataProviders.TvMaze, id);
}
break;
}
case "audiodbartistid": case "audiodbartistid":
{ {
var id = reader.ReadElementContentAsString(); var id = reader.ReadElementContentAsString();

View File

@ -822,6 +822,12 @@ namespace MediaBrowser.XbmcMetadata.Savers
writer.WriteElementString("tvrageid", externalId); writer.WriteElementString("tvrageid", externalId);
} }
externalId = item.GetProviderId(MetadataProviders.TvMaze);
if (!string.IsNullOrEmpty(externalId))
{
writer.WriteElementString("tvmazeid", externalId);
}
if (options.SaveImagePathsInNfo) if (options.SaveImagePathsInNfo)
{ {
AddImages(item, writer, libraryManager, config); AddImages(item, writer, libraryManager, config);