using System; using System.Collections.Generic; using Marr.Data; using NzbDrone.Core.Datastore; using NzbDrone.Core.Qualities; using NzbDrone.Core.Tv; using NzbDrone.Core.MediaFiles.MediaInfo; using NzbDrone.Common.Extensions; using NzbDrone.Core.Languages; namespace NzbDrone.Core.MediaFiles { public class EpisodeFile : ModelBase { public int SeriesId { get; set; } public int SeasonNumber { get; set; } public string RelativePath { get; set; } public string Path { get; set; } public long Size { get; set; } public DateTime DateAdded { get; set; } public string OriginalFilePath { get; set; } public string SceneName { get; set; } public string ReleaseGroup { get; set; } public QualityModel Quality { get; set; } public MediaInfoModel MediaInfo { get; set; } public LazyLoaded> Episodes { get; set; } public LazyLoaded Series { get; set; } public Language Language { get; set; } public override string ToString() { return string.Format("[{0}] {1}", Id, RelativePath); } public string GetSceneOrFileName() { if (SceneName.IsNotNullOrWhiteSpace()) { return SceneName; } if (RelativePath.IsNotNullOrWhiteSpace()) { return System.IO.Path.GetFileName(RelativePath); } return string.Empty; } } }