mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
merge #427 - fix: albums from 1970 using last modified date instead of album release date
This commit is contained in:
committed by
GitHub
parent
84af418d15
commit
e9a4c1e11a
@@ -182,6 +182,10 @@ def get_tags(filepath: str, config: UserConfig) -> dict:
|
||||
else:
|
||||
other = {}
|
||||
|
||||
date = parse_date(tags.year or "")
|
||||
if date is None:
|
||||
date = int(last_mod)
|
||||
|
||||
metadata: dict[str, Any] = {
|
||||
"album": tags.album,
|
||||
"albumartists": tags.albumartist,
|
||||
@@ -197,7 +201,7 @@ def get_tags(filepath: str, config: UserConfig) -> dict:
|
||||
"genres": tags.genre,
|
||||
"copyright": " ".join(other.get("copyright", [])), # INFO: Extract copyright from extra data
|
||||
"extra": {},
|
||||
"date": parse_date(tags.year or "") or int(last_mod)
|
||||
"date": date
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user