Kodi Community Forum
[Release] IMDb Update (Movie Ratings + Top250 + MPAA) *Jarvis* - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [Release] IMDb Update (Movie Ratings + Top250 + MPAA) *Jarvis* (/showthread.php?tid=167754)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - MSingh - 2013-07-20

I've been doing some tests and after running the add-on it gives incorrect rating numbers.

I've done 3 tests on the godfather movies.

The Godfather

*BEFORE RUNNING UPDATE*
Image

*IMDB RATINGS*
Image

*AFTER RUNNING UPDATE*
Image


----------------------------------------------------------------------



The Godfather Part II

*BEFORE RUNNING UPDATE*
Image

*IMDB RATINGS
Image

*AFTER RUNNING UPDATE*
Image



Has this happen to anyone else ? So far its for all my movies.

Here is part 3 of the godfather

The Godfather Part III

*BEFORE RUNNING UPDATE*
Image

*IMDB RATING*
Image

*AFTER RUNNING UPDATE*
Image


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - `Black - 2013-07-20

That's probably because the script is using some unofficial imdb api which is not always up to date.


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - popcornmix - 2013-07-20

I get:
Code:
12:49:28 T:2783966304   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: could not convert string to float:
                                            Traceback (most recent call last):
                                              File "/storage/.xbmc/addons/script.imdbupdate/default.py", line 45, in <module>
                                                gui()
                                              File "/storage/.xbmc/addons/script.imdbupdate/default.py", line 18, in gui
                                                stop = Movies().start()
                                              File "/storage/.xbmc/addons/script.imdbupdate/resources/lib/movies.py", line 22, in start
                                                self.startProcess(movies, total)
                                              File "/storage/.xbmc/addons/script.imdbupdate/resources/lib/movies.py", line 59, in startProcess
                                                updated += self.updateMovie(movie)
                                              File "/storage/.xbmc/addons/script.imdbupdate/resources/lib/movies.py", line 81, in updateMovie
                                                elif not(self.shouldUpdate(movie, imdb)):
                                              File "/storage/.xbmc/addons/script.imdbupdate/resources/lib/movies.py", line 90, in shouldUpdate
                                                oldVotes = float(old["votes"].replace(",", ""))
                                            ValueError: could not convert string to float:
                                            -->End of Python script error report<--

At the failure, old contains:
Code:
{u'rating': 0.0, u'imdbnumber': u'tt1606378', u'votes': u'', u'movieid': 1379, u'label': u'A Good Day to Die Hard'}

Looks like you need a check for votes being null.


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - Jandalf - 2013-07-21

(2013-07-20, 04:13)MSingh Wrote: I've been doing some tests and after running the add-on it gives incorrect rating numbers.
(2013-07-20, 14:25)`Black Wrote: That's probably because the script is using some unofficial imdb api which is not always up to date.

yes that's right, I use http://omdbapi.com because it is much (4 times) faster than get the ratings from the IMDb site... I think they are updated once a week.

I will add a comment about this to the opening post.


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - Jandalf - 2013-07-21

(2013-07-20, 14:28)popcornmix Wrote: Looks like you need a check for votes being null.

Thank youSmile

v0.4.2 (2013-07-21):
- Bug fixes
script.imdbupdate-0.4.2.zip


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - SNA0815 - 2013-07-21

i get socket timeouts from time to time...:

Code:
16:47:47 T:2739926080   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'socket.timeout'>
                                            Error Contents: timed out
                                            Traceback (most recent call last):
                                              File "/home/pi/.xbmc/addons/script.imdbupdate/default.py", line 46, in <module>
                                                gui()
                                              File "/home/pi/.xbmc/addons/script.imdbupdate/default.py", line 18, in gui
                                                stop = Movies().start()
                                              File "/home/pi/.xbmc/addons/script.imdbupdate/resources/lib/movies.py", line 22, in start
                                                self.startProcess(movies, total)
                                              File "/home/pi/.xbmc/addons/script.imdbupdate/resources/lib/movies.py", line 59, in startProcess
                                                updated += self.updateMovie(movie)
                                              File "/home/pi/.xbmc/addons/script.imdbupdate/resources/lib/movies.py", line 76, in updateMovie
                                                imdb = imdbMovie(movie["imdbnumber"])
                                              File "/home/pi/.xbmc/addons/script.imdbupdate/resources/lib/imdbMovie.py", line 15, in __init__
                                                self.getData()
                                              File "/home/pi/.xbmc/addons/script.imdbupdate/resources/lib/imdbMovie.py", line 19, in getData
                                                response = urllib2.urlopen("http://www.omdbapi.com/?i=%s" % self.__imdbID)
                                              File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
                                                return _opener.open(url, data, timeout)
                                              File "/usr/lib/python2.7/urllib2.py", line 401, in open
                                                response = self._open(req, data)
                                              File "/usr/lib/python2.7/urllib2.py", line 419, in _open
                                                '_open', req)
                                              File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
                                                result = func(*args)
                                              File "/usr/lib/python2.7/urllib2.py", line 1211, in http_open
                                                return self.do_open(httplib.HTTPConnection, req)
                                              File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
                                                r = h.getresponse(buffering=True)
                                              File "/usr/lib/python2.7/httplib.py", line 1034, in getresponse
                                                response.begin()
                                              File "/usr/lib/python2.7/httplib.py", line 407, in begin
                                                version, status, reason = self._read_status()
                                              File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
                                                line = self.fp.readline()
                                              File "/usr/lib/python2.7/socket.py", line 447, in readline
                                                data = self._sock.recv(self._rbufsize)
                                            timeout: timed out
                                            -->End of Python script error report<--



RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - popcornmix - 2013-07-21

(2013-07-21, 16:51)SNA0815 Wrote: i get socket timeouts from time to time...:

I was getting those yesterday. Seems happier today.


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - Jandalf - 2013-07-21

(2013-07-21, 16:51)SNA0815 Wrote: i get socket timeouts from time to time...:
(2013-07-21, 17:39)popcornmix Wrote: I was getting those yesterday. Seems happier today.

oh, timeout is handled different since Python 2.7. The Error shouldn't appear anymore (couldn't test this), but if you get this error often, maybe the timeout is too short... do you have often internet problems or a bad internet connection? Cause I never got this error.

v0.4.3 (2013-07-21):
- Bug fixes
script.imdbupdate-0.4.3.zip


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - MSingh - 2013-07-21

2nd update in a day ? Also how do plan on updating the TV show episodes ? Because most use thetvdb.com, which some episode naming and specials are not in imdb. just have to make sure its only getting ratings and doesn't change naming, photo album, info Etc...

Also have a feature i think would be cool can have a vote with the team.

as you said after watching a movie we can place a rating. If users rate a movie it gets added to this add-on's database.

so it would be like having a 2nd more realistic rating. also I'm sure few 100's use this add-on.


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - shedrock - 2013-07-22

This release seems to be working great Jandalf. Thanks for all your hard work on this project.

Update: Spoke to fast. Script still failing. I will try and upload the xbmc logs later.

Shedrock


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - SNA0815 - 2013-07-22

(2013-07-21, 20:03)Jandalf Wrote: do you have often internet problems or a bad internet connection? Cause I never got this error.

No, it's 100 MBit/s cable. Version 0.4.3 is running very well with no problems, thank you for fixing!


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - Jandalf - 2013-07-25

(2013-07-21, 20:35)MSingh Wrote: 2nd update in a day ? Also how do plan on updating the TV show episodes ? Because most use thetvdb.com, which some episode naming and specials are not in imdb. just have to make sure its only getting ratings and doesn't change naming, photo album, info Etc...

Also have a feature i think would be cool can have a vote with the team.

as you said after watching a movie we can place a rating. If users rate a movie it gets added to this add-on's database.

so it would be like having a 2nd more realistic rating. also I'm sure few 100's use this add-on.
I will get the rating from IMDb cause thetvdb requires a API key and IMDb has a bigger user base. I will have a look how to get the right naming. I will have no problem to change only the rating...
I was also thinking about a rating add-on for IMDb to vote a movie after watching but this would be a separate add-on which has no high priority.

(2013-07-22, 00:53)shedrock Wrote: This release seems to be working great Jandalf. Thanks for all your hard work on this project.

Update: Spoke to fast. Script still failing. I will try and upload the xbmc logs later.

Shedrock
waiting for your log...

(2013-07-22, 21:45)SNA0815 Wrote: No, it's 100 MBit/s cable. Version 0.4.3 is running very well with no problems, thank you for fixing!
ok, strange because I never got timeouts.


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - Rourke - 2013-08-17

I'd like to thank you for the great addon. It's exactly what I was looking for.

I have one question about the speed of this addon though. I'm a webdeveloper and I used the OMDB API before. I'm surprised it doesn't pull 10 movies a second. Instead it does 1 movie every 1-2 seconds. With a large movie database this is quite a wait. Is there a reason for this?

I'm quite happy this addons already excists, but I was just wondering this.


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - Jandalf - 2013-08-18

(2013-08-17, 22:32)Rourke Wrote: I'd like to thank you for the great addon. It's exactly what I was looking for.

I have one question about the speed of this addon though. I'm a webdeveloper and I used the OMDB API before. I'm surprised it doesn't pull 10 movies a second. Instead it does 1 movie every 1-2 seconds. With a large movie database this is quite a wait. Is there a reason for this?

I'm quite happy this addons already excists, but I was just wondering this.

I use
Code:
response = urllib2.urlopen("http://www.omdbapi.com/?i=tt0499549")
    data = json.loads(response.read().decode('utf8'))
with python and have an average respond time of 300-400ms per movie and the add-on log says 2-3 movies / sec.

with bad look one movie request could take above 1 sec, but this is not often.

what takes time is the update changes to a movie in XBMC, this takes quite long, cause the whole movie will be deleted and reinserted in all tables. I have an idea how to improve this, but for that I need to learn C++ and compiling XBMC and more free time Wink

or do you have an idea how to improve the code above?


RE: [WIP] IMDb Update (Movie Ratings + Top250) *fast* - MacGyver - 2013-08-18

Seems to work great on OpenElec 3.1.5 ION.

Quick question though, is it really "searching" IMDB, or is it using the IMDB id tag stored in the database? I'm worried that if it is really keyword searching from the title that it could be corrupting valid ratings that were based upon the IMDB id from when they were added, with its "best guess" search results. I'm hoping the on-screen display of "Searching" is just for show.

Thanks, by the way.