cleaned up refresh series info

This commit is contained in:
kay.one 2013-06-02 12:29:00 -07:00
parent 7a96cb763a
commit 49949bbe74
15 changed files with 361 additions and 240 deletions

View file

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using NzbDrone.Common.Messaging;
using NzbDrone.Core.Datastore;
@ -11,6 +10,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);
}
@ -27,6 +27,11 @@ namespace NzbDrone.Core.MediaFiles
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();