User avatar
zag
Site Admin
Posts: 182
Joined: Tue Oct 11, 2016 9:43 am

TheMealDB Add-on (Browse Food Recipes in Kodi)

Tue Oct 03, 2017 3:06 pm

TheMealDB Add-on
Image

Description
Browse recipes from http://www.TheMealDB.com website.

Download
http://www.urepo.org/addon/15578
Or via direct download - http://www.urepo.org/zips/script.screen ... -1.0.1.zip

Features
- Browse by Category, Country and ingredient
- Add to favorites
- Search youtube videos (currently not working)
- Screensaver
- Recipe Search

Source
https://github.com/zag2me/script.screensaver.themealdb

Todo
- Fix the video search
- Fix the location of the screenshots folder
- Open up the website for recipe submissions

This is my first python Add-on so be easy on me :)
Much of the credit goes to Enen92 who originally wrote thecocktaildb Add-on. Such nice clean code, it was actually pretty easy to fork and update.

User avatar
zag
Site Admin
Posts: 182
Joined: Tue Oct 11, 2016 9:43 am

Re: TheMealDB Add-on (Browse Food Recipes in Kodi)

Tue Oct 03, 2017 3:09 pm

@robwebset, mind taking a look at the code and making any comments?

It's my first try and although I understand it, i'm sure it could be improved :)

User avatar
robwebset
Site Mod
Posts: 280
Joined: Fri Dec 02, 2016 12:39 pm

Re: TheMealDB Add-on (Browse Food Recipes in Kodi)

Thu Oct 05, 2017 7:09 pm

Hi Zag,

Sorry been very busy, had a very quick glance (will try better later) but my feeling is that it's a good way to learn python and mess about - so I'm certainly not going to criticize and pick holes in your code. What works for you is good!

I did spot the following - but these are only a couple of tips!

  • I would recommend not checking in the .pyo files to your repo :)
  • There are a lot of sleep(200) about (esp. themealdb.py in the root), it's good to avoid these if you can a lot seem to be after a call to xbmc.executebuiltin() - did you know you can make the call blocking so it doesn't return until it completes the task, just add an extra argument "True" at the end.
  • Noticed in the screensaver file that you have a loop waiting for cancel - normally a good idea to also check for xbmc.abortRequested - which is set when the whole of Kodi wants to shut down.
  • In interface.py the else calls meal.py that I couldn't find.

Thanks
Rob

User avatar
zag
Site Admin
Posts: 182
Joined: Tue Oct 11, 2016 9:43 am

Re: TheMealDB Add-on (Browse Food Recipes in Kodi)

Fri Oct 06, 2017 3:39 pm

Perfect, thanks for the feedback.

All makes perfect sense, although I feel I got off lightly there :)

Return to “Add-ons”