CC-1987 : Automatic upload of recorded shows to Soundcloud
Added fields to preference form for the station's soundcloud user/pass need to generalize file upload as commented out in the new Soundcloud.php file.
This commit is contained in:
parent
10706ec72a
commit
3a0f9ddcd1
5 changed files with 98 additions and 8 deletions
|
@ -146,8 +146,7 @@ class PluploadController extends Zend_Controller_Action
|
|||
|
||||
$storedFile->setMetadataBatch($metadata);
|
||||
|
||||
// Return JSON-RPC response
|
||||
die('{"jsonrpc" : "2.0", "id" : '.$storedFile->getId().' }');
|
||||
return $storedFile;
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
|
@ -158,13 +157,18 @@ class PluploadController extends Zend_Controller_Action
|
|||
public function uploadAction()
|
||||
{
|
||||
$upload_dir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
|
||||
$this->upload($upload_dir);
|
||||
$file = $this->upload($upload_dir);
|
||||
|
||||
die('{"jsonrpc" : "2.0", "id" : '.$file->getId().' }');
|
||||
}
|
||||
|
||||
public function uploadRecordedAction()
|
||||
{
|
||||
$upload_dir = ini_get("upload_tmp_dir");
|
||||
$this->upload($upload_dir);
|
||||
$file = $this->upload($upload_dir);
|
||||
|
||||
//$file->getRealFilePath();
|
||||
die('{"jsonrpc" : "2.0", "id" : '.$file->getId().' }');
|
||||
}
|
||||
|
||||
public function pluploadAction()
|
||||
|
|
|
@ -29,7 +29,10 @@ class PreferenceController extends Zend_Controller_Action
|
|||
$values = $form->getValues();
|
||||
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
|
||||
Application_Model_Preference::SetDefaultFade($values["stationDefaultFade"]);
|
||||
Application_Model_Preference::SetStreamLabelFormat($values["streamFormat"]);
|
||||
Application_Model_Preference::SetStreamLabelFormat($values["streamFormat"]);
|
||||
Application_Model_Preference::SetDoSoundCloudUpload($values["UseSoundCloud"]);
|
||||
Application_Model_Preference::SetSoundCloudUser($values["SoundCloudUser"]);
|
||||
Application_Model_Preference::SetSoundCloudPassword($values["SoundCloudPassword"]);
|
||||
|
||||
$this->view->statusMsg = "Preferences Updated.";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue