Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
0517bf0c82
11
CREDITS
11
CREDITS
|
@ -1,6 +1,17 @@
|
||||||
=======
|
=======
|
||||||
CREDITS
|
CREDITS
|
||||||
=======
|
=======
|
||||||
|
Version 1.9.3
|
||||||
|
-------------
|
||||||
|
Same as previous version.
|
||||||
|
|
||||||
|
Version 1.9.2
|
||||||
|
-------------
|
||||||
|
Same as previous version.
|
||||||
|
|
||||||
|
Version 1.9.1
|
||||||
|
-------------
|
||||||
|
Same as previous version.
|
||||||
|
|
||||||
Version 1.9.0
|
Version 1.9.0
|
||||||
-------------
|
-------------
|
||||||
|
|
|
@ -181,6 +181,7 @@ class LibraryController extends Zend_Controller_Action
|
||||||
|
|
||||||
$file_id = $this->_getParam('id', null);
|
$file_id = $this->_getParam('id', null);
|
||||||
$file = StoredFile::Recall($file_id);
|
$file = StoredFile::Recall($file_id);
|
||||||
|
$form->populate($file->getDbColMetadata());
|
||||||
|
|
||||||
if ($request->isPost()) {
|
if ($request->isPost()) {
|
||||||
if ($form->isValid($request->getPost())) {
|
if ($form->isValid($request->getPost())) {
|
||||||
|
@ -196,7 +197,6 @@ class LibraryController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$form->populate($file->getDbColMetadata());
|
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,21 +29,15 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
// Add title field
|
// Add title field
|
||||||
$this->addElement('text', 'track_title', array(
|
$this->addElement('text', 'track_title', array(
|
||||||
'label' => 'Title:',
|
'label' => 'Title:',
|
||||||
'required' => true,
|
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(
|
|
||||||
'NotEmpty',
|
|
||||||
)
|
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add artist field
|
// Add artist field
|
||||||
$this->addElement('text', 'artist_name', array(
|
$this->addElement('text', 'artist_name', array(
|
||||||
'label' => 'Artist:',
|
'label' => 'Artist:',
|
||||||
'required' => true,
|
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array('NotEmpty')
|
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add album field
|
// Add album field
|
||||||
|
|
|
@ -728,7 +728,7 @@ class StoredFile {
|
||||||
$chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0;
|
$chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0;
|
||||||
$chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0;
|
$chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0;
|
||||||
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
|
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
|
||||||
|
Logging::log(__FILE__.':uploadFile(): filename='.$fileName);
|
||||||
// Clean the fileName for security reasons
|
// Clean the fileName for security reasons
|
||||||
//this needs fixing for songs not in ascii.
|
//this needs fixing for songs not in ascii.
|
||||||
//$fileName = preg_replace('/[^\w\._]+/', '', $fileName);
|
//$fileName = preg_replace('/[^\w\._]+/', '', $fileName);
|
||||||
|
@ -823,7 +823,7 @@ class StoredFile {
|
||||||
|
|
||||||
public static function copyFileToStor($p_targetDir, $fileName){
|
public static function copyFileToStor($p_targetDir, $fileName){
|
||||||
$audio_file = $p_targetDir . DIRECTORY_SEPARATOR . $fileName;
|
$audio_file = $p_targetDir . DIRECTORY_SEPARATOR . $fileName;
|
||||||
|
Logging::log('copyFileToStor: moving file '.$audio_file);
|
||||||
$md5 = md5_file($audio_file);
|
$md5 = md5_file($audio_file);
|
||||||
$duplicate = StoredFile::RecallByMd5($md5);
|
$duplicate = StoredFile::RecallByMd5($md5);
|
||||||
if ($duplicate) {
|
if ($duplicate) {
|
||||||
|
@ -844,6 +844,7 @@ class StoredFile {
|
||||||
$audio_stor = $stor . DIRECTORY_SEPARATOR . $fileName;
|
$audio_stor = $stor . DIRECTORY_SEPARATOR . $fileName;
|
||||||
|
|
||||||
$r = @copy($audio_file, $audio_stor);
|
$r = @copy($audio_file, $audio_stor);
|
||||||
|
//$r = @unlink($audio_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getFileCount()
|
public static function getFileCount()
|
||||||
|
|
|
@ -25,7 +25,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$("#plupload_error").find("table").append(row);
|
$("#plupload_error").find("table").append(row);
|
||||||
}else{
|
}else{
|
||||||
$.get('/Plupload/copyfile/format/json/name/'+file.name, function(json){
|
$.get('/Plupload/copyfile/format/json/name/'+encodeURIComponent(file.name), function(json){
|
||||||
var jr = jQuery.parseJSON(json);
|
var jr = jQuery.parseJSON(json);
|
||||||
if(jr.error !== undefined) {
|
if(jr.error !== undefined) {
|
||||||
var row = $("<tr/>")
|
var row = $("<tr/>")
|
||||||
|
|
|
@ -547,7 +547,8 @@ class Airtime190Upgrade{
|
||||||
|
|
||||||
public static function InstallAirtimePhpServerCode($phpDir)
|
public static function InstallAirtimePhpServerCode($phpDir)
|
||||||
{
|
{
|
||||||
|
// delete old files
|
||||||
|
exec("rm -rf ".$phpDir);
|
||||||
$AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc');
|
$AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc');
|
||||||
|
|
||||||
echo "* Installing PHP code to ".$phpDir.PHP_EOL;
|
echo "* Installing PHP code to ".$phpDir.PHP_EOL;
|
||||||
|
|
|
@ -159,6 +159,8 @@ class Airtime200Upgrade{
|
||||||
|
|
||||||
$AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc');
|
$AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc');
|
||||||
|
|
||||||
|
// delete old files
|
||||||
|
exec("rm -rf ".$phpDir);
|
||||||
echo "* Installing PHP code to ".$phpDir.PHP_EOL;
|
echo "* Installing PHP code to ".$phpDir.PHP_EOL;
|
||||||
exec("mkdir -p ".$phpDir);
|
exec("mkdir -p ".$phpDir);
|
||||||
exec("cp -R ".$AIRTIME_SRC."/* ".$phpDir);
|
exec("cp -R ".$AIRTIME_SRC."/* ".$phpDir);
|
||||||
|
|
|
@ -157,7 +157,7 @@ class ShowRecorder(Thread):
|
||||||
|
|
||||||
self.upload_file(filepath)
|
self.upload_file(filepath)
|
||||||
os.remove(filepath)
|
os.remove(filepath)
|
||||||
except Exceptio, e:
|
except Exception, e:
|
||||||
self.logger.error(e)
|
self.logger.error(e)
|
||||||
else:
|
else:
|
||||||
self.logger.info("problem recording show")
|
self.logger.info("problem recording show")
|
||||||
|
|
Loading…
Reference in New Issue