mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
Merge pull request #2090 from softworkz/TvMazePrep
Core server preparation for new "TV Maze Provider Plugin"
This commit is contained in:
commit
01960fa2fa
5 changed files with 33 additions and 1 deletions
|
@ -724,6 +724,15 @@ namespace MediaBrowser.Controller.Providers
|
|||
}
|
||||
break;
|
||||
}
|
||||
case "TvMazeId":
|
||||
{
|
||||
var id = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.TvMaze, id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "AudioDbArtistId":
|
||||
{
|
||||
var id = reader.ReadElementContentAsString();
|
||||
|
|
|
@ -553,6 +553,13 @@ namespace MediaBrowser.LocalMetadata.Savers
|
|||
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;
|
||||
if (hasTagline != null)
|
||||
{
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace MediaBrowser.Model.Entities
|
|||
TvRage = 15,
|
||||
AudioDbArtist = 16,
|
||||
AudioDbAlbum = 17,
|
||||
MusicBrainzTrack = 18
|
||||
MusicBrainzTrack = 18,
|
||||
TvMaze = 19
|
||||
}
|
||||
}
|
||||
|
|
|
@ -827,6 +827,15 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
}
|
||||
break;
|
||||
}
|
||||
case "tvmazeid":
|
||||
{
|
||||
var id = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.TvMaze, id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "audiodbartistid":
|
||||
{
|
||||
var id = reader.ReadElementContentAsString();
|
||||
|
|
|
@ -822,6 +822,12 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
writer.WriteElementString("tvrageid", externalId);
|
||||
}
|
||||
|
||||
externalId = item.GetProviderId(MetadataProviders.TvMaze);
|
||||
if (!string.IsNullOrEmpty(externalId))
|
||||
{
|
||||
writer.WriteElementString("tvmazeid", externalId);
|
||||
}
|
||||
|
||||
if (options.SaveImagePathsInNfo)
|
||||
{
|
||||
AddImages(item, writer, libraryManager, config);
|
||||
|
|
Loading…
Reference in a new issue