Attempt to find output dir from parent folder
This commit is contained in:
@@ -91,8 +91,7 @@ class DownloadDispatcher_Source_Plugin_TV extends DownloadDispatcher_Source_Plug
|
||||
}
|
||||
}
|
||||
|
||||
protected function identifyOutputDir($dir, $file) {
|
||||
// TODO - Generate the correct output directory, apply any special case mappings, and ensure the destination exists
|
||||
protected function identifyOutputDir($dir, $file, $try_parent = true) {
|
||||
if (is_null($this->output_dir_cache)) {
|
||||
$this->scanOutputDir();
|
||||
}
|
||||
@@ -108,6 +107,11 @@ class DownloadDispatcher_Source_Plugin_TV extends DownloadDispatcher_Source_Plug
|
||||
}
|
||||
}
|
||||
|
||||
// Filename not recognised, try the parent directory name instead
|
||||
if ($try_parent) {
|
||||
return identifyOutputDir(dirname($dir), basename($dir), false);
|
||||
}
|
||||
|
||||
throw new DownloadDispatcher_Exception_UnidentifiedContent($file);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user