any jokes regardless of other categories as long as any is in list

This commit is contained in:
Justin 2023-07-12 22:50:06 +08:00 committed by GitHub
parent 249d3d1992
commit cbe1a81fa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -819,7 +819,10 @@ def updateJokes(api_key, logf):
except:
jokes_settings = {"feature": "Jokes", "speed": "medium", "speed2": "medium", "animation": "up", "title": true, "categories": ["Any"], "blacklist": [], "amount": "5", "jokes": []}
try:
categories = ','.join(jokes_settings['categories'])
if 'Any' in jokes_settings['categories']:
categories = 'Any'
else:
categories = ','.join(jokes_settings['categories'])
blacklist = ','.join(jokes_settings['blacklist'])
amount = jokes_settings['amount']
jokes_settings['jokes'] = []