Kodi Community Forum

Full Version: Yet *another* Kodi+Steam plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3

I've created my first Kodi plugin and would appreciate anyone who could test this and report bugs. I would also appreciate any experienced plugin developers who could offer any constructive criticism or advice on my code.


Why another Kodi+Steam addon? My addon doesn't launch steam, it lists and launches your actual games so you don't even need to go into the Steam program! See link for more screenshots, instructions, etc...

Holy Zeus!!!

This is awesome! Gonna test today and report back some stuffs if needed.

Thanks buddy!
Great add-on!! This is exactly what I have been looking for, just installed and got my library to come up on the first try.

I am having some issues trying to launch a game (under Windows 7 64-bit). I click on the game that I want to launch and can see CMD box come up but it says that C:\Program is an invalid file name. Looks like a simple issue with the full C:\program files (x86)/steam/steam.exe not being passed along.

I tried turning debug mode on the capture the error but nothing is coming up in the log files (do I need to turn Kodi debug on as well).

Thanks again,

Thanks for testing and the feedback.

Rychem28 - Sorry about that. I'm new to both Kodi plugins and Python and don't have a Windows machine to test on. I kinda wondered if your issue was going to happen... Since there is a space in the "Program Files" part of your Steam path the os.system call didn't work (I didn't escape it properly).

The relevant bit is line 80 in the code:

os.system(__addon__.getSetting('steam-path') + ' steam://rungameid/' + id)

I'll take a look at what the proper way to handle that is in Python and have a fix for you tomorrow.

Thanks again, I appreciate the testing.


EDIT: I took a look and it *appears* that I should be replacing line 80 as listed above with this:

subprocess.call([__addon__.getSetting('steam-path'), 'steam://rungameid/' + id])

and then adding this to the top of the file:

import subprocess

I will need to do some more testing on that though. If you have the ability to modify the addon under your Kodi installation and test this I would appreciate hearing how it worked for you.

Did some more testing and seems to work well.

Please check this out and let me know.


Thank you!
Thanks for the update aanderse, you beat me to the changes. Tried the add-on and it is now working on my Windows build.

Thanks again for the great add-on,

Do you know what information gets returned from the API? Is there anything in regards to game description or other info's.


Glad to hear it is working for you. Thank you for letting me know.

The specific API call the plugin makes returns a list of all steam applications in your library including the name of the software, the steam app id of the software, your total play time, and your play time within the last 2 weeks.

For any given steam app id you can make another API call to grab *all* the information you could ever possibly want regarding the game. The name, publisher, developer, release date, achievements, screen shots, videos, description, etc... There are even other API calls you can make to see your progress on each achievement, etc... pretty much anything you could want to know.

Pretty much all I was looking for was adding all of my Steam games to Kodi so I didn't have to go into the Steam ui on my gaming/htpc rig, so as it stands I pretty much consider this plugin feature complete. That being said... I did have fun writing this, so if you have any specific feature requests feel free to post them here or log them on the github page. I can't promise I'll implement everything you want, but if it sounds interesting I might give it a go.
Can you add on github a list of all info and their relative tags tah the addon grab? Because to show yhis infos, the skin need to insert the correct tags. it would be nice have full info about the games showing on skins
Hi Segrath,

I checked and the single API call which returns a list of all games you own only returns the following details:
  • appid - the steam app id to identify the game
  • name - the name of the game
  • playtime_forever - how long you've spent playing the game
  • img_icon_url - desktop icon
  • img_logo_url - small image for the game/app
  • has_community_visible_stats - unsure
So not enough to build everything you want.

As I mentioned there are other API calls you can make for each individual game to grab everything you could possibly want to know. The problem with that is for large libraries it is incredibly slow to hit that API for every single game in the library.

It would be great if in a future version of Kodi a Games library API existed much like the Television, Movie, and Music libraries exist. Then plugins could much more easily create a full experience that you're looking for. Properly implementing some sort of caching system is more work than I'm interested in doing at the moment. A popup dialog accessible via a context menu that showed some information would be pretty easy and fast.

Version 0.4.0

After using this plugin for a week I realized a "recently played games" menu would be very useful, so that is the big feature in this release.

Using this plugin with a skin that supports custom menus is really the way to go:


I can't stress enough how great it would be if Kodi got real library support for games like it has for tv shows, movies, etc...

Hope everyone enjoys this release.

Hello. How can I set path to "steam executable"? It should be C:\Program Files (x86)\Steam but I do not know how to set this path in addon settings. I am using openelec at Raspberry PI3. Addon loaded my steam library perfectly but I am not able to run game... Thanks for your help!

Sorry I'm away and haven't had much of a chance to reply until now.

If you're running OpenELEC that means you are running Linux so there won't be any Program Files in your Steam path. The path you are looking for includes the executable, so find out where your Steam is located and then put in that path, including the executable itself.

Does that make sense?

PS. I don't think that either a Raspberry PI or OpenELEC can run Steam. Are you sure Steam is installed on your system?
Quite like the plugin, the fact that I don't have to navigate through steam is very nice. I have got a feature request; Is it possible to only list the installed games? I got quite a big library and it is a fuss to find out which games are installed my system. 
The recently played feature does help, but a filter for installed games would be great!
This is a feature that has been requested for a long time now... so I finally got around to it.

I have only tested this on Linux, so I hope it works on Windows. If not, please report back and tell me.

version 0.6.0
Well it would probably work if I had Linux or a Mac, but in Windows there is no such thing as a registry.vdf file as far as I know. Reason being it is stored in the registry.

So I wrote a small (ugly!) program that takes a reg file parses it and outputs a vdf file. However, one problem with the way you are parsing the file is that it is case sensitive. On a mac if I'm correct the key installed is "Installed"  with a capital i. Same goes for the other keys.
I'm quite happy to report it now works for me on a Windows system. However I don't think my solution is a viable one, since every time I install or remove a game I need to convert my reg file to vdf.
Anyway if I had more knowledge of python I could probably improve on your code but as for now, the fastest (1.5 hour) way to get it working was writing an ugly parser in c# Tongue.
Pages: 1 2 3