Kodi Community Forum

Full Version: Cocktail - A cocktail browser and screensaver for Kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
[Image: icon.png]

This addon let you browse dozens of cocktail recipes, filter by type, glass, alcohol percentage, ingredient and even search youtube videos. It also includes an interactive screensaver to display random drinks, switch drinks and search specific recipes.

Generally screensavers will be closed as soon as you hit any input. This one works a bit diferent by locking a few keys (context menu to search; enter/select to select ingredients and read description, left/right to get random drinks displayed on screen.

Ideal for Kodi Bars (http://forum.kodi.tv/showthread.php?tid=168874).

Powered by the community based cocktail db: http://www.thecocktaildb.com

Licence: GPL V2
Source: https://github.com/enen92/script.screensaver.cocktail
Database thread: http://forum.kodi.tv/showthread.php?tid=...pid2079510
Download: Official repository

Screenshots:

watch gallery


Enjoy your drinks
Nice!
really cool!
Bravo.
Peppe
Yes yes yes!
The plugin is now on the official repository Smile
Got some script error while in screensaver preview and hitting left/right
http://pastebin.com/TrYgs08U
because we only use the first found extension point in addon.xml for our addon manager it might make more sense to switch screensaver/program?
Now you can only install it through screensavers node.
Can't reproduce that error (linux x64 & rpi2). As for the second request, do you mean to set the addon as a script first and a screensaver as the second option? Or is it possible to set two extension points at once?
our addon browser will only read the first extension point and puts the addon under that section for download. So primary usage extension should be first in the addon.xml

i had the errors several times (windows)
You are right the addon is primarily a script/program (screensaver is a plus). I'll try to debug that when my new laptop arrives, thanks for the heads up
Nice work Enen92, check out Martijns video review here Smile



Nice one, subscribed.
Let's play some background music Smile
Looks like this add-on is expontentially growing Smile Awesome!

[Image: tcdb.jpg]
Hi there, I've got a problem getting the screensaver/program to run.

To start with, I have been using it on a couple of Kodi-based HTPCs successfully in the past. But now, on the latest box I've put together, when it launches it shows the splash screen correctly but then simply keeps showing the "Loading" spinner forever and nothing happens.

The box is running on kodibuntu (which is basically Lubuntu 14.04 LTS, 64-bit) and Kodi (updated to ver. 16, Jarvis).
I am suspecting either some kind of Python library level mismatch caused by kodibuntu and/or maybe an issue that came creeping into with the latest Kodi version itself. Anyway, I checked the kodi log and here's what it says (this is also the only part of the log showing errors):

Code:
09:09:18 T:140709594117888   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: invalid literal for int() with base 10: '16117.360095826312'
                                            Traceback (most recent call last):
                                              File "/home/kodi/.kodi/addons/script.screensaver.cocktail/cocktail.py", line 70, in onInit
                                                self.set_random()
                                              File "/home/kodi/.kodi/addons/script.screensaver.cocktail/cocktail.py", line 132, in set_random
                                                if int(cocktails_list[0].id) != self.drink_id:
                                            ValueError: invalid literal for int() with base 10: '16117.360095826312'
                                            -->End of Python script error report<--
09:09:22 T:140710772398080   ERROR: CPythonInvoker(2, /home/kodi/.kodi/addons/script.screensaver.cocktail/cocktail.py): script didn't stop in 5 seconds - let's kill it
09:09:22 T:140710772398080   DEBUG: ------ Window Deinit (Pointer.xml) ------
09:09:26 T:140709638174464   DEBUG: Thread JobWorker 140709638174464 terminating (autodelete)
09:09:36 T:140710772398080   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-x86_64-linux.so)
09:10:03 T:140710772398080   DEBUG: ------ Window Init (Pointer.xml) ------
09:10:03 T:140710772398080   DEBUG: ------ Window Deinit (/home/kodi/.kodi/addons/script.screensaver.cocktail/resources/skins/default/720p/script-cocktail-Cocktailplayer.xml) ------
09:10:03 T:140709594117888   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.SystemExit'>
                                            Error Contents: <NULL>
                                            Traceback (most recent call last):
                                              File "/home/kodi/.kodi/addons/script.screensaver.cocktail/cocktail.py", line 380, in onAction
                                                if not xbmc.getCondVisibility("Control.HasFocus("+str(INGREDIENT_PANEL_CONTROL)+")"):
                                            SystemExit
                                            -->End of Python script error report<--

Looking at the initial error it seems obvious that the values doesn't match the field type of INT. Yet I have no clue how/why this occurs and what it means. On the other hand - if the CocktailDB's API returns data which doesn't match with what the screensaver expects, then I wonder why I am the first to stumble across it as it should be broken for everyone...?

Can someone please give me a pointer as to what I should check/try/change to make some progress on identifying (and ideally, resolving) the problem? Note that I'm not that savvy when it comes to Linux internals though.

Thanks in advance, cheers,
Thomas
In reply to myself, hoping the coders will notice... Smile

I did some spot checks on the JSON returned by the API and it seems that
Code:
http://www.thecocktaildb.com/api/json/v1/1/random.php
always returns a non-integer ID:

Code:
{"drinks":[{"idDrink":"12480.377648730182","strDrink":"Whiskey Sour","strCategory":"Ordinary Drink","strAlcoholic":"Alcoholic","strGlass":"Whiskey sour glass","strInstructions":"Shake blended whiskey, juice of lemon, and powdered sugar with ice and strain into a whiskey sour glass. Decorate with the half-slice of lemon, top with the cherry, and serve.","strDrinkThumb":"http:\/\/www.thecocktaildb.com\/images\/media\/drink\/ttyqqx1439907410.jpg","strIngredient1":"Blended whiskey","strIngredient2":"Lemon","strIngredient3":"Powdered sugar","strIngredient4":"Cherry","strIngredient5":"Lemon","strIngredient6":"","strIngredient7":"","strIngredient8":"","strIngredient9":"","strIngredient10":"","strIngredient11":"","strIngredient12":"","strIngredient13":"","strIngredient14":"","strIngredient15":"","strMeasure1":"2 oz ","strMeasure2":"Juice of 1\/2 ","strMeasure3":"1\/2 tsp ","strMeasure4":"1 ","strMeasure5":"1\/2 slice ","strMeasure6":" ","strMeasure7":" ","strMeasure8":" ","strMeasure9":" ","strMeasure10":" ","strMeasure11":"","strMeasure12":"","strMeasure13":"","strMeasure14":"","strMeasure15":"","dateModified":"2015-08-18 15:16:50"}]}
...so nothing for me to fix here on my own I guess?

Cheers, Thomas
Pages: 1 2
Reference URL's