diff --git a/badwitch.py b/badwitch.py index 0f5976b..7b02ab1 100755 --- a/badwitch.py +++ b/badwitch.py @@ -335,8 +335,10 @@ class BadWitch: album = entries[i]['album'] # Sometimes this just comes back None if 'release_date' in entries[i] and entries[i]['release_date'] is not None and 'release_date' not in metadata: - print('Detected release date ' + entries[i]['release_date']) - metadata['release_date'] = entries[i]['release_date'] + metadata['release_date'] = str(entries[i]['release_date']) + # Format up into a more proper date + metadata['release_date'] = metadata['release_date'][:4] + '-' + metadata['release_date'][4:6] + '-' + metadata['release_date'][6:] + print('Detected release date ' + metadata['release_date']) # If YouTube's song tags didn't work, just grab metadata from the playlist if album == '': album = result['title']