From 13099bf557d2bfdf9e67b291cba2c26ed9d344d9 Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Sun, 3 Feb 2019 23:08:25 -0500 Subject: [PATCH] make sure random selector has a limit --- fun/playlist_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fun/playlist_manager.py b/fun/playlist_manager.py index 1f9b297..1be87bf 100644 --- a/fun/playlist_manager.py +++ b/fun/playlist_manager.py @@ -418,6 +418,9 @@ def build_playlist(jbop, libraries=None, days=None, top=None, filters=None, sear title = selectors()['custom'].format(custom=title) elif jbop == 'random': + if not limit: + print("Random selector needs a limit. Use --limit.") + exit() try: keys_list = get_content(libraries, jbop, filters, search, limit) except TypeError as e: