Beispiel #1
0
 def _show_change(self, items=None, info=None,
                  cur_artist='the artist', cur_album='the album',
                  dist=0.1):
     items = items or self.items
     info = info or self.info
     mapping = dict(zip(items, info.tracks))
     commands.show_change(
         cur_artist,
         cur_album,
         autotag.AlbumMatch(0.1, info, mapping, set(), set()),
         color=False,
     )
     return self.io.getoutput().lower()
Beispiel #2
0
 def _show_change(self, items=None, info=None,
                  cur_artist=u'the artist', cur_album=u'the album',
                  dist=0.1):
     items = items or self.items
     info = info or self.info
     mapping = dict(zip(items, info.tracks))
     config['color'] = False
     album_dist = distance(items, info, mapping)
     album_dist._penalties = {'album': [dist]}
     commands.show_change(
         cur_artist,
         cur_album,
         autotag.AlbumMatch(album_dist, info, mapping, set(), set()),
     )
     return self.io.getoutput().lower()
Beispiel #3
0
 def _show_change(self, items=None, info=None,
                  cur_artist=u'the artist', cur_album=u'the album',
                  dist=0.1):
     """Return an unicode string representing the changes"""
     items = items or self.items
     info = info or self.info
     mapping = dict(zip(items, info.tracks))
     config['ui']['color'] = False
     album_dist = distance(items, info, mapping)
     album_dist._penalties = {'album': [dist]}
     commands.show_change(
         cur_artist,
         cur_album,
         autotag.AlbumMatch(album_dist, info, mapping, set(), set()),
     )
     # FIXME decoding shouldn't be done here
     return self.io.getoutput().lower().decode('utf8')