mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed error when no scrobbles present
This commit is contained in:
parent
3ae30a5226
commit
6644863ca1
@ -442,8 +442,12 @@ def update_medals():
|
||||
|
||||
from database import MEDALS, MEDALS_TRACKS, STAMPS, get_charts_artists, get_charts_tracks
|
||||
|
||||
firstyear = datetime.datetime.utcfromtimestamp(STAMPS[0]).year
|
||||
currentyear = datetime.datetime.utcnow().year
|
||||
try:
|
||||
firstyear = datetime.datetime.utcfromtimestamp(STAMPS[0]).year
|
||||
except:
|
||||
firstyear = currentyear
|
||||
|
||||
|
||||
MEDALS.clear()
|
||||
for year in range(firstyear,currentyear):
|
||||
|
Loading…
Reference in New Issue
Block a user