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:
2010-09-24 20:05:37 +01:00
parent 3977dc6038
commit 2ef47de25c
11 changed files with 274 additions and 31 deletions

View File

@@ -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;
}
}