mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Rename series added
This commit is contained in:
parent
c6d82bf98b
commit
637b101975
13 changed files with 233 additions and 19 deletions
|
@ -9,6 +9,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
{
|
||||
EpisodeFile GetFileByPath(string path);
|
||||
List<EpisodeFile> GetFilesBySeries(int seriesId);
|
||||
List<EpisodeFile> GetFilesBySeason(int seriesId, int seasonNumber);
|
||||
bool Exists(string path);
|
||||
}
|
||||
|
||||
|
@ -20,21 +21,26 @@ namespace NzbDrone.Core.MediaFiles
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
public EpisodeFile GetFileByPath(string path)
|
||||
{
|
||||
return Query.SingleOrDefault(c => c.Path == path);
|
||||
}
|
||||
|
||||
public bool Exists(string path)
|
||||
{
|
||||
return Query.Any(c => c.Path == path);
|
||||
}
|
||||
|
||||
public List<EpisodeFile> GetFilesBySeries(int seriesId)
|
||||
{
|
||||
return Query.Where(c => c.SeriesId == seriesId).ToList();
|
||||
}
|
||||
|
||||
public List<EpisodeFile> GetFilesBySeason(int seriesId, int seasonNumber)
|
||||
{
|
||||
return Query.Where(c => c.SeriesId == seriesId)
|
||||
.AndWhere(c => c.SeasonNumber == seasonNumber)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public bool Exists(string path)
|
||||
{
|
||||
return Query.Any(c => c.Path == path);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue