Return MBID None for 'Track not found'

This commit is contained in:
Hugo 2020-08-22 00:24:55 +03:00
parent 58fa3094d8
commit 8d784d6417

View file

@ -1592,7 +1592,10 @@ class _Opus(_BaseObject, _Taggable):
def get_mbid(self): def get_mbid(self):
"""Returns the MusicBrainz ID of the album or track.""" """Returns the MusicBrainz ID of the album or track."""
doc = self._request(self.ws_prefix + ".getInfo", cacheable=True) try:
doc = self._request(self.ws_prefix + ".getInfo", cacheable=True)
except WSError:
return None
try: try:
lfm = doc.getElementsByTagName("lfm")[0] lfm = doc.getElementsByTagName("lfm")[0]