From 8e7736554ba82ba4d3f1fe53d0ef452422dd706f Mon Sep 17 00:00:00 2001 From: ssdaniel24 Date: Sat, 7 Dec 2024 13:34:17 +0300 Subject: [PATCH] Fixed stupid bug (read the doc, man!) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks, val. > val │ random.shuffle does not return anything > val │ so: > val │ random.shuffle(items) > val │ return items > val │ I lost count of how many times i made this mistake... --- plugins/RSS/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 797ba1d67..3688fd90c 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -172,7 +172,8 @@ def sort_feed_items(items, order): if order == 'asInFeed': return items elif order == 'random': - return random.shuffle(items) + random.shuffle(items) + return items (key, reverse) = _sort_arguments(order) try: sitems = sorted(items, key=key, reverse=reverse)