def match_track(artist, title):
 criteria = {'artist': artist.lower().strip(), 'recording': title.lower().strip()}
 if (not any(criteria.values())):
  return
 try:
  res = musicbrainzngs.search_recordings(limit=config['musicbrainz']['searchlimit'].get(int), **criteria)
 except musicbrainzngs.MusicBrainzError as exc:
  raise MusicBrainzAPIError(exc, 'recording search', criteria, traceback.format_exc())
 for recording in res['recording-list']:
  (yield track_info(recording))

def match_track ( artist , title ) : criteria = { 'artist' : artist . lower ( ) . strip ( ) , 'recording' : title . lower ( ) . strip ( ) } if ( not any ( criteria . values ( ) ) ) : return try : res = musicbrainzngs . search_recordings ( limit = config [ 'musicbrainz' ] [ 'searchlimit' ] . get ( int ) , ** criteria ) except musicbrainzngs . MusicBrainzError as exc : raise MusicBrainzAPIError ( exc , 'recording search' , criteria , traceback . format_exc ( ) ) for recording in res [ 'recording-list' ] : ( yield track_info ( recording ) )
searches for a single track and returns an iterable of trackinfo objects .