def metadata(self, filename):
     debug("Considering " + filename)
     mi = MusicInfo()
     try:
         lookup = MbzTrackLookup(filename)
         mbzuri = lookup.getMbzTrackURI()
         mbzconvert = MbzURIConverter(mbzuri)
         af = AudioFile(urlencode(os.path.basename(filename)))
         mbz = Track(mbzconvert.getURI())
         mbz.available_as = af
         mi.add(af)
         mi.add(mbz)
         self.succeeded += 1
     except MbzLookupException, e:
         error(" - " + e.message)
Example #2
0
 def metadata(self, filename):
     debug("Considering " + filename)
     mi = MusicInfo()
     try:
         lookup = MbzTrackLookup(filename)
         mbzuri = lookup.getMbzTrackURI()
         mbzconvert = MbzURIConverter(mbzuri)
         af = AudioFile(
             urlencode(os.path.basename(filename))
         )  # there is some bug with my os.path.basename settings?
         zitgisturi = mbzconvert.getURI()
         mbid = mbzconvert.getId()
         mbz = Track(zitgisturi)
         mbz.available_as = af  #to link the musicbrainz ID with the local album collection
         mi.add(af)
         mi.add(mbz)
         self.succeeded += 1
     except MbzLookupException, e:
         error(" - " + e.message)