Skip to content

Commit

Permalink
bug fixxxx
Browse files Browse the repository at this point in the history
  • Loading branch information
trevordavies095 committed Sep 7, 2022
1 parent ee49c61 commit 9939119
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
musicbrainzngs
prettytable
6 changes: 5 additions & 1 deletion src/MusicBrainz.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ def Search(self, artist, album, year, mb_id=None):

else:
r = mb.get_release_by_id(id=mb_id, includes=["recordings", "artists"])['release']

mb_id = r['id']
artist = r['artist-credit'][0]['artist']['name']
album = r['title']
year = datetime.strptime(r['date'], "%Y-%m-%d").year
try:
year = datetime.strptime(r['date'], "%Y-%m-%d").year
except:
year = r['date']

if r is None: return None

Expand Down
Binary file added src/Musium.db
Binary file not shown.

0 comments on commit 9939119

Please sign in to comment.