From 399a62c169aa26dc2c7076d1497da82df36cfd9e Mon Sep 17 00:00:00 2001 From: Jackson Taylor Date: Sun, 7 Aug 2022 09:18:34 -0400 Subject: Handle None year in metadata If the release date was None then it would break and not try to move the file or anything --- jamos | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'jamos') diff --git a/jamos b/jamos index bca6f0c..0783e70 100755 --- a/jamos +++ b/jamos @@ -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() -- cgit v1.2.3