Added MKV source/worker plugins, tidied sources page
Added placeholder for source plugin to read from an existing mkv file. Added corresponding worker placeholder to transcode an mkv file using ffmpeg. Updated the sources page to show which sources come from which plugins.
This commit is contained in:
@@ -25,13 +25,12 @@ class RippingCluster_Source_Plugin_HandBrake extends RippingCluster_PluginBase i
|
||||
$config = RippingCluster_Main::instance()->config();
|
||||
$directories = $config->get('source.handbrake.dir');
|
||||
|
||||
$sources = array();
|
||||
foreach ($directories as $directory) {
|
||||
if (!is_dir($directory)) {
|
||||
throw new RippingCluster_Exception_InvalidSourceDirectory($directory);
|
||||
}
|
||||
|
||||
$sources = array();
|
||||
|
||||
$iterator = new RippingCluster_Utility_DvdDirectoryIterator(new RippingCluster_Utility_VisibleFilesIterator(new DirectoryIterator($directory)));
|
||||
foreach ($iterator as /** @var SplFileInfo */ $source_vts) {
|
||||
$sources[] = self::load($source_vts->getPathname(), false);
|
||||
@@ -207,15 +206,15 @@ class RippingCluster_Source_Plugin_HandBrake extends RippingCluster_PluginBase i
|
||||
|
||||
// Check all of the source directories specified in the config
|
||||
$source_directories = $config->get('source.handbrake.dir');
|
||||
foreach ($source_directories as $source_basedir) {
|
||||
foreach ($source_directories as $source_basedir) {
|
||||
$real_source_basedir = realpath($source_basedir);
|
||||
|
||||
if (substr($real_source_filename, 0, strlen($real_source_basedir)) != $real_source_basedir) {
|
||||
return false;
|
||||
if (substr($real_source_filename, 0, strlen($real_source_basedir)) == $real_source_basedir) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user