From 78f2003eb015b2ec1b45b695339a0ae28bf08edc Mon Sep 17 00:00:00 2001 From: Philippe Mongeau Date: Sun, 21 Oct 2012 11:39:23 -0400 Subject: [PATCH] simplify the random print code We don't need the 'if opts.album' since we print with the same function and argsuments. --- beetsplug/rdm.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/beetsplug/rdm.py b/beetsplug/rdm.py index 72b338138..6eebba0bd 100644 --- a/beetsplug/rdm.py +++ b/beetsplug/rdm.py @@ -34,12 +34,8 @@ def random_item(lib, config, opts, args): number = min(len(objs), opts.number) objs = random.sample(objs, number) - if opts.album: - for album in objs: - print_obj(album, lib, config, template) - else: - for item in objs: - print_obj(item, lib, config, template) + for item in objs: + print_obj(item, lib, config, template) random_cmd = Subcommand('random', help='chose a random track or album')