diff options
author | Jackson Taylor <jackson@jacksontaylor.xyz> | 2022-08-07 09:18:34 -0400 |
---|---|---|
committer | Jackson Taylor <jackson@jacksontaylor.xyz> | 2022-08-07 09:18:34 -0400 |
commit | 399a62c169aa26dc2c7076d1497da82df36cfd9e (patch) | |
tree | bd910307d1125993f8e22c4653f392d45a3b81f1 | |
parent | f20d63482029c02890239f70eb7057f696192021 (diff) |
Handle None year in metadata
If the release date was None then it would break and not try to move the
file or anything
-rwxr-xr-x | jamos | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -171,7 +171,8 @@ def get_song_metadata_from_json(json, counter): if ('title' in json.keys()) and (json['title'] is not None): metadata['title'] = json['title'] - if ('release_date' in json.keys()): + if ('release_date' in json.keys() and + json['release_date'] is not None): metadata['year'] = format_youtube_date(json['release_date']) artist_for_filename = metadata['artist'].replace(' ', '_').lower() |