def get_mbid(self):
        """Returns the MusicBrainz ID of the album or track."""

        doc = self._request(self.ws_prefix + ".getInfo", cacheable=True)

        try:
            lfm = doc.getElementsByTagName("lfm")[0]
            opus = next(self._get_children_by_tag_name(lfm, self.ws_prefix))
            mbid = next(self._get_children_by_tag_name(opus, "mbid"))
            return mbid.firstChild.nodeValue
        except StopIteration:
            return None
def get_mbid ( self ) : doc = self . _request ( self . ws_prefix + ".getInfo" , cacheable = True ) try : lfm = doc . getElementsByTagName ( "lfm" ) [ 0 ] opus = next ( self . _get_children_by_tag_name ( lfm , self . ws_prefix ) ) mbid = next ( self . _get_children_by_tag_name ( opus , "mbid" ) ) return mbid . firstChild . nodeValue except StopIteration : return None
Returns the MusicBrainz ID of the album or track.