mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
fix: ValueError: year 0 is out of range
This commit is contained in:
@@ -203,7 +203,10 @@ class Album:
|
||||
return
|
||||
|
||||
dates = (int(t.date) for t in tracks if t.date)
|
||||
try:
|
||||
self.date = datetime.datetime.fromtimestamp(min(dates)).year
|
||||
except ValueError:
|
||||
self.date = datetime.datetime.now().year
|
||||
|
||||
def set_count(self, count: int):
|
||||
self.count = count
|
||||
|
||||
Reference in New Issue
Block a user