Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion scraper.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ def autoChooseBestResult(nodes,t):
return 0

def scanFiles(SystemInfo):
status = "ok"

name=SystemInfo[0]
if name == "scummvm":
global SCUMMVM
Expand Down Expand Up @@ -414,15 +416,22 @@ def scanFiles(SystemInfo):
newgenre.text=genre.strip()
except KeyboardInterrupt:
print "Ctrl+C detected. Closing work now..."
status = "break"
break
except Exception as e:
print "Exception caught! %s" % e
else:
continue
break

if gamelist.find("game") is None:
print "No new games added."
else:
print "{} games added.".format(len(gamelist))
exportList(gamelist)

return status

try:
if os.getuid()==0:
os.environ['HOME']="/home/"+os.getenv("SUDO_USER")
Expand Down Expand Up @@ -454,6 +463,8 @@ def scanFiles(SystemInfo):
sys.exit()
else:
for i,v in enumerate(ES_systems):
scanFiles(ES_systems[i])
result = scanFiles(ES_systems[i])
if result == "break":
break

print "All done!"