What does
Basically updates the ratings and the number of users who have voted of all your movies/tv shows (no single episodes) from imdb and also updates the top250 list.
How it works
Use the IMDbPHP Class locally to retrieve only the actual ratings and top250 without additional data. The XBMC database is only updated if necessary. The searches are made through IMDb ID, if in your database doesn't exist IMDb ID the script will fail. For the TV Shows the first launch could ask you to choose the correct TV Show from a list then the IMDb ID will be written in the database (the edit is possible by activating the option in the add-on settings).
Now with a simple GUI to control the script by menu!
![[Image: ratingUpdate.png]](http://calm-river-6855.herokuapp.com/images/ratingUpdate.png)
To install php-cgi binary see README file or read below
Code:
Linux Ubuntu Users:
- Install php5-cgi "sudo apt-get install php5-cgi".
- For other distributions check the name of package (could be different) and install it.
- Check the correct path (/usr/bin/ by default) in the add-on settings.
Windows Users:
- Download php-cgi from http://windows.php.net/download/ choose the last "VC9 x86 Non Thread Safe" zip package.
- Unzip in C:\php5\ or wherever you like.
- Update the correct path in the add-on settings.
Mac Users:
- Sorry, I don't have a Mac. Search in Google on how to install PHP :-D
- Update the correct path in the add-on settings.
For Skinners:
- To run single Movie update: <onclick>RunScript(script.ratingupdate,Single=Movie)</onclick>
- To run single TV Show update: <onclick>RunScript(script.ratingupdate,Single=TVShow)</onclick>Check what has been done
You can check what has been done looking the xbmc.log. Every notice of the script starts with [Rating Update].
Known Bugs
For the Windows users who have whitespaces in their path the script will not work. For a temporary workaround please refer here.
Pay Attention
For mySql users please pay attention, now you must specify in configuration settings, the number of database version!
Download
script.ratingupdate-1.2.9.zip
Code:
v1.2.9:
- Added Portuguese (Brazil) language. Thanks to Wanilton.
- Little cleanup code.
v1.2.8:
- Improved unicode characters views (I hope).
- Improved searching of TV Show by name (if no result was found, opens keyboard. ESC for skip).
- Print in the XBMC log also movies and tv shows that are already updated.
- Fixed some minor bugs.
v1.2.7:
- Fixed unicode error when scraping a TV Shows.
v1.2.6:
- Updated IMDbPHP Version 2.1.4 to new Version 2.1.6.
v1.2.5:
- Fixed issue for compatibility with Frodo. For mySql users please pay attention, now you must specify in configuration settings, the number of database version!
- Updated IMDbPHP Version 2.1.2 to new Version 2.1.4.
- Others minor bugs fixed.
v1.2.4:
- Fixed error in dbutils.py that prevented to connect to mysql database.
v1.2.3:
- Added positions with leading zeros and year of the movies to the exported file.
v1.2.2:
- Added export of missing movies from the top250 list. Choose the path where to export the txt file in add-on settings otherwise the script will create it in his profile folder.
v1.2.1:
- Added buttons images in media folder for those skins that don't use the default names for these images.
- Added status and latest update date of checks under the icon.
v1.2.0:
- Added German translation. Thanks to solidsatras.
- Fixed typo in english translation.
- Fixed typo in dbutils.py that stopped the script.
v1.1.9:
- Added the ability to scrape a single TV Show (The code for the skinners is in the README file).
- Changed database query method from httpapi to raw for prevent xbmc freezes and added dependency for script.module.myconnpy for mysql users (thanks to ezechiel1917 for the hint).
- Moved 'import json' to 'import simplejson as json' and added dependency for script.module.simplejson to make the script more compatible.
- Solved issue related for double quote in path for the Windows users. This is a temporary hack because if there are whitespaces in the path the script will not work.
- Updated IMDbPHP Version 2.1.0 to new Version 2.1.2.
- Added a simple GUI to control the script by menu (can be disabled).
- Reorganized the resource folder with a different layout.
- Added multilanguage strings (Now is complete). If someone want to add a new language it's welcome.
v1.1.8:
- Added missing quotes to the executable path (To fix issue in MACOS).
v1.1.7:
- Fixed issue related MacOS (I hope, I don't have a MAC to test).
- Added more debug info (visible when debugging is enabled in xbmc: Settings -> System -> Debugging -> Enable debug logging).
v1.1.6:
- Fixed profile folder that doesn't exist on the first launch of the script.
- Fixed error for mysql database that made the script fail.
v1.1.5:
- Added the resume ability when user interrupting the scraping (only for movies and tv shows should also works in background if xbmc crash,
I don't think works when IMDb is unreachable, but not tested).
- Added notify for the actual name of the tv show when you need to choose the correct tv show from the list.
- Added multilanguage strings (Not complete).
- Added in TV Shows number of users who have voted even if the skin doesn't show it.
- Fixed unicode error in TV Shows while scraping.
v1.1.4:
- Fixed problem with damned Windows path (For real).
v1.1.3:
- Reduced the number of queries to the XBMC database.
- Fixed problem with damned Windows path (I hope).
- Fixed some others minor bugs.
v1.1.2:
- Fixed some unicode errors.
- Added more check.
v1.1.1:
- Fixed bug that had blocked access to the IMDb site while scraping a single movie.
- Fixed other some minor bug.
- Improved code and output log.
v1.1.0:
- Changed the method of scraping. IMDbPHP now is run in a local system to prevent the ban of the server IP address by the IMDb staff.
See README file to how to install php-cgi binary.
- Added the ability to scrape ratings of TV Shows (no single episodes, to many differences with thetvdb.com).
The first launch could ask you to choose the correct TV Show from a list then the IMDb ID will be written in the database.
- Changed order of questions: 1. Top250 - 2. Movies - 3. TV Shows
- Fix possible freeze when scraping a single movie. Show result using notifications instead of dialog.ok (I hope)
- Added setting to disable single procedure, confirmation and to hide the progress dialog.
- Added setting to delete IMDb id from TV Shows so you can rescrape and choose another title if the first one chosen was wrong.
v1.0.5:
- Fixed again bug that now was adding -1 to the real position taking from Top250.
v1.0.4:
- Changed IMDb Api, now using imdbphp class (although it'is a little slower but ...) to retrieve only the actual ratings and top250 without additional data.
If anyone knows a good free hosting service, or wants to host the php files (warning: possible increase of traffic), please contact me on the XBMC forum, currently the php class reside on a web space that isn't mine and I can't use it for a long time.
- Improved get_html_source function for rating scraping (now don't stop the process if the api site is unreachable but it will try 5 time then will continue).
- Fixed double log (adding & updated).
- Added the ability to place a button on DialogVideoInfo.xml to retrieve the rating of a single movie.
This is the Run for the skinners: <onclick>RunScript(script.ratingupdate,Single=True)</onclick>
v1.0.3:
- Fixed bug that was adding +1 to the real position taking from Top250.
- Remove fanart image (I don't like anymore).
- Summary result and log information improved.
v1.0.2:
- Fixed print log value for old position for Top250.
- Fixde crash that occurs when api site returns a Parse Error.
v1.0.1:
- Fixed crash that occurs when api site returns N/A.
- Change print log about old and new positions for a clearer understanding.
- Split on two lines print result to fit in gui box.
v1.0.0:
- First script release.
![[Image: sigpic_89488_ea84cd53d774f0e868b713eb0adf873f.jpg]](http://forum.xbmc.org/uploads/signatures//sigpic_89488_ea84cd53d774f0e868b713eb0adf873f.jpg)

love the speed, logs and visual progress of updates. 
Search
Help