You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radarr/src/Radarr.Api.V3/Collections/CollectionMovieResource.cs

49 lines
1.5 KiB

using System.Collections.Generic;
using NzbDrone.Core.MediaCover;
using NzbDrone.Core.Movies;
namespace Radarr.Api.V3.Collections
{
public class CollectionMovieResource
{
public int TmdbId { get; set; }
public string ImdbId { get; set; }
public string Title { get; set; }
public string CleanTitle { get; set; }
public string SortTitle { get; set; }
public string Overview { get; set; }
public int Runtime { get; set; }
public List<MediaCover> Images { get; set; }
public int Year { get; set; }
public Ratings Ratings { get; set; }
public List<string> Genres { get; set; }
public string Folder { get; set; }
}
public static class CollectionMovieResourceMapper
{
public static CollectionMovieResource ToResource(this MovieMetadata model)
{
if (model == null)
{
return null;
}
return new CollectionMovieResource
{
TmdbId = model.TmdbId,
Title = model.Title,
Overview = model.Overview,
SortTitle = model.SortTitle,
Images = model.Images,
ImdbId = model.ImdbId,
Ratings = model.Ratings,
Runtime = model.Runtime,
CleanTitle = model.CleanTitle,
Genres = model.Genres,
Year = model.Year
};
}
}
}