|
|
@ -82,7 +82,11 @@ namespace NzbDrone.Core.Providers
|
|
|
|
|
|
|
|
|
|
|
|
if (!_repository.Exists<EpisodeFile>(e => e.Path == Parser.NormalizePath(filePath)))
|
|
|
|
if (!_repository.Exists<EpisodeFile>(e => e.Path == Parser.NormalizePath(filePath)))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var parseResult = Parser.ParseEpisodeInfo(filePath);
|
|
|
|
//Use only the filename, not the entire path
|
|
|
|
|
|
|
|
var parseResult = Parser.ParseEpisodeInfo(new FileInfo(filePath).Name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (parseResult == null)
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
//Stores the list of episodes to add to the EpisodeFile
|
|
|
|
//Stores the list of episodes to add to the EpisodeFile
|
|
|
|
var episodes = new List<Episode>();
|
|
|
|
var episodes = new List<Episode>();
|
|
|
@ -170,7 +174,6 @@ namespace NzbDrone.Core.Providers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void DeleteFromDb(int fileId)
|
|
|
|
public void DeleteFromDb(int fileId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_repository.Delete<EpisodeFile>(fileId);
|
|
|
|
_repository.Delete<EpisodeFile>(fileId);
|
|
|
|