This Python script automatically imports your INSTALLED Steam games into Sunshine, a game streaming server, complete with grid images for each game.
- Automatically detects installed Steam games
- Fetches game names and grid images from SteamGridDB
- Updates Sunshine's apps.json with Steam games and their grid images
- Handles both new game entries and updates to existing entries
Before you begin, ensure you have met the following requirements:
- Python 3.7 or higher installed
- Sunshine installed and configured
- A SteamGridDB API key (get one from SteamGridDB)
- Clone this repository or download the script.
- Install the required Python libraries: vdf, glob, pillow and requests.
- Windows: You can do this by installing python (https://www.python.org/downloads/), then opening cmd and running the command
py -m pip install vdf
, then glob, then pillow and finally requests. - Linux: You can do this by installing python and pip, then running
python -m pip install -r requirements.txt
in the directory.
Before running the script, you need to configure a few paths and your API key:
- Open the script in a text editor.
- Update the following variables:
library_vdf_path
: Path to your Steam library VDF file, usually found in your main steam installation path. Example:- Windows: D:\Steam\userdata\!USERIDHERE!\config\localconfig.vdf
- Linux: /home/!USERIDHERE!/.local/share/Steam/steamapps/libraryfolders.vdf
apps_json_path
: Path to your Sunshine apps.json file, usually found in your main sunshine installation path. Example:- Windows: C:\Program Files\Sunshine\config\apps.json
- Linux: /home/!USERIDHERE!/.config/sunshine/apps.json
grids_folder
: Path where you want to save the grid images ( I just store mine in c:\grids_folder )STEAMGRIDDB_API_KEY
: Your SteamGridDB API keysteam_exe_path
: Your steam exe path (Linux users can ignore this for now)sunshine_exe_path
: Your sunshine exe path (Linux users can ignore this for now)
To run the script:
- Open a command prompt or terminal.
- Navigate to the directory containing the script.
- Run the script: python Sunshine-App-Automation.py
The script will:
- Detect your installed Steam games
- Fetch grid images for each game
- Update Sunshine's apps.json file with the game information and grid image paths
- If you encounter any "Access Denied" errors, try running the script with administrator privileges.
- Ensure your SteamGridDB API key is correct and has not expired.
- Check that all path variables in the script are correct for your system.
- On Linux, if you are using flatpak, you may need to replace
f"steam steam://rungameid/{app_id}"
withf"flatpak run com.valvesoftware.Steam steam://rungameid/{app_id}"
.
Contributions to improve the script are welcome. Please feel free to submit a Pull Request.
- Sunshine for the game streaming server
- SteamGridDB for providing the grid images