Kodi CLI

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
topfs2 Offline
Team-Kodi Developer
Posts: 4,548
Joined: Dec 2007
Reputation: 17
Post: #1
Hi!

When doing the headless PR I started looking into our AppParamsParser. And what it does is rather simple but some things popped up I wanted to discuss.
a) Which of the options are needed? Feels like most aren't Smile
  • kodi --lirc-dev
  • kodi --no-lirc
  • kodi -d X
  • kodi --test
  • kodi foo.mp3 bar.mp3
  • kodi --legacy-res
  • kodi --debug
  • kodi --standalone
  • kodi --settings=
  • kodi --portable
  • kodi --fullscreen

b) We don't we use a third party parser, http://www.boost.org/doc/libs/1_57_0/doc...tions.html or GNU getopt ?

c) We call AppParam parsing well before application is started, so it feels a bit weird that its tied to app. Wouldn't it be better if AppParamParser just returned a struct with options, and we apply those in XBMC_Run?

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
Montellese Offline
Team Kodi Developer
Posts: 4,836
Joined: Jan 2009
Reputation: 72
Location: Switzerland
Post: #2
fullscreen and portable are certainly used. No idea about the rest.

Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
find quote
Ned Scott Offline
Banned
Posts: 31,461
Joined: Jan 2011
Location: Arizona, USA
Post: #3
Linux builds have a portable mode? Or is this a different kind of portable mode than what Windows users have?
find quote
wsnipex Offline
Team-Kodi
Posts: 6,385
Joined: Jun 2011
Reputation: 165
Post: #4
why wouldn't they? Its just not overly useful when running from packages, as the install location belongs to root.
Manual compiles work just fine with portable mode
find quote
xhaggi Offline
Team-Kodi Developer
Posts: 645
Joined: Jul 2012
Reputation: 23
Post: #5
-d <delay> is used by some of my friends to delay the startup after system boots up. this is done to be sure that other services are started right before kodi.
find quote
lrusak Offline
Team-Kodi Member
Posts: 924
Joined: Sep 2011
Reputation: 14
Location: The Great White North
Post: #6
(2015-02-11 18:49)xhaggi Wrote:  -d <delay> is used by some of my friends to delay the startup after system boots up. this is done to be sure that other services are started right before kodi.

I feel like there are much better ways to accomplish this, on linux at least.

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,548
Joined: Dec 2007
Reputation: 17
Post: #7
(2015-02-11 19:09)lrusak Wrote:  
(2015-02-11 18:49)xhaggi Wrote:  -d <delay> is used by some of my friends to delay the startup after system boots up. this is done to be sure that other services are started right before kodi.

I feel like there are much better ways to accomplish this, on linux at least.

Code:
sleep X; kodi

So yeah, too me it feels unnecessary too. Would love to hear what they are waiting for though, perhaps we are missing something? Or is it network?

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
wsnipex Offline
Team-Kodi
Posts: 6,385
Joined: Jun 2011
Reputation: 165
Post: #8
mostly network. This can be done much cleaner in upstart/systemd
find quote
Martijn Offline
Team Kodi
Posts: 16,923
Joined: Jul 2011
Reputation: 310
Location: Dawn of time
Post: #9
(2015-02-12 13:25)wsnipex Wrote:  mostly network. This can be done much cleaner in upstart/systemd

or in Kodi itself on startup Smile
Similar option is also available on Windows and there we don't have systemd or startup.

wait till network is ready when you use some networking stuff and show on splash that it is waiting till network is up and press key to skip.

Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
(This post was last modified: 2015-02-12 13:28 by Martijn.)
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,548
Joined: Dec 2007
Reputation: 17
Post: #10
(2015-02-12 13:27)Martijn Wrote:  or in Kodi itself on startup Smile
Similar option is also available on Windows and there we don't have systemd or startup.

wait till network is ready when you use some networking stuff and show on splash that it is waiting till network is up and press key to skip.

Hmm, I have had a patch for reacting on network like 15 times now it feels like Tongue Keep forgetting to merge it due to some random reason Smile Perhaps I should dust it off once more Tongue

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
Martijn Offline
Team Kodi
Posts: 16,923
Joined: Jul 2011
Reputation: 310
Location: Dawn of time
Post: #11
(2015-02-12 13:52)topfs2 Wrote:  
(2015-02-12 13:27)Martijn Wrote:  or in Kodi itself on startup Smile
Similar option is also available on Windows and there we don't have systemd or startup.

wait till network is ready when you use some networking stuff and show on splash that it is waiting till network is up and press key to skip.

Hmm, I have had a patch for reacting on network like 15 times now it feels like Tongue Keep forgetting to merge it due to some random reason Smile Perhaps I should dust it off once more Tongue
I know several users would be very pleased with that Smile

Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
find quote
xhaggi Offline
Team-Kodi Developer
Posts: 645
Joined: Jul 2012
Reputation: 23
Post: #12
only want to let you know that it is used. but sure it is not necessary as we can do it outside kodi.
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,548
Joined: Dec 2007
Reputation: 17
Post: #13
Initial PR up https://github.com/xbmc/xbmc/pull/6436

EDIT: Thanks xhaggi. Just was interested in why it was used and if we could solve it better Smile

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
(This post was last modified: 2015-02-15 15:53 by topfs2.)
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,548
Joined: Dec 2007
Reputation: 17
Post: #14
(2015-02-10 11:33)Montellese Wrote:  fullscreen and portable are certainly used. No idea about the rest.

BTW, fullscreen? On Linux we default to fullscreen, isn't this the same on windows? Just wondered why its used?

Feels like windowed is more of a developer thing no? Perhaps we should twist the setting? --window ?

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
wsnipex Offline
Team-Kodi
Posts: 6,385
Joined: Jun 2011
Reputation: 165
Post: #15
we default to full screen, but once you set it windowed, it stays like that over restarts. I use that all the time on my desktop to watch TV or listen to music.

So a -fs makes sense to override that
find quote