Merge branch '2.1.x' of dev.sourcefabric.org:airtime into 2.1.x
This commit is contained in:
commit
d8a75cf5c6
|
@ -493,7 +493,7 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
//$file->setMetadataValue('MDATA_KEY_TITLE', $tmpTitle);
|
||||
$file->setMetadataValue('MDATA_KEY_CREATOR', "Airtime Show Recorder");
|
||||
$file->setMetadataValue('MDATA_KEY_TRACKNUMBER', null);
|
||||
$file->setMetadataValue('MDATA_KEY_TRACKNUMBER', $show_instance_id);
|
||||
|
||||
if (!$showCanceled && Application_Model_Preference::GetAutoUploadRecordedShowToSoundcloud())
|
||||
{
|
||||
|
|
|
@ -71,12 +71,12 @@ class PreferenceController extends Zend_Controller_Action
|
|||
$isSass = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
|
||||
|
||||
$form = new Application_Form_SupportSettings();
|
||||
|
||||
if ($request->isPost()) {
|
||||
$values = $request->getPost();
|
||||
if ($form->isValid($values)) {
|
||||
if (!$isSass && $values["Publicise"] != 1){
|
||||
Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]);
|
||||
Application_Model_Preference::SetPublicise($values["Publicise"]);
|
||||
if(isset($values["Privacy"])){
|
||||
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ class Application_Form_EditAudioMD extends Zend_Form
|
|||
'ignore' => true,
|
||||
'class' => 'ui-button ui-state-default ui-button-text-only md-cancel',
|
||||
'label' => 'Cancel',
|
||||
'onclick' => 'javascript:document.location = document.referrer',
|
||||
'onclick' => 'javascript:document.location.href = "/Playlist"',
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
|
|
|
@ -159,7 +159,7 @@ class AirtimeNotifier(Notifier):
|
|||
return
|
||||
md.update(mutagen)
|
||||
|
||||
if event['is_recorded_show']:
|
||||
if 'is_recorded_show' in event and event['is_recorded_show']:
|
||||
self.api_client.update_media_metadata(md, mode, True)
|
||||
else:
|
||||
self.api_client.update_media_metadata(md, mode)
|
||||
|
@ -169,12 +169,16 @@ class AirtimeNotifier(Notifier):
|
|||
if mutagen is None:
|
||||
return
|
||||
md.update(mutagen)
|
||||
self.api_client.update_media_metadata(md, mode)
|
||||
|
||||
if 'is_recorded_show' in event and event['is_recorded_show']:
|
||||
self.api_client.update_media_metadata(md, mode, True)
|
||||
else:
|
||||
self.api_client.update_media_metadata(md, mode)
|
||||
elif (mode == self.config.MODE_MOVED):
|
||||
md['MDATA_KEY_MD5'] = self.md_manager.get_md5(filepath)
|
||||
self.api_client.update_media_metadata(md, mode)
|
||||
|
||||
if 'is_recorded_show' in event and event['is_recorded_show']:
|
||||
self.api_client.update_media_metadata(md, mode, True)
|
||||
else:
|
||||
self.api_client.update_media_metadata(md, mode)
|
||||
elif (mode == self.config.MODE_DELETE):
|
||||
self.api_client.update_media_metadata(md, mode)
|
||||
|
||||
|
|
|
@ -180,7 +180,8 @@ class AirtimeProcessEvent(ProcessEvent):
|
|||
if not dir and not self.mmc.is_parent_directory(pathname, self.config.organize_directory):
|
||||
self.logger.info("Modified: %s", pathname)
|
||||
if self.mmc.is_audio_file(name):
|
||||
self.file_events.append({'filepath': pathname, 'mode': self.config.MODE_MODIFY})
|
||||
is_recorded = self.mmc.is_parent_directory(pathname, self.config.recorded_directory)
|
||||
self.file_events.append({'filepath': pathname, 'mode': self.config.MODE_MODIFY, 'is_recorded_show': is_recorded})
|
||||
|
||||
# if change is detected on /etc/mtab, we check what mount(file system) was added/removed
|
||||
# and act accordingly
|
||||
|
|
Loading…
Reference in New Issue