mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-18 21:35:27 -04:00
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
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;
|
|
|
|
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 SceneName { get; set; }
|
|
public string ReleaseGroup { get; set; }
|
|
public QualityModel Quality { get; set; }
|
|
public MediaInfoModel MediaInfo { get; set; }
|
|
public LazyLoaded<List<Episode>> Episodes { get; set; }
|
|
public LazyLoaded<Series> Series { 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;
|
|
}
|
|
}
|
|
}
|