mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-22 22:16:13 -04:00
Dapper and STJson
Co-Authored-By: ta264 <ta264@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
||||
@@ -21,25 +22,22 @@ namespace NzbDrone.Core.MediaFiles
|
||||
|
||||
public List<EpisodeFile> GetFilesBySeries(int seriesId)
|
||||
{
|
||||
return Query.Where(c => c.SeriesId == seriesId).ToList();
|
||||
return Query(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();
|
||||
return Query(c => c.SeriesId == seriesId && c.SeasonNumber == seasonNumber).ToList();
|
||||
}
|
||||
|
||||
public List<EpisodeFile> GetFilesWithoutMediaInfo()
|
||||
{
|
||||
return Query.Where(c => c.MediaInfo == null).ToList();
|
||||
return Query(c => c.MediaInfo == null).ToList();
|
||||
}
|
||||
|
||||
public List<EpisodeFile> GetFilesWithRelativePath(int seriesId, string relativePath)
|
||||
{
|
||||
return Query.Where(c => c.SeriesId == seriesId)
|
||||
.AndWhere(c => c.RelativePath == relativePath)
|
||||
return Query(c => c.SeriesId == seriesId && c.RelativePath == relativePath)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user