CC-3224: "On-the-fly" stream rebroadcasting
- Live source is created when only both port and mount point are specified
This commit is contained in:
parent
30901aa0d6
commit
1ebe3d1812
|
@ -206,9 +206,10 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
Application_Model_StreamSetting::setStreamSetting($values);
|
||||
$data = array();
|
||||
$data['setting'] = Application_Model_StreamSetting::getStreamSetting();
|
||||
$data['setting']['harbor_input_port'] = $values["harbor_input_port"];
|
||||
$data['setting']['harbor_input_mount_point'] = $values["harbor_input_mount_point"];
|
||||
$info = Application_Model_StreamSetting::getStreamSetting();
|
||||
$info[] = (array("keyname" =>"harbor_input_port", "value"=>$values["harbor_input_port"], "type"=>"integer"));
|
||||
$info[] = (array("keyname" =>"harbor_input_mount_point", "value"=>$values["harbor_input_mount_point"], "type"=>"string"));
|
||||
$data['setting'] = $info;
|
||||
for($i=1;$i<=$num_of_stream;$i++){
|
||||
Application_Model_StreamSetting::setLiquidsoapError($i, "waiting");
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$master_password->setAttrib('autocomplete', 'off')
|
||||
->setAttrib('renderPassword','true')
|
||||
->setAllowEmpty(true)
|
||||
->setValue(Application_Model_Preference::GetLiveSteamMasterPassword())
|
||||
->setLabel('Master Password')
|
||||
->setFilters(array('StringTrim'))
|
||||
->setDecorators(array('ViewHelper'));
|
||||
|
|
|
@ -722,7 +722,7 @@ class Application_Model_Preference
|
|||
}
|
||||
|
||||
public static function SetLiveSteamMasterPassword($value){
|
||||
self::SetValue("live_stream_master_password", md5($value), false);
|
||||
self::SetValue("live_stream_master_password", $value, false);
|
||||
}
|
||||
|
||||
public static function GetLiveSteamMasterPassword(){
|
||||
|
|
|
@ -373,7 +373,7 @@ class AirTimeApiClient(ApiClientInterface):
|
|||
|
||||
url = url.replace("%%api_key%%", self.config["api_key"])
|
||||
url = url.replace("%%username%%", username)
|
||||
url = url.replace("%%password%%", hashlib.md5(password).hexdigest())
|
||||
url = url.replace("%%password%%", password)
|
||||
|
||||
req = urllib2.Request(url)
|
||||
response = urllib2.urlopen(req).read()
|
||||
|
|
|
@ -54,10 +54,16 @@ def check_client(user,password) =
|
|||
end
|
||||
end
|
||||
|
||||
live = input.harbor(harbor_input_mount_point, port=harbor_input_port, auth=check_client)
|
||||
|
||||
s = fallback(track_sensitive=false, [live, queue, default])
|
||||
def configure_live(harbor_input_port, harbor_input_mount_point) =
|
||||
if harbor_input_port != 0 and harbor_input_mount_point != "" then
|
||||
live = input.harbor(harbor_input_mount_point, port=harbor_input_port, auth=check_client)
|
||||
fallback(track_sensitive=false, [live, queue, default])
|
||||
else
|
||||
fallback(track_sensitive=false, [queue, default])
|
||||
end
|
||||
end
|
||||
|
||||
s = configure_live(harbor_input_port, harbor_input_mount_point)
|
||||
s = on_metadata(notify, s)
|
||||
s = crossfade(s)
|
||||
# Attach a skip command to the source s:
|
||||
|
|
Loading…
Reference in New Issue