Updates to pages to reflect lib code changes
This commit is contained in:
@@ -7,10 +7,10 @@ $config = $main->config();
|
|||||||
// Grab the name of this source
|
// Grab the name of this source
|
||||||
$encoded_filename = null;
|
$encoded_filename = null;
|
||||||
if ($req->get('submit')) {
|
if ($req->get('submit')) {
|
||||||
$encoded_filename = RippingCluster_Main::issetelse($_POST['id'], RippingCluster_Exception_InvalidParameters);
|
$encoded_filename = RippingCluster_Main::issetelse($_POST['id'], 'RippingCluster_Exception_InvalidParameters');
|
||||||
|
|
||||||
// Create the jobs from the request
|
// Create the jobs from the request
|
||||||
$jobs = RippingCluster_Job::fromPostRequest($_POST['id'], $_POST['rip-options'], $_POST['rips']);
|
$jobs = RippingCluster_Job::fromPostRequest($_POST['plugin'], $_POST['id'], $_POST['rip-options'], $_POST['rips']);
|
||||||
|
|
||||||
// Spawn the background client process to run all the jobs
|
// Spawn the background client process to run all the jobs
|
||||||
RippingCluster_Job::runAllJobs();
|
RippingCluster_Job::runAllJobs();
|
||||||
@@ -22,9 +22,10 @@ if ($req->get('submit')) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->smarty->assign('rips_submitted', false);
|
$this->smarty->assign('rips_submitted', false);
|
||||||
$encoded_filename = $req->get('id', RippingCluster_Exception_InvalidParameters);
|
$encoded_filename = $req->get('id', 'RippingCluster_Exception_InvalidParameters');
|
||||||
|
|
||||||
$source = RippingCluster_Rips_Source::loadEncoded($encoded_filename);
|
$plugin = $req->get('plugin', 'RippingCluster_Exception_InvalidParameters');
|
||||||
|
$source = RippingCluster_Source_PluginFactory::loadEncoded($plugin, $encoded_filename);
|
||||||
|
|
||||||
$this->smarty->assign('source', $source);
|
$this->smarty->assign('source', $source);
|
||||||
$this->smarty->assign('titles', $source->titles());
|
$this->smarty->assign('titles', $source->titles());
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ $main = RippingCluster_Main::instance();
|
|||||||
$req = $main->request();
|
$req = $main->request();
|
||||||
$config = $main->config();
|
$config = $main->config();
|
||||||
|
|
||||||
$source = RippingCluster_Rips_Source::loadEncoded($req->get('id', RippingCluster_Exception_InvalidParameters));
|
$plugin = $req->get('plugin', 'RippingCluster_Exception_InvalidParameters');
|
||||||
|
$source = RippingCluster_Source_PluginFactory::loadEncoded($plugin, $req->get('id', 'RippingCluster_Exception_InvalidParameters'));
|
||||||
|
|
||||||
$this->smarty->assign('source', $source);
|
$this->smarty->assign('source', $source);
|
||||||
$this->smarty->assign('titles', $source->titles());
|
$this->smarty->assign('titles', $source->titles());
|
||||||
|
|||||||
@@ -3,12 +3,11 @@
|
|||||||
$main = RippingCluster_Main::instance();
|
$main = RippingCluster_Main::instance();
|
||||||
$config = $main->config();
|
$config = $main->config();
|
||||||
|
|
||||||
$lister = new RippingCluster_Rips_SourceLister($config->get('rips.source_dir'));
|
$sources = RippingCluster_Source_PluginFactory::enumerateAll();
|
||||||
$sources = $lister->sources();
|
|
||||||
|
|
||||||
$sources_cached = array();
|
$sources_cached = array();
|
||||||
foreach ($sources as $source) {
|
foreach ($sources as $source) {
|
||||||
$sources_cached[$source->filename()] = RippingCluster_Rips_Source::isCached($source->filename());
|
$sources_cached[$source->filename()] = RippingCluster_Source::isCached($source->filename());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->smarty->assign('sources', $sources);
|
$this->smarty->assign('sources', $sources);
|
||||||
|
|||||||
@@ -8,9 +8,10 @@
|
|||||||
to see a list of running jobs, or the <a href="{$base_uri}logs/" title="View logs">logs</a> page for more detailed progress information.
|
to see a list of running jobs, or the <a href="{$base_uri}logs/" title="View logs">logs</a> page for more detailed progress information.
|
||||||
</p>
|
</p>
|
||||||
{else}
|
{else}
|
||||||
<h3>{$source->filename()|htmlspecialchars}</h3>
|
<h3>{$source->filename()|escape:"html"}</h3>
|
||||||
|
|
||||||
<form name="setup-rips" id="setup-rips" action="{$base_uri}rips/setup-rip/submit/" method="post">
|
<form name="setup-rips" id="setup-rips" action="{$base_uri}rips/setup-rip/submit/" method="post">
|
||||||
|
<input type="hidden" name="plugin" value="{$source->plugin()|escape:"html"}" />
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Configure global rip options</legend>
|
<legend>Configure global rip options</legend>
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
{foreach from=$sources item=source}
|
{foreach from=$sources item=source}
|
||||||
|
{assign var='source_plugin' value=$source->plugin()}
|
||||||
{assign var='source_filename' value=$source->filename()}
|
{assign var='source_filename' value=$source->filename()}
|
||||||
{assign var='source_filename_encoded' value=$source->filenameEncoded()}
|
{assign var='source_filename_encoded' value=$source->filenameEncoded()}
|
||||||
<li>
|
<li>
|
||||||
[ <a href="{$base_uri}rips/source-details/id/{$source_filename_encoded}" title="Browse source details">Browse</a> |
|
[ <a href="{$base_uri}rips/source-details/plugin/{$source_plugin}/id/{$source_filename_encoded}" title="Browse source details">Browse</a> |
|
||||||
<a href="{$base_uri}rips/setup-rip/id/{$source_filename_encoded}" title="Rip this source">Rip</a> ]
|
<a href="{$base_uri}rips/setup-rip/plugin/{$source_plugin}/id/{$source_filename_encoded}" title="Rip this source">Rip</a> ]
|
||||||
{$source_filename|escape:'html'}{if $sources_cached.$source_filename} (cached){/if}
|
{$source_filename|escape:'html'}{if $sources_cached.$source_filename} (cached){/if}
|
||||||
</li>
|
</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|||||||
Reference in New Issue
Block a user