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.
50 lines
1.4 KiB
50 lines
1.4 KiB
using System.Collections.Generic;
|
|
using System.IO;
|
|
using NzbDrone.Core.MediaFiles;
|
|
using NzbDrone.Core.Movies;
|
|
|
|
namespace NzbDrone.Core.Notifications.Webhook
|
|
{
|
|
public class WebhookMovie
|
|
{
|
|
public int Id { get; set; }
|
|
public string Title { get; set; }
|
|
public int Year { get; set; }
|
|
public string FilePath { get; set; }
|
|
public string ReleaseDate { get; set; }
|
|
public string FolderPath { get; set; }
|
|
public int TmdbId { get; set; }
|
|
public string ImdbId { get; set; }
|
|
public string Overview { get; set; }
|
|
public IEnumerable<string> Tags { get; set; }
|
|
|
|
public WebhookMovie()
|
|
{
|
|
}
|
|
|
|
public WebhookMovie(Movie movie)
|
|
{
|
|
Id = movie.Id;
|
|
Title = movie.Title;
|
|
Year = movie.Year;
|
|
ReleaseDate = movie.MovieMetadata.Value.PhysicalReleaseDate().ToString("yyyy-MM-dd");
|
|
FolderPath = movie.Path;
|
|
TmdbId = movie.TmdbId;
|
|
ImdbId = movie.ImdbId;
|
|
Overview = movie.MovieMetadata.Value.Overview;
|
|
}
|
|
|
|
public WebhookMovie(Movie movie, IEnumerable<string> tags)
|
|
: this(movie)
|
|
{
|
|
Tags = tags;
|
|
}
|
|
|
|
public WebhookMovie(Movie movie, MovieFile movieFile)
|
|
: this(movie)
|
|
{
|
|
FilePath = Path.Combine(movie.Path, movieFile.RelativePath);
|
|
}
|
|
}
|
|
}
|