Hi,
I’m writing a tool in Python to check my mp3 music collection. The code snippet below will find the correct album and now I’d like to get the track list from MusicBrainz but I can’t seem to find a method to do it??
myID3 = eyed3.load("/Users/surfacedetail/Desktop/06 That's Entertainment 2.mp3")
myTitle = myID3.tag.title
myArtist = myID3.tag.artist
myAlbum = myID3.tag.album
musicbrainzngs.set_useragent(‘MusicCheck’,1,contact=‘dave@looktowindward.com’)
musicbrainzngs.set_format(‘json’)
myResult = musicbrainzngs.search_artists(artist=myArtist, type="group", strict=True)
myArtistList = myResult['artists']
myArtistDict = myArtistList[0]
myArtistID = myArtistDict['id']
myResult = musicbrainzngs.get_artist_by_id(id=myArtistID,includes=["release-groups"], release_type=["album", "ep"])
myReleaseGroupDict = myResult['release-groups']
for myReleaseDict in myReleaseGroupDict:
if myReleaseDict['title'] == myAlbum:
myAlbumID = myReleaseDict['id']
print('Matched:', myAlbum, ' AlbumID:',myAlbumID)
Anyone have any ideas?
Thanks a lot
Dave