Bug 394000

Summary: When starting Kaffeine with more than 2 parameters, only the last parameter is used.
Product: [Applications] kaffeine Reporter: romeoK <romeoknight>
Component: generalAssignee: Mauro Carvalho Chehab <mchehab>
Status: RESOLVED FIXED    
Severity: normal CC: jesusbalbastro
Priority: NOR    
Version First Reported In: 2.0.15   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description romeoK 2018-05-08 13:08:32 UTC
When i start Kaffeine with these parameters

kaffeine %U -m -t

it works as expected, Kaffeine starts in in minimal mode (-m) and always on top (-t)

But i need to start Kaffeine like this:

kaffeine %U -m -t --channel 5

so i can avoid the intro-screen(select if tv/dvd/file etc.)

But now, the first 2 parameters are ignored, so only channel 5 is tuned.

It seems that whenever i use - and -- parameters in conjunction, then only the -- ones are used?

I tried to change the order of the parameters, but still only the --channel 5 parameter is used then.
Comment 1 Mauro Carvalho Chehab 2018-05-08 15:00:57 UTC
Git commit d1bddebb75795dc86fb36a56b0cd8c028feb88c0 by Mauro Carvalho Chehab.
Committed on 08/05/2018 at 14:58.
Pushed by mauroc into branch 'master'.

mainwindow: reorder arguments to better handle mutually exclusive ones

Some arguments are mutually exclusive and should be parsed
after the others, as the arguments parser routine returns
just after parsing them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

M  +75   -66   src/mainwindow.cpp

https://commits.kde.org/kaffeine/d1bddebb75795dc86fb36a56b0cd8c028feb88c0
Comment 2 Jesus 2018-05-09 20:06:01 UTC
*** Bug 394027 has been marked as a duplicate of this bug. ***