mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-23 15:30:56 -04:00
record tmdb collection name
This commit is contained in:
parent
065721249a
commit
f23e957381
@ -20,6 +20,12 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||||||
SpecialFeatureIds = new List<Guid>();
|
SpecialFeatureIds = new List<Guid>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the name of the TMDB collection.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name of the TMDB collection.</value>
|
||||||
|
public string TmdbCollectionName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the user data key.
|
/// Gets the user data key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -128,7 +128,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return "2";
|
return "3";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,7 +674,15 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
|
|
||||||
if (movieData.belongs_to_collection != null)
|
if (movieData.belongs_to_collection != null)
|
||||||
{
|
{
|
||||||
movie.SetProviderId(MetadataProviders.TmdbCollection, movieData.belongs_to_collection.id.ToString(CultureInfo.InvariantCulture));
|
movie.SetProviderId(MetadataProviders.TmdbCollection,
|
||||||
|
movieData.belongs_to_collection.id.ToString(CultureInfo.InvariantCulture));
|
||||||
|
|
||||||
|
var movieItem = movie as Movie;
|
||||||
|
|
||||||
|
if (movieItem != null)
|
||||||
|
{
|
||||||
|
movieItem.TmdbCollectionName = movieData.belongs_to_collection.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
@ -46,6 +47,20 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
{
|
{
|
||||||
switch (reader.Name)
|
switch (reader.Name)
|
||||||
{
|
{
|
||||||
|
case "TmdbCollectionName":
|
||||||
|
|
||||||
|
{
|
||||||
|
var val = reader.ReadElementContentAsString();
|
||||||
|
var movie = item as Movie;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(val) && movie != null)
|
||||||
|
{
|
||||||
|
movie.TmdbCollectionName = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "Chapters":
|
case "Chapters":
|
||||||
|
|
||||||
//_chaptersTask = FetchChaptersFromXmlNode(item, reader.ReadSubtree(), _itemRepo, CancellationToken.None);
|
//_chaptersTask = FetchChaptersFromXmlNode(item, reader.ReadSubtree(), _itemRepo, CancellationToken.None);
|
||||||
|
@ -96,6 +96,16 @@ namespace MediaBrowser.Providers.Savers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var movie = item as Movie;
|
||||||
|
|
||||||
|
if (movie != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(movie.TmdbCollectionName))
|
||||||
|
{
|
||||||
|
builder.Append("<TmdbCollectionName>" + SecurityElement.Escape(movie.TmdbCollectionName) + "</TmdbCollectionName>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var video = (Video)item;
|
var video = (Video)item;
|
||||||
|
|
||||||
XmlSaverHelpers.AddMediaInfo(video, builder, _itemRepository);
|
XmlSaverHelpers.AddMediaInfo(video, builder, _itemRepository);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user