fixes urbandictionary api change

recent change to the way the urbandictionary API works necessitates setting results manually for some cases
This commit is contained in:
cottongin 2018-09-01 18:08:30 -05:00 committed by GitHub
parent ba3741c5fa
commit f0412d5d72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,9 @@ class UrbanDictionary(callbacks.Plugin):
return
# process json.
results = jsondata.get('result_type') # exact, no_results, fulltext .
if not results:
# assume exact i guess...
results = 'exact'
definitions = jsondata.get('list')
# prep output now depending on results.
if results == "exact": # we did not find anything.