Actually copy avi files!
This commit is contained in:
@@ -261,7 +261,9 @@ class DownloadDispatcher_Source_Plugin_TV extends DownloadDispatcher_Source_Plug
|
|||||||
throw new DownloadDispatcher_Exception_UnacceptableContent($source_file);
|
throw new DownloadDispatcher_Exception_UnacceptableContent($source_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
$this->copyOutputFile($type, $source_dir, $source_file, $destination_dir);
|
||||||
|
|
||||||
|
} break;
|
||||||
|
|
||||||
case 'mkv': {
|
case 'mkv': {
|
||||||
// Verify that the file isn't a fake
|
// Verify that the file isn't a fake
|
||||||
@@ -274,21 +276,29 @@ class DownloadDispatcher_Source_Plugin_TV extends DownloadDispatcher_Source_Plug
|
|||||||
throw new DownloadDispatcher_Exception_UnacceptableContent($source_file);
|
throw new DownloadDispatcher_Exception_UnacceptableContent($source_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // continue into the next case
|
$this->copyOutputFile($type, $source_dir, $source_file, $destination_dir);
|
||||||
|
|
||||||
|
} break;
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
DownloadDispatcher_LogEntry::info($this->log, "Copying '{$source_file}' to '{$destination_dir}'.");
|
// Accept anything we don't have a check for
|
||||||
$result = copy("{$source_dir}/{$source_file}", "{$destination_dir}/{$source_file}");
|
$this->copyOutputFile($type, $source_dir, $source_file, $destination_dir);
|
||||||
if ( ! $result) {
|
|
||||||
DownloadDispatcher_LogEntry::warning($this->log, "Failed to copy '{$source_dir}/{$source_file}' to output directory '{$destination_dir}'.");
|
|
||||||
throw new DownloadDispatcher_Exception_UnprocesseableContent($source_file);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function copyOutputFile($type, $source_dir, $source_file, $destination_dir) {
|
||||||
|
DownloadDispatcher_LogEntry::info($this->log, "Copying '{$source_file}' to '{$destination_dir}'.");
|
||||||
|
$result = copy("{$source_dir}/{$source_file}", "{$destination_dir}/{$source_file}");
|
||||||
|
if ( ! $result) {
|
||||||
|
DownloadDispatcher_LogEntry::warning($this->log, "Failed to copy '{$source_dir}/{$source_file}' to output directory '{$destination_dir}'.");
|
||||||
|
throw new DownloadDispatcher_Exception_UnprocesseableContent($source_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected function renameOutput($dir) {
|
protected function renameOutput($dir) {
|
||||||
$cwd = getcwd();
|
$cwd = getcwd();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user