How can an addon identify OSMC

I would like to know what an addon must check to identify that it is running under osmc. Something “official” and bulletproof/futureproof. Trying “platform.uname()[2]” I see “4.14.78-4-osmc”. Can I trust the “-osmc” suffix?. Is that official?

Any other better way?.

Thanks.

Check /proc/cmdline (user readable).

The presence of osmcdev= will indicate that you are running your add-on on an OSMC system.

Can I ask why you are planning to specifically check if a system is OSMC based?

Sam

Does the “osmcdev=” trick work also on a Vero board?. Has it a “/boot/cmdline.txt” file too?

Sometimes, updating OSMC to Kodi 18 (from 2018-12 to 2019-06, for instance) leaves the OSMC install in a low resolution mode, like 640x480. Ugly as hell. I am thinking about my addon detecting a height<720 and warning the user, but only when it is running under OSMC.

Thanks, Sam.

You should parse /proc/cmdline.
It does work on the Vero.

Cool. Thanks, Sam!.

I’d prefer if you didn’t do this though. If it’s still a big issue, I can look in to resolving this more directly.

Cheers

Sam

There are so many papercut annoyances that this one in particular is not even a blip in my radar :-). I am far more concerned about the lack of kodi stability in general. It crashes for me several times per day, usually just simply siting idle in the main menu. Compiling OSMC version of Kodi with no optimizations and enabling core dumps are on my table for a long time, but C++ is a problem for me. I am an assembler/Python/C guy.

So much in my plate… :frowning:

I love OSMC and Kodi, thought. There is nothing better. Thanks for your time and effort, Sam.