mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-26 07:55:37 +00:00
Fixed removing the games when no favs
This commit is contained in:
parent
14dd1fecbd
commit
91bf85d7d5
|
@ -275,11 +275,12 @@ rdhome=""
|
||||||
roms_folder=""
|
roms_folder=""
|
||||||
|
|
||||||
def create_shortcut_new_new(games):
|
def create_shortcut_new_new(games):
|
||||||
|
ignore_game=rdhome+"/.sync/IGNORE.sh"
|
||||||
old_games=os.listdir(rdhome+"/.sync/").copy()
|
old_games=os.listdir(rdhome+"/.sync/").copy()
|
||||||
|
|
||||||
for game in games:
|
for game in games:
|
||||||
try:
|
try:
|
||||||
i=old_games.index(game[0])
|
i=old_games.index(game[0]+".sh")
|
||||||
old_games[i]=0
|
old_games[i]=0
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print(game[0]+" is a new game!")
|
print(game[0]+" is a new game!")
|
||||||
|
@ -306,6 +307,15 @@ def create_shortcut_new_new(games):
|
||||||
if game:
|
if game:
|
||||||
os.remove(rdhome+"/.sync/"+game)
|
os.remove(rdhome+"/.sync/"+game)
|
||||||
|
|
||||||
|
dir=os.listdir(rdhome+"/.sync/")
|
||||||
|
if len(dir)==0:
|
||||||
|
print("No game found, removing all")
|
||||||
|
fl=open(ignore_game,"w")
|
||||||
|
fl.close()
|
||||||
|
os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager remove")
|
||||||
|
os.remove(ignore_game)
|
||||||
|
else:
|
||||||
|
print("Adding the games")
|
||||||
os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager add")
|
os.system("/app/bin/zypak-wrapper /app/srm/steam-rom-manager add")
|
||||||
|
|
||||||
def addToSteam(systems):
|
def addToSteam(systems):
|
||||||
|
|
Loading…
Reference in a new issue