mirror of
https://github.com/beetbox/beets.git
synced 2026-02-17 12:56:05 +01:00
random: py26 fix
This commit is contained in:
parent
03a2bedac3
commit
4555d69803
2 changed files with 5 additions and 1 deletions
|
|
@ -40,7 +40,9 @@ def random_item(lib, opts, args):
|
|||
# Group the objects by artist so we can sample from them.
|
||||
key = attrgetter('albumartist')
|
||||
objs.sort(key=key)
|
||||
objs_by_artists = {artist: list(v) for artist, v in groupby(objs, key)}
|
||||
objs_by_artists = {}
|
||||
for artist, v in groupby(objs, key):
|
||||
objs_by_artists[artist] = list(v)
|
||||
|
||||
objs = []
|
||||
for _ in range(opts.number):
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ And some bug fixes:
|
|||
* :doc:`/plugins/scrub`: Handle and log I/O errors.
|
||||
* :doc:`/plugins/lyrics`: The Google backend should now turn up more results.
|
||||
Thanks to Fabrice Laporte.
|
||||
* :doc:`/plugins/random`: Fix compatibility with Python 2.6. Thanks to
|
||||
Matthias Drochner.
|
||||
|
||||
|
||||
1.2.0 (June 5, 2013)
|
||||
|
|
|
|||
Loading…
Reference in a new issue