Prevent adding a root folder that is the same as drone factory

This commit is contained in:
Mark McDowall
2013-08-02 00:16:37 -07:00
parent e3916d5fc8
commit 485f05d4b9
6 changed files with 33 additions and 11 deletions
+6 -1
View File
@@ -10,11 +10,11 @@ namespace NzbDrone.Core.Tv
{
bool SeriesPathExists(string path);
List<Series> Search(string title);
Series FindByTitle(string cleanTitle);
Series FindByTvdbId(int tvdbId);
void SetSeriesType(int seriesId, SeriesTypes seriesTypes);
Series FindBySlug(string slug);
List<String> GetSeriesPaths();
}
public class SeriesRepository : BasicRepository<Series>, ISeriesRepository
@@ -53,5 +53,10 @@ namespace NzbDrone.Core.Tv
{
return Query.SingleOrDefault(c => c.TitleSlug == slug.ToLower());
}
public List<string> GetSeriesPaths()
{
return Query.Select(s => s.Path).ToList();
}
}
}