Kodi Community Forum

Full Version: Steam Library Add-on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was looking for an easy way to list and play my Steam games from within Kodi but all I have found was dead or to complicated so I wrote a small Add-on myself.

With this Add-on you can browse and start your locally installed Steam games. It is completely file-system based, with the option to download game thumbnails directly from the steam cdn.
It does not call any Steam APIs so it should work on all platforms that are supported by Steam itself. I only have a Windows 10 system and don't have time to setup a Linux VM so if you test it on another platform please leave some feedback .

You can find further information and the code on GitHub: https://github.com/julr/plugin.program.steam.library

This is not my first Python project but it is the first Kodi Add-on I wrote and the first time I published anything via GitHub. Any feedback is appreciated.
I've given this a test (albeit very quick), and would like to say very good work. It enhances the functionality provided by Teeedub's Steam add-on, but there is a problem with this version, if your sound device is running in WASAPI mode with Kodi.

If the above is true, Kodi needs to be killed, prior to a game launching. Because in WASAPI mode, by default Kodi will hog control of the primary sound device (Exclusive Mode). Any activity within kodi will "re-activate" it's control of that sound device, even if a 1-minute timeout is specified. This means that if Kodi is still running in the background, when the game launches, it won't be able to access the sound device, and will simply hang, waiting for the sound device to become available. I tried this on two of my favourite games (CoH and CoH 2).

Also, since Kodi runs under DirectX (AFAIK) it will rob the launched game of resources.

I would assume (Although I'm not going to mess with my sound settings in Kodi, to clarify it) that running Kodi in DirectSound mode would probably work, but anything played in DirectSound on Kodi sounds hideous compared to WASAPI. An option (and an associated timeout) needs to be present to kill Kodi to launch either Steam, or the game via direct-link within your add-on, then re-launch Kodi once the game (or Steam) exits, like Teeedub's add-on does. Otherwise, disabling the option in sound settings to allow "Applications to take exclusive control of this device" for the sound card / chip will be necessary. However, I have experienced instability with Kodi, when this option is set in prior versions.

I like the add-on, but as it stands, it's not usable for me.
Thanks for your test.
I was not aware of the sound problem since I have disabled exclusive mode by default. I will look into it but closing Kodi means that I need a child process handling the game launch which would require an extra binary or a script (with the fitting interpreter).
The need for exclusive mode might be unique to my specific setup, but I get a lot of instability which pretty much disappears with exclusive mode on. At the end of the day, my HTPC is gaming-capable, but it's a bonus feature. The primary focus of the system is media consumption. I'll try running it on one of my other systems with exclusive mode off and see how that pans out.
I like the idea of this addon. I've been using advanced emulator launcher on Windows 10, and it's mostly met my needs, though it requires a lot of maintenance when adding games.  I have a couple of questions about the scope of this project. Will this remain Steam only, or do you envision this as a front end for older retail games, Origin, Uplay, Battle.net, GOG, Windows Store, etc.? I see you pull Steam appid's to launch games, and at least 4 of those 5 also have game id's that can launch games. My setup uses batch files to launch those game IDs. Do you plan to allow custom art in the future?
To be honest this was a "lazy Sunday" project since my HTPC setup is not ready yet but I was looking into adding my Steam library to Kodi. The current focus is Steam, especially adding the capability for In-Home Streaming since my setup will likely not be able to run anything more than some smaller indie titles.

I will also look into the problems reported by gibxxi when I get around updating this Add-on. 

I don't have any plans on adding "generic game support" but I haven't used Advances Emulation Launcher yet (as I said my HTPC is not ready). If it is to inconvenient I might create my own solution.
Literally been searching days for something like this, everything else has been overly complicated, with very little payoff, and although this isn't 100% what I've been looking for, it does alot more for me than the rest, with alot less effort and headache. THANK YOU
This works perfectly, simple and on point, love it. Kudos @JulianR for this fantastic addon.

I do have one question however.... is it possible for the addon to fetch proper posters from steam library for the games? Currently it shows fanart image and gets cropped horribly in thumbnail or poster mode.

Here are screenshots for reference...

Steam App, Posters

Steam Library Addon, Thumbnail view

Steam Library Addon, Widget, Poster view
If @JulianR is ok, I'd be ok to try to make a few updates on that, and maybe see that could work together with Advanced Emulator Launcher. Or to extend to the Epic Store for example.
Unfortunately this has stopped working with KODI Nexus. Sad