File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import os
33import requests
44import routing
5+ import shlex
56import subprocess
67import sys
78import time
@@ -142,10 +143,12 @@ def run(id):
142143
143144 return
144145
145- log ('executing ' + __addon__ .getSetting ('steam-path' ) + ' steam://rungameid/' + id )
146+ userArgs = shlex .split (__addon__ .getSetting ('steam-args' ))
147+
148+ log ('executing ' + __addon__ .getSetting ('steam-path' ) + ' ' + __addon__ .getSetting ('steam-args' ) + ' steam://rungameid/' + id )
146149
147150 # https://developer.valvesoftware.com/wiki/Steam_browser_protocol
148- subprocess .call ([__addon__ .getSetting ('steam-path' ), 'steam://rungameid/' + id ])
151+ subprocess .call ([__addon__ .getSetting ('steam-path' )] + userArgs + [ 'steam://rungameid/' + id ])
149152
150153def main ():
151154
Original file line number Diff line number Diff line change 44 <setting id =" steam-id" type =" text" label =" Your Steam user id" />
55 <setting id =" steam-key" type =" text" label =" Your Steam web API key" />
66 <setting id =" steam-path" type =" executable" label =" Path to your Steam executable" />
7+ <setting id =" steam-args" type =" text" label =" Arguments to pass to your Steam executable" />
78</settings >
You can’t perform that action at this time.
0 commit comments