Prowlarr/src/NzbDrone.Core/Notifications/Webhook/WebhookMovie.cs
2017-11-10 16:06:45 +01:00

30 lines
829 B
C#
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.IO;
using NzbDrone.Core.Tv;
using NzbDrone.Core.MediaFiles;
namespace NzbDrone.Core.Notifications.Webhook
{
public class WebhookMovie
{
public int Id { get; set; }
public string Title { get; set; }
public string FilePath { get; set; }
public string ReleaseDate { get; set; }
public string FolderPath { get; set; }
public WebhookMovie() { }
public WebhookMovie(Movie movie)
{
Id = movie.Id;
Title = movie.Title;
ReleaseDate = movie.PhysicalReleaseDate().ToString("yyyy-MM-dd");
FolderPath = movie.Path;
}
public WebhookMovie(Movie movie, MovieFile movieFile) : this(movie)
{
FilePath = Path.Combine(movie.Path, movieFile.RelativePath);
}
}
}