[RELEASE] - Rating Update v1.3.7

  Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
m4x1m Offline
Fan
Posts: 311
Joined: Mar 2011
Reputation: 22
Location: Italy
Post: #31
Machine-Sanctum Wrote:@m4x1m

Confirmed and working with Eden-November 20 windows build Big Grin

EDIT:
Small bug Wink
One this is when after you have cancelled you get the question dialog if you want to start again.

Confused The script ask you if you want update ratings of all your movies, if not, ask you if you want update the top250, if not, appear the thanks dialog, click ok then exit.

The script ask you two separate question because are two different procedures!Wink

LG M227WD - ASUS S1-AT5NM10E - LOGITECH HARMONY 300i - MINI KEYBOARD USB
Running Ubuntu Precise 12.04.04 - FRODO 12.03 - Transparency!
Movies: 996 - TV Show: 98 - Albums: 1161

My Script: Rating Update - Thumbnails Cleaner
(This post was last modified: 2011-11-23 14:39 by m4x1m.)
find quote
Martijn Offline
Team Kodi
Posts: 11,441
Joined: Jul 2011
Reputation: 165
Location: Dawn of time
Post: #32
m4x1m Wrote:Confused The script ask you if you want update ratings of all your movies, if not, ask you if you want update the top250, if not, appear the thanks dialog, click ok then exit.

The script ask you two separate question because are two different procedures!Wink

Nerd lol sorry i must have misread then. It seemed a little strange to me when you cancel it it will still ask you for updating.
Well then there are no bugs Big Grin

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
m4x1m Offline
Fan
Posts: 311
Joined: Mar 2011
Reputation: 22
Location: Italy
Post: #33
Steveb Wrote:Hi m4x1m, nice script! Just updated the top250 and all the values are out by a factor of +1.
The Shawshank Redemption is rated as 2 instead of 1
Star Wars Episode IV: A New Hope is rated as 18 instead of 17 and so on.

Thanks you're right!

New Version:
script.ratingupdate-1.0.3.zip

Code:
v 1.0.3:
- Fix 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

LG M227WD - ASUS S1-AT5NM10E - LOGITECH HARMONY 300i - MINI KEYBOARD USB
Running Ubuntu Precise 12.04.04 - FRODO 12.03 - Transparency!
Movies: 996 - TV Show: 98 - Albums: 1161

My Script: Rating Update - Thumbnails Cleaner
find quote
m4x1m Offline
Fan
Posts: 311
Joined: Mar 2011
Reputation: 22
Location: Italy
Post: #34
New Version:
script.ratingupdate-1.0.4

Note: I've changed the IMDb Api, but I absolutely need to find a free php web space or someone who offers to host the files, I can not buy a domain with space would cost me too much to keep!

Code:
- 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)
- Fix 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 skinner: <onclick>RunScript(script.ratingupdate,Single=True)</onclick>

LG M227WD - ASUS S1-AT5NM10E - LOGITECH HARMONY 300i - MINI KEYBOARD USB
Running Ubuntu Precise 12.04.04 - FRODO 12.03 - Transparency!
Movies: 996 - TV Show: 98 - Albums: 1161

My Script: Rating Update - Thumbnails Cleaner
(This post was last modified: 2011-11-25 21:50 by m4x1m.)
find quote
Steveb Offline
Fan
Posts: 365
Joined: Oct 2009
Reputation: 10
Location: Adelaide, Australia
Post: #35
Thanks for fixing the +1 bug in the top250, the 1.0.3 ver is working great.
However 1.0.4 ver has a -1 bug in the top250 Big Grin, no biggie I just rolled back to 1.0.3.

Log..
Code:
12:29:04 T:3328  NOTICE: [Rating Update] - 'The Shawshank Redemption': the old position in your DB was 1, the new position from IMDb Top250 is 0
12:29:05 T:3328  NOTICE: [Rating Update] - 'Star Wars: Episode V - The Empire Strikes Back': the old position in your DB was 11, the new position from IMDb Top250 is 10
12:29:06 T:3328  NOTICE: [Rating Update] - 'Star Wars Episode IV - A New Hope': the old position in your DB was 17, the new position from IMDb Top250 is 16
12:29:07 T:3328  NOTICE: [Rating Update] - 'Star Wars: Episode VI - Return of the Jedi': the old position in your DB was 98, the new position from IMDb Top250 is 97
12:29:09 T:3328  NOTICE: [Rating Update] - 'Harry Potter and the Deathly Hallows: Part 2': the old position in your DB was 161, the new position from IMDb Top250 is 183
12:29:10 T:3328  NOTICE: [Rating Update] - 'The Truman Show': the old position in your DB was 216, the new position from IMDb Top250 is 215
12:29:11 T:3328  NOTICE: [Rating Update] - 'The Social Network': the old position in your DB was 226, the new position from IMDb Top250 is 234
Edit: Version 1.0.3 also returned -1 value to the top250 when run for a second time.Eek
(This post was last modified: 2011-11-27 07:06 by Steveb.)
find quote
m4x1m Offline
Fan
Posts: 311
Joined: Mar 2011
Reputation: 22
Location: Italy
Post: #36
Steveb Wrote:Thanks for fixing the +1 bug in the top250, the 1.0.3 ver is working great.
However 1.0.4 ver has a -1 bug in the top250 Big Grin, no biggie I just rolled back to 1.0.3.

Log..
Code:
12:29:04 T:3328  NOTICE: [Rating Update] - 'The Shawshank Redemption': the old position in your DB was 1, the new position from IMDb Top250 is 0
12:29:05 T:3328  NOTICE: [Rating Update] - 'Star Wars: Episode V - The Empire Strikes Back': the old position in your DB was 11, the new position from IMDb Top250 is 10
12:29:06 T:3328  NOTICE: [Rating Update] - 'Star Wars Episode IV - A New Hope': the old position in your DB was 17, the new position from IMDb Top250 is 16
12:29:07 T:3328  NOTICE: [Rating Update] - 'Star Wars: Episode VI - Return of the Jedi': the old position in your DB was 98, the new position from IMDb Top250 is 97
12:29:09 T:3328  NOTICE: [Rating Update] - 'Harry Potter and the Deathly Hallows: Part 2': the old position in your DB was 161, the new position from IMDb Top250 is 183
12:29:10 T:3328  NOTICE: [Rating Update] - 'The Truman Show': the old position in your DB was 216, the new position from IMDb Top250 is 215
12:29:11 T:3328  NOTICE: [Rating Update] - 'The Social Network': the old position in your DB was 226, the new position from IMDb Top250 is 234
Edit: Version 1.0.3 also returned -1 value to the top250 when run for a second time.Eek

Eh eh the api change has modified somethings and I had not noticed!

New Version:
script.ratingupdate-1.0.5.zip

Code:
v 1.0.5:
- Fix again bug that now was adding -1 to the real position taking from Top250

LG M227WD - ASUS S1-AT5NM10E - LOGITECH HARMONY 300i - MINI KEYBOARD USB
Running Ubuntu Precise 12.04.04 - FRODO 12.03 - Transparency!
Movies: 996 - TV Show: 98 - Albums: 1161

My Script: Rating Update - Thumbnails Cleaner
find quote
BigNoid Offline
Team-Kodi Member
Posts: 3,149
Joined: Jul 2010
Reputation: 102
Location: Below sea level
Post: #37
I think you forgot to bump your version number in addon.xml.

Just tried this add-on and works perfect in my library. Thx!
find quote
krish_2k4 Offline
Fan
Posts: 619
Joined: Aug 2010
Reputation: 9
Post: #38
my man! XBMC forums always amaze me! will try this out as ratings for new movies tend to change a lot!

edit: just tried it, smooth as fuck and works very well! I does not update the nfo in the actual movie folder so you have to export video library and choose separate.

edit 2: It updates the ratings but not the number of votes. for instance when I original scraped '2001: A Space Odyssey' it had a IMDB rating of 8.4 with 183,779 votes and was number 89 in the Top250.

the script updated the rating and the Top250 ranking to number 90 but left the number of votes at 183,799 when there are 194,689 votes.

it might just be me though so can anyone else confirm it? I did the export video library to update the native nfo files.
(This post was last modified: 2011-11-27 14:33 by krish_2k4.)
find quote
m4x1m Offline
Fan
Posts: 311
Joined: Mar 2011
Reputation: 22
Location: Italy
Post: #39
krish_2k4 Wrote:edit 2: It updates the ratings but not the number of votes. for instance when I original scraped '2001: A Space Odyssey' it had a IMDB rating of 8.4 with 183,779 votes and was number 89 in the Top250.

the script updated the rating and the Top250 ranking to number 90 but left the number of votes at 183,799 when there are 194,689 votes.

Two separate procedure:

1. Rating (first question) this update rating and numbers of users who have voted

2. Top250 (second question) this update only position

If you say yes only at the second question will update only the position in top250

if you say yes at the first question will update all movies ratings (long)

LG M227WD - ASUS S1-AT5NM10E - LOGITECH HARMONY 300i - MINI KEYBOARD USB
Running Ubuntu Precise 12.04.04 - FRODO 12.03 - Transparency!
Movies: 996 - TV Show: 98 - Albums: 1161

My Script: Rating Update - Thumbnails Cleaner
find quote
Martijn Offline
Team Kodi
Posts: 11,441
Joined: Jul 2011
Reputation: 165
Location: Dawn of time
Post: #40
m4x1m Wrote:Two separate procedure:

1. Rating (first question) this update rating and numbers of users who have voted

2. Top250 (second question) this update only position

If you say yes only at the second question will update only the position in top250

if you say yes at the first question will update all movies ratings (long)
Would it maybe be an idea to set these options in add-on settings?
So user sets his preferences there and you just ask a confirmation on running the add-on.
Coding that only takes a couple of minutes. I could help you on that if you want.

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
krish_2k4 Offline
Fan
Posts: 619
Joined: Aug 2010
Reputation: 9
Post: #41
m4x1m Wrote:Two separate procedure:

1. Rating (first question) this update rating and numbers of users who have voted

2. Top250 (second question) this update only position

If you say yes only at the second question will update only the position in top250

if you say yes at the first question will update all movies ratings (long)

ahh yes got ya, my bad i thought the first option meant update all movie ratings and the 2nd option to update just the top250 movies.

edit: first option updated the views, my bad!
(This post was last modified: 2011-11-27 16:30 by krish_2k4.)
find quote
m4x1m Offline
Fan
Posts: 311
Joined: Mar 2011
Reputation: 22
Location: Italy
Post: #42
Machine-Sanctum Wrote:Would it maybe be an idea to set these options in add-on settings?
So user sets his preferences there and you just ask a confirmation on running the add-on.
Coding that only takes a couple of minutes. I could help you on that if you want.

I'm working on it Big Grin

LG M227WD - ASUS S1-AT5NM10E - LOGITECH HARMONY 300i - MINI KEYBOARD USB
Running Ubuntu Precise 12.04.04 - FRODO 12.03 - Transparency!
Movies: 996 - TV Show: 98 - Albums: 1161

My Script: Rating Update - Thumbnails Cleaner
find quote
JustinAiken Offline
Fan
Posts: 668
Joined: Feb 2007
Reputation: 0
Location: XBMC+Unraid=Happy!
Post: #43
Has anybody tried this on the 10.1 official release? Wondering if anybody's confirmed success/failure before I backup my database and try...

If not, this plugin may be worth moving to pre-Eden for; my top250 playlist is woefully out of date!

XBMC: Frodo 12.2, with Transparency!
17.5 TB Unraid Server: 2500 movies, 8800 episodes of TV Apps: SABnzbd, Sickbeard, Couchpotato, mySQL
HTPC: Win8 (cause Steam), i7 920, ATI 6850 OC
Watching on: Panasonic TC65-PS64 with lowend Sony 5.1 HTIB
find quote
Steveb Offline
Fan
Posts: 365
Joined: Oct 2009
Reputation: 10
Location: Adelaide, Australia
Post: #44
m4x1m Wrote:Eh eh the api change has modified somethings and I had not noticed!

New Version:
script.ratingupdate-1.0.5.zip

Code:
v 1.0.5:
- Fix again bug that now was adding -1 to the real position taking from Top250

Cheers mate, That did the trick, great work.
find quote
m4x1m Offline
Fan
Posts: 311
Joined: Mar 2011
Reputation: 22
Location: Italy
Post: #45
BE CAREFUL

This new version doesn't use anymore an external imdb api site (this week-end I'll delete the files on a server), but use a great imdbphp api class by IzzySoft Projects then to work you must install php-cgi on your system (see README)

Read the changelog for the updates.

I've tested the script as best I could, but there may be some bugs in that case post the debug log.

Code:
Linux Ubuntu Users:
- Install php5-cgi "sudo apt-get install php5-cgi"
- For other distribution check the name of package (could be different) and install it
- Check the correct path (/usr/bin/ by default) in the settings add-on

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 settings add-on (use backslahes for example c:/php5/)


New version (Major release):
script.ratingupdate-1.1.0.zip

Code:
v 1.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.

LG M227WD - ASUS S1-AT5NM10E - LOGITECH HARMONY 300i - MINI KEYBOARD USB
Running Ubuntu Precise 12.04.04 - FRODO 12.03 - Transparency!
Movies: 996 - TV Show: 98 - Albums: 1161

My Script: Rating Update - Thumbnails Cleaner
find quote
Post Reply