Push_auto_list
Push_Auto_List
This call returns a list of currently active automatic push entries
(which can be used in "push_auto_remove" calls).
It is closely related to push_auto_add.
It is called as such:
{
"push_auto_list": true //value is ignored
}
And is responded using two methods:
auto_pushavailable in MistServer versions 3.6+ returns anauto_push_IDand information as an objectpush_auto_listavailable in MistServer versions 3.5.1 and below returns an array of pushes set up bystream nameandpush target.
Required fields:
stream// String containing stream name or tagtarget// String containing push target
Optional fields:
x-LSP-notes// String with notesscheduletime// unix time in seconds the recording should startcompletetime// unix time in seconds the recording should endstart_rule// Array with 3 values, 1: variable name, 2: variable operator, 3: variable valueend_rule// Array with 3 values, 1: variable name, 2: variable operator, 3: variable value
info
Start and end rule will require some explanation.
- Variable name: This should be the name of the variable known to MistServer, that can be from variable substitutions or a custom variable. Do not add the
$sign. - Variable operator: Requires a corresponding number from the operator list
- Variable value: This can be anything from a value to a string of values. Whether it makes sense is up to whatever the
variable namevalue is. example: Variablehourgives the corresponding current server time hour from 0-23
`"start_rule":["hour",10,9]`,
`"end_rule":["hour",10,17]` ,
Would have the push be active from 9:00 to 17:00 (9:00 am to 5:00 pm)
Converted fields
startVariableName,startVariableOperator,startVariableValuewill be converted intostart_rulefor backwards compatibilityendVariableName,endVariableOperator,endVariableValuewill be converted intoend_rulefor backwards compatibilityscheduletime&completetimewill be converted to an integer should they not already be one.
Any other value will be ignored for future compatibility.
{
"auto_push": {
"71d6b51b668e1f24973def9210cb5644": { //auto_push_ID generated if not provided
"stream": "mylivestream", //Stream name or #Tag that should be checked for pushing
"target": "/tmp/$stream/$yday_$datetime.mkv", //stream url or file location to push/record towards
"x-LSP-notes": "notes go here!", //Optional field for notes visible in the push panel
"start_rule":["hour",11,9],
"end_rule":["hour",11,17]
},
//Etcetera
},
"push_auto_list":[ //deprecated, still available for backwards compatibility.
["mylivestream", "/tmp/$stream/$yday_$datetime.mkv", scheduletime, completetime],
//Etcetera
]
}
Operator list
0: boolean true
1: boolean false
2: ==
3: !=
10: > (numerical comparison)
11: >= (numerical comparison)
12: < (numerical comparison)
13: <= (numerical comparison)
20 > (lexical comparison)
21: >= (lexical comparison)
22: < (lexical comparison)
23: <= (lexical comparison)