Skip to content

Commit

Permalink
Fix update command caused by GOG changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eddie3 authored Apr 12, 2019
1 parent c3f381f commit 87fb751
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gogrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,12 @@ def cmd_update(os_list, lang_list, skipknown, updateonly, id):
info('fetching game product data (page %d)...' % i)
else:
info('fetching game product data (page %d / %d)...' % (i, json_data['totalPages']))
with request(api_url, args={'mediaType': media_type,
'sortBy': 'title', # sort order
'page': str(i)}, delay=0) as data_request:

url = api_url + "?" + urlencode({'mediaType': media_type,
'sortBy': 'title',
'page': str(i)})

with request(url, delay=0) as data_request:
reader = codecs.getreader("utf-8")
try:
json_data = json.load(reader(data_request))
Expand Down

0 comments on commit 87fb751

Please sign in to comment.