No more dupes and house cleaner added

This commit is contained in:
Mark McDowall
2014-01-25 23:14:55 -08:00
parent 3ca5e478ff
commit 409e1cca94
16 changed files with 235 additions and 71 deletions
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Messaging.Events;
@@ -12,7 +9,6 @@ namespace NzbDrone.Core.MediaFiles
{
List<EpisodeFile> GetFilesBySeries(int seriesId);
List<EpisodeFile> GetFilesBySeason(int seriesId, int seasonNumber);
EpisodeFile FindFileByPath(string path, bool includeExtension = true);
}
@@ -34,15 +30,5 @@ namespace NzbDrone.Core.MediaFiles
.AndWhere(c => c.SeasonNumber == seasonNumber)
.ToList();
}
public EpisodeFile FindFileByPath(string path, bool includeExtension = true)
{
if (includeExtension)
{
return Query.SingleOrDefault(c => c.Path == path);
}
return Query.SingleOrDefault(c => c.Path.StartsWith(Path.ChangeExtension(path, "")));
}
}
}