Commit df316b5e authored by Rémi Duraffort's avatar Rémi Duraffort

qt4_vlm: fix #3938 (options must be removed from the input)

parent 48c7e9d1
...@@ -672,9 +672,23 @@ void VLMWrapper::EditBroadcast( const QString& name, const QString& input, ...@@ -672,9 +672,23 @@ void VLMWrapper::EditBroadcast( const QString& name, const QString& input,
command = "setup \"" + name + "\" inputdel all"; command = "setup \"" + name + "\" inputdel all";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message ); vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message ); vlm_MessageDelete( message );
command = "setup \"" + name + "\" input \"" + input + "\"";
if(!input.isEmpty())
{
QStringList inputs = input.split(":", QString::SkipEmptyParts);
command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message );
for( int i = 1; i < inputs.size(); i++ )
{
command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message ); vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message ); vlm_MessageDelete( message );
}
}
if( !output.isEmpty() ) if( !output.isEmpty() )
{ {
command = "setup \"" + name + "\" output \"" + output + "\""; command = "setup \"" + name + "\" output \"" + output + "\"";
...@@ -745,9 +759,23 @@ void VLMWrapper::EditVod( const QString& name, const QString& input, ...@@ -745,9 +759,23 @@ void VLMWrapper::EditVod( const QString& name, const QString& input,
const QString& mux ) const QString& mux )
{ {
vlm_message_t *message; vlm_message_t *message;
QString command = "setup \"" + name + "\" input \"" + input + "\""; QString command;
if(!input.isEmpty())
{
QStringList inputs = input.split(":", QString::SkipEmptyParts);
command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message );
for( int i = 1; i < inputs.size(); i++ )
{
command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message ); vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message ); vlm_MessageDelete( message );
}
}
if( !output.isEmpty() ) if( !output.isEmpty() )
{ {
...@@ -791,10 +819,24 @@ void VLMWrapper::EditSchedule( const QString& name, const QString& input, ...@@ -791,10 +819,24 @@ void VLMWrapper::EditSchedule( const QString& name, const QString& input,
const QString& mux ) const QString& mux )
{ {
vlm_message_t *message; vlm_message_t *message;
QString command = "setup \"" + name + "\" input \"" + input + "\""; QString command;
if(!input.isEmpty())
{
QStringList inputs = input.split(":", QString::SkipEmptyParts);
command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message ); vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message ); vlm_MessageDelete( message );
for( int i = 1; i < inputs.size(); i++ )
{
command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message );
}
}
if( !output.isEmpty() ) if( !output.isEmpty() )
{ {
command = "setup \"" + name + "\" output \"" + output + "\""; command = "setup \"" + name + "\" output \"" + output + "\"";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment