[RELEASE] IMDB Ratings for Movies

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
carmatana Offline
Junior Member
Posts: 37
Joined: Jan 2011
Reputation: 0
Post: #31
Cosmicr,

I tested it on a Mac (10.6) and XBMC 10.1

Seems that it works well, the script updates both rating and votes but found a couple of issues:

a) I have a couple of profiles, each one with its own sources and media info (different databases)

No matter in what profile I am logged on, the script runs over the standard (master) database, not over the logged on profile database.

It would be nice to pick the right database depending on the profile.

b) It does not have any impact to the top250 field. I am not sure if this is part of the scope of the script or no.

c) I had to run several times the script to update my whole collection, it stopped from time to time.

Thanks for sharing your work with other xbmc users.
find quote
frellAn Offline
Senior Member
Posts: 184
Joined: Jul 2010
Reputation: 6
Location: Sweden
Post: #32
Could some nice pythoncoder develop this into a fully working app? This idea is great.
find quote
Gitrian Offline
Junior Member
Posts: 9
Joined: Jan 2011
Reputation: 0
Location: Denmark
Post: #33
I tried it on my Apple-tv and got the same error regarding Ascii-encoding, so I decided to take a look at the source-code to see if I could fix it.

File: default.py

Change line 114 from

Code:
xbmc.executebuiltin('xbmc.Notification(IMDB Ratings,'+title[j]+')')

to

Code:
xbmc.executebuiltin('xbmc.Notification(IMDB Ratings,'+title[j].encode("ascii", "ignore")+')')

I also have some movies in my database with no IMDB-id and it causes the script to put the ratings in the wrong movies.

Change line 122 from

Code:
            j = j + 1

to

Code:
        else:
            print d_notify + title[j].encode("ascii", "ignore") + " doesnt have an IMDB id, skipping"
        j = j + 1
find quote
Evergreen4 Offline
Junior Member
Posts: 25
Joined: Sep 2010
Reputation: 0
Location: Badajoz (Spain)
Post: #34
Cosmicr, this is the script I was waiting for years... any news regarding the windows version?
Thanks a lot for taking the time to develop this tool for us.

Cheers

TV: Pioneer PDP-LX5090H; BD player: Pioneer BDP-LX71; AV receiver: Pioneer SC-LX56-K; CD player: Cambridge Audio Azur 640c; HTPC: ASSRock ION330HT; Game Consoles: Xbox One & Xbox 360 250 GB ("Slim"); Speakers: Focal-Jmlab Chorus S; Sub: Mordaunt-Short MS907W; Universal remote: Logitech Harmony Ultimate.
find quote
n4sa Offline
Junior Member
Posts: 12
Joined: Dec 2011
Reputation: 0
Post: #35
This is the error im getting.. any ideas??

Code:
18:59:10 T:2792  NOTICE: -->Python Interpreter Initialized<--
18:59:10 T:2792   ERROR: C:\Users\Beau\AppData\Roaming\XBMC\addons\script.imdbratings\default.py:16: DeprecationWarning: os.getcwd() currently lies to you so please use addon.getAddonInfo('path') to find the script's root directory and DO NOT make relative path accesses based on the results of 'os.getcwd.'
                                              Addon = xbmcaddon.Addon(id=os.path.basename(os.getcwd()))
18:59:10 T:2792   ERROR: C:\Users\Beau\AppData\Roaming\XBMC\addons\script.imdbratings\default.py:19: DeprecationWarning: os.getcwd() currently lies to you so please use addon.getAddonInfo('path') to find the script's root directory and DO NOT make relative path accesses based on the results of 'os.getcwd.'
                                              script_path = os.getcwd()
18:59:10 T:2792  NOTICE: IMDB Rating Script: Database backed up to C:\Users\Beau\AppData\Roaming\XBMC\addons\script.imdbratings\../../userdata/Database/MyVideos34.db.bak.20120101-1859
18:59:10 T:2792  NOTICE: IMDB Rating Script: So far so good!
18:59:10 T:2792  NOTICE: IMDB Rating Script: Getting ratings for all movies in library...
18:59:10 T:2792  NOTICE: IMDB Rating Script: 129 Movies to update
18:59:10 T:2792  NOTICE: IMDB Rating Script: Opening http://www.imdb.com/title/tt0103639
18:59:10 T:2792   ERROR: Error Type: <type 'exceptions.IndexError'>
18:59:10 T:2792   ERROR: Error Contents: list index out of range
18:59:10 T:2792   ERROR: Traceback (most recent call last):
                                              File "C:\Users\Beau\AppData\Roaming\XBMC\addons\script.imdbratings\default.py", line 112, in <module>
                                                string =  d_notify + title[j] + "(" + str(lid[j]) + ")" + " rating: " + str(rating[0]) + "/10"
                                            IndexError: list index out of range
find quote
krish_2k4 Offline
Fan
Posts: 619
Joined: Aug 2010
Reputation: 9
Post: #36
Evergreen4 Wrote:Cosmicr, this is the script I was waiting for years... any news regarding the windows version?
Thanks a lot for taking the time to develop this tool for us.

Cheers

there is one already.

http://forum.xbmc.org/showthread.php?tid=107331
find quote
probeh Offline
Junior Member
Posts: 15
Joined: Jan 2012
Reputation: 2
Post: #37
The megaupload links are dead, could you please re-upload somewhere else?
Thanks for making this, I just wish I could use it! Laugh
find quote
Eisi2005 Offline
Fan
Posts: 703
Joined: Feb 2011
Reputation: 1
Location: Germany
Post: #38
+1

could anyone please upload the script on an other filehoster ? Thanks

Greets
Eisi
find quote
cosmicr Offline
Senior Member
Posts: 156
Joined: Oct 2010
Reputation: 1
Location: Australia
Post: #39
Hey all, I've re-uploaded the files to a new host, and also included a new version fixing some of the things that have been pointed out. Check out the first post.
(This post was last modified: 2012-02-12 02:38 by cosmicr.)
find quote
cosmicr Offline
Senior Member
Posts: 156
Joined: Oct 2010
Reputation: 1
Location: Australia
Post: #40
Hey All, another update.

I've added MySQL support for those with shared databases. Be warned I couldn't work out a decent way to backup the mysql database first, so be sure you have your own backup.

I've uploaded the code to github, as an experiment since I've never used VCS's before.

It should work on all systems now too.

If you want anything added let me know and I'll see what I can do.
find quote
robwiel Offline
Junior Member
Posts: 8
Joined: Feb 2012
Reputation: 0
Post: #41
does not work for me with portable installation
find quote
Eisi2005 Offline
Fan
Posts: 703
Joined: Feb 2011
Reputation: 1
Location: Germany
Post: #42
@cosmicr

the script does not work for me too. I become a script error and then the message the movie update will take a long time and after 5 seconds the screen close.

Here is a debug log from me.

http://pastebin.com/AW0MNivu

I use XBMC 10.1

Greets
Eisi
find quote
Jaken Offline
Senior Member
Posts: 157
Joined: Nov 2009
Reputation: 0
Post: #43
Could this be extended for updating movies with set information from themoviedb? That would be neat!
find quote
cosmicr Offline
Senior Member
Posts: 156
Joined: Oct 2010
Reputation: 1
Location: Australia
Post: #44
@robwiel & @Eisi2005:

Sorry, the latest update makes it incompatible with Dharma. Eden only from now on. The changes are minimal, so you may be able to edit the source to make it work. Mostly just the path related functions.

@Jaken:
I haven't worked with movie sets before, but this feature could be for another addon. I'll look into it.
find quote
Eisi2005 Offline
Fan
Posts: 703
Joined: Feb 2011
Reputation: 1
Location: Germany
Post: #45
@cosmicr

thx for the answer. I hope Eden final will released in the next weeks, so i could wait and use your script then.

Greets
Eisi
find quote
Post Reply