mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Import video files from root of unsroted dir
New: Import Files directly from unsorted directory (no subfolder required)
This commit is contained in:
parent
5437f7599a
commit
3cdd479bb4
2 changed files with 35 additions and 2 deletions
|
@ -284,11 +284,12 @@ namespace NzbDrone.Core.Providers
|
|||
}
|
||||
}
|
||||
|
||||
private List<string> GetVideoFiles(string path)
|
||||
public List<string> GetVideoFiles(string path, bool allDirectories = true)
|
||||
{
|
||||
Logger.Debug("Scanning '{0}' for video files", path);
|
||||
|
||||
var filesOnDisk = _diskProvider.GetFiles(path, SearchOption.AllDirectories);
|
||||
var searchOption = allDirectories ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
|
||||
var filesOnDisk = _diskProvider.GetFiles(path, searchOption);
|
||||
|
||||
var mediaFileList = filesOnDisk.Where(c => mediaExtentions.Contains(Path.GetExtension(c).ToLower())).ToList();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue