handle filenotfound in created_date

+ move store loaders up in populate.py
This commit is contained in:
mungai-njoroge
2023-12-13 23:15:25 +03:00
parent c451c0e329
commit 300c614a2f
7 changed files with 23 additions and 8 deletions
+5 -1
View File
@@ -145,7 +145,11 @@ def get_recently_added_playlist(cutoff: int = 14):
)
tracks = get_recent_tracks(cutoff)
date = datetime.fromtimestamp(tracks[0].created_date)
try:
date = datetime.fromtimestamp(tracks[0].created_date)
except IndexError:
return playlist, []
playlist.last_updated = date_string_to_time_passed(create_new_date(date))
images = get_first_4_images(tracks=tracks)