mirror of https://github.com/lidarr/Lidarr
Fix issue on in ImportFile
This commit is contained in:
parent
7560a70dd4
commit
f211f99960
|
@ -49,7 +49,7 @@ namespace NzbDrone.Core.Providers
|
||||||
return new List<EpisodeFile>();
|
return new List<EpisodeFile>();
|
||||||
}
|
}
|
||||||
|
|
||||||
var mediaFileList = GetMediaFileList(series.Path);
|
var mediaFileList = GetVideoFiles(series.Path);
|
||||||
var fileList = new List<EpisodeFile>();
|
var fileList = new List<EpisodeFile>();
|
||||||
|
|
||||||
foreach (var filePath in mediaFileList)
|
foreach (var filePath in mediaFileList)
|
||||||
|
@ -137,7 +137,7 @@ namespace NzbDrone.Core.Providers
|
||||||
episodeFile.Quality = parseResult.Quality.QualityType;
|
episodeFile.Quality = parseResult.Quality.QualityType;
|
||||||
episodeFile.Proper = parseResult.Quality.Proper;
|
episodeFile.Proper = parseResult.Quality.Proper;
|
||||||
episodeFile.SeasonNumber = parseResult.SeasonNumber;
|
episodeFile.SeasonNumber = parseResult.SeasonNumber;
|
||||||
var fileId = (int)_database.Insert(episodeFile);
|
var fileId = Convert.ToInt32(_database.Insert(episodeFile));
|
||||||
|
|
||||||
//This is for logging + updating the episodes that are linked to this EpisodeFile
|
//This is for logging + updating the episodes that are linked to this EpisodeFile
|
||||||
string episodeList = String.Empty;
|
string episodeList = String.Empty;
|
||||||
|
@ -219,7 +219,7 @@ namespace NzbDrone.Core.Providers
|
||||||
return new Tuple<int, int>(avilableEpisodes.Count, episodeTotal.Count);
|
return new Tuple<int, int>(avilableEpisodes.Count, episodeTotal.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<string> GetMediaFileList(string path)
|
private List<string> GetVideoFiles(string path)
|
||||||
{
|
{
|
||||||
Logger.Debug("Scanning '{0}' for episodes", path);
|
Logger.Debug("Scanning '{0}' for episodes", path);
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ namespace NzbDrone.Core.Providers
|
||||||
var result = new List<EpisodeFile>();
|
var result = new List<EpisodeFile>();
|
||||||
|
|
||||||
//Get all the files except those that are considered samples
|
//Get all the files except those that are considered samples
|
||||||
var files = GetMediaFileList(path).Where(f => _diskProvider.GetSize(f) > 40000000 || !f.ToLower().Contains("sample")).ToList();
|
var files = GetVideoFiles(path).Where(f => _diskProvider.GetSize(f) > 40000000 || !f.ToLower().Contains("sample")).ToList();
|
||||||
|
|
||||||
foreach (var file in files)
|
foreach (var file in files)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue