From f139b19d3528eb1a22b460fbb9e870e385c33c4c Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Wed, 2 Jan 2019 12:48:56 -0500 Subject: [PATCH] fix for limit check causing keys_lst to be blank. --- fun/playlist_manager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fun/playlist_manager.py b/fun/playlist_manager.py index 2ad5f90..73f3916 100644 --- a/fun/playlist_manager.py +++ b/fun/playlist_manager.py @@ -620,8 +620,9 @@ if __name__ == "__main__": else: keys_list, title = build_playlist(opts.jbop, libraries, opts.days, opts.top, filters, search) - - if len(keys_list) > opts.limit: + + # Check if limit exist and if it's greater than the pulled list of rating keys + if opts.limit and len(keys_list) > int(opts.limit): keys_list = keys_list[:opts.limit] if opts.name: