Skip to content

Commit

Permalink
Handle missing 'date_updated' key on torrent update (see #86)
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign authored Feb 3, 2023
1 parent 2529f4d commit 4e5b52c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torrt/toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def update_torrents(torrents: Dict[str, dict], remove_outdated: bool = True) ->
tracker_torrent = download_cache[page_url]

else:
raw_last_updated = torrents[rpc_torrent['hash']]['page']['date_updated']
raw_last_updated = torrents[rpc_torrent['hash']]['page'].get('date_updated')
last_updated = datetime.strptime(raw_last_updated, DATETIME_FORMAT) if raw_last_updated else None
tracker_torrent = get_torrent_from_url(page_url, last_updated)
download_cache[page_url] = tracker_torrent
Expand Down

0 comments on commit 4e5b52c

Please sign in to comment.