Kodi Community Forum
[RELEASE] - Rating Update v1.4.3 - 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] - Rating Update v1.4.3 (/showthread.php?tid=107331)

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 30 31 32 33 34 35 36 37 38 39 40


RE: [RELEASE] - Rating Update - Vaikin - 2012-08-18

This script updates all the ratings and votes. Unfortunately, IMDB does not have an api, so you need to use php-cgi to retrieve the values and then update XBMCs database. So, go read the first page and follow the instructions. There's no coding involved, just installing php-cgi and then running the addon.


RE: [RELEASE] - Rating Update - solidsatras - 2012-08-19

(2012-08-18, 20:44)skullmonkey Wrote: Still dont get it.
Well, you have to live with the incorrect ratings then.



RE: [RELEASE] - Rating Update - dreamkp - 2012-08-31

Hello m4x1m,

i have a problem with some movies not getting updated properly.

e.g.:
http://www.imdb.com/title/tt0349047/ or http://www.imdb.com/title/tt0110912/

Log:
15:53:39 T:2024 DEBUG: [Rating Update] - Exec: "C:/automation/php5/php-cgi.exe" -q C:\xbmc_frodo\portable_data\addons\script.ratingupdate\resources\lib\php\ratings.php -d mid=tt0349047
15:53:39 T:2024 DEBUG: [Rating Update] - Data: {"Rating":"0","Votes":"5,972","Response":"True"}
15:53:39 T:2024 NOTICE: [Rating Update] - (T)Raumschiff Surprise - Periode 1: wurde aktualisiert zu 0 mit 5,972 Stimmen!

Happens with a few hundreds of movies. When updated with 0 i have a rating of "not available" in xbmc afterwards. Ratings have been fine before runnning the script.
Any ideas? Can I provide more detailed info?

Regards,
Maikl


RE: [RELEASE] - Rating Update - m4x1m - 2012-08-31

(2012-08-31, 15:32)dreamkp Wrote: Hello m4x1m,

i have a problem with some movies not getting updated properly.

e.g.:
http://www.imdb.com/title/tt0349047/ or http://www.imdb.com/title/tt0110912/

Log:
15:53:39 T:2024 DEBUG: [Rating Update] - Exec: "C:/automation/php5/php-cgi.exe" -q C:\xbmc_frodo\portable_data\addons\script.ratingupdate\resources\lib\php\ratings.php -d mid=tt0349047
15:53:39 T:2024 DEBUG: [Rating Update] - Data: {"Rating":"0","Votes":"5,972","Response":"True"}
15:53:39 T:2024 NOTICE: [Rating Update] - (T)Raumschiff Surprise - Periode 1: wurde aktualisiert zu 0 mit 5,972 Stimmen!

Happens with a few hundreds of movies. When updated with 0 i have a rating of "not available" in xbmc afterwards. Ratings have been fine before runnning the script.
Any ideas? Can I provide more detailed info?

Regards,
Maikl

There is a problem with the imdbphp class, I've tried with the latest version but it doesn't work, we have to wait, I'm sorry!

http://www.izzysoft.de/software/demos/imdbphp/ ... Here you can try yourself, the rating voice isn't in the list!


RE: [RELEASE] - Rating Update - dreamkp - 2012-09-01

(2012-08-31, 19:52)m4x1m Wrote:
(2012-08-31, 15:32)dreamkp Wrote: Hello m4x1m,

i have a problem with some movies not getting updated properly.

e.g.:
http://www.imdb.com/title/tt0349047/ or http://www.imdb.com/title/tt0110912/

Log:
15:53:39 T:2024 DEBUG: [Rating Update] - Exec: "C:/automation/php5/php-cgi.exe" -q C:\xbmc_frodo\portable_data\addons\script.ratingupdate\resources\lib\php\ratings.php -d mid=tt0349047
15:53:39 T:2024 DEBUG: [Rating Update] - Data: {"Rating":"0","Votes":"5,972","Response":"True"}
15:53:39 T:2024 NOTICE: [Rating Update] - (T)Raumschiff Surprise - Periode 1: wurde aktualisiert zu 0 mit 5,972 Stimmen!

Happens with a few hundreds of movies. When updated with 0 i have a rating of "not available" in xbmc afterwards. Ratings have been fine before runnning the script.
Any ideas? Can I provide more detailed info?

Regards,
Maikl

There is a problem with the imdbphp class, I've tried with the latest version but it doesn't work, we have to wait, I'm sorry!

http://www.izzysoft.de/software/demos/imdbphp/ ... Here you can try yourself, the rating voice isn't in the list!

thanks for info. it's working again. good timing Wink

regards,
maikl




RE: [RELEASE] - Rating Update - tuckbodi - 2012-09-12

Hi m4x1m, great addon and has been very helpful! Just started using it and I'm seeing a couple of issues with some movies, which I was hoping you could help explain.

Looking at the IMDB Top 250 list (refreshed immediately after running your script), I can see City Lights and Modern Times, but they keep getting their 250 rating removed by your addon. I can manually edit the .nfo files, rescan them in, but when I rerun your addon, they again get removed.

From the log, all the other updates (and the 3rd removal) were correct, just these two movies. I checked the naming and their IMDb #'s appear to be correct in the .nfo also.

Thoughts / Suggestions?

I'm comparing to: http://www.imdb.com/chart/top

10:05:37 T:2962833408 NOTICE: [Rating Update] - Modern Times: was removed because no more in IMDb Top250!
10:05:37 T:2962833408 NOTICE: [Rating Update] - City Lights: was removed because no more in IMDb Top250!
10:05:37 T:2962833408 NOTICE: [Rating Update] - Movies IMDb Top250 summary: 6 were updated, 0 were added and 3 were removed!


RE: [RELEASE] - Rating Update - m4x1m - 2012-09-13

(2012-09-12, 18:51)tuckbodi Wrote: Hi m4x1m, great addon and has been very helpful! Just started using it and I'm seeing a couple of issues with some movies, which I was hoping you could help explain.

Looking at the IMDB Top 250 list (refreshed immediately after running your script), I can see City Lights and Modern Times, but they keep getting their 250 rating removed by your addon. I can manually edit the .nfo files, rescan them in, but when I rerun your addon, they again get removed.

From the log, all the other updates (and the 3rd removal) were correct, just these two movies. I checked the naming and their IMDb #'s appear to be correct in the .nfo also.

Thoughts / Suggestions?

I'm comparing to: http://www.imdb.com/chart/top

10:05:37 T:2962833408 NOTICE: [Rating Update] - Modern Times: was removed because no more in IMDb Top250!
10:05:37 T:2962833408 NOTICE: [Rating Update] - City Lights: was removed because no more in IMDb Top250!
10:05:37 T:2962833408 NOTICE: [Rating Update] - Movies IMDb Top250 summary: 6 were updated, 0 were added and 3 were removed!

It's very strange.

Could you post the Missing_TOP250.txt that are in .xbmc/userdata/addon_data/script.ratingupdate/ and you should make sure that there is actually in the XBMC database the iMDB ID reference.



RE: [RELEASE] - Rating Update - tuckbodi - 2012-09-13

Hmm, interesting. Looking at the Missing_TOP250.txt I noticed it was a lot of movies I had recently added a few weeks ago, including the two above. Looking at column c09 in the movie table of my MySQL DB, also showed these as being NULL.

As a test, I removed the movie from XBMC and deleted the .nfo file and images. I then re-scraped using the latest version of ViMediaManager and then rescanned the movie back into XBMC. Initially XBMC was showing the rank as the wrong # (another ViMM issue I think) but I was able to run your Rating Update, and it updated it to the correct ranking.

All in all, I'm thinking it was an issue with the scraper awhile back (which I had some other issues with) and I'll contact the developer about. Thanks for the help and awesome addon!


RE: [RELEASE] - Rating Update - m4x1m - 2012-09-14

(2012-09-13, 23:54)tuckbodi Wrote: Hmm, interesting. Looking at the Missing_TOP250.txt I noticed it was a lot of movies I had recently added a few weeks ago, including the two above. Looking at column c09 in the movie table of my MySQL DB, also showed these as being NULL.

As a test, I removed the movie from XBMC and deleted the .nfo file and images. I then re-scraped using the latest version of ViMediaManager and then rescanned the movie back into XBMC. Initially XBMC was showing the rank as the wrong # (another ViMM issue I think) but I was able to run your Rating Update, and it updated it to the correct ranking.

All in all, I'm thinking it was an issue with the scraper awhile back (which I had some other issues with) and I'll contact the developer about. Thanks for the help and awesome addon!

OK! Remember that the script only works for movies scraped from IMDb site, if ViMM (I don't know how work this software) uses another site to get information probably the IMDb ID will be missed.


RE: [RELEASE] - Rating Update - threldor - 2012-10-02

Hi m4x1m, great addon, it powered through my 1000+ movie collection easily.

I have a question regarding the Missing_TOP250.txt file. This does work for me and create the list however it is in Estonian. I would prefer the language of the list to be in the either English or the original title of the movie and not the IP location language (in this case Estonian). Is there a setting that I missed which will enable this?

I did browse the imdb website and hey said that
"if you access the site through the following URL, you will always see films listed under their original titles regardless of your login status or site preferences" http://akas.imdb.com

Could I possibly modify the code to use this url for the top 250 check? If so is this just in the imdbcharts.class.php file or also in others?




RE: [RELEASE] - Rating Update - m4x1m - 2012-10-03

(2012-10-02, 10:04)threldor Wrote: Hi m4x1m, great addon, it powered through my 1000+ movie collection easily.

I have a question regarding the Missing_TOP250.txt file. This does work for me and create the list however it is in Estonian. I would prefer the language of the list to be in the either English or the original title of the movie and not the IP location language (in this case Estonian). Is there a setting that I missed which will enable this?

I did browse the imdb website and hey said that
"if you access the site through the following URL, you will always see films listed under their original titles regardless of your login status or site preferences" http://akas.imdb.com

Could I possibly modify the code to use this url for the top 250 check? If so is this just in the imdbcharts.class.php file or also in others?

imdbcharts.class.php

from:
var $chartspage = "http://www.imdb.com/chart/top";

to:
var $chartspage = "http://akas.imdb.com/chart/top";

should be enough, you can try safely!


RE: [RELEASE] - Rating Update - threldor - 2012-10-04

(2012-10-03, 11:05)m4x1m Wrote: imdbcharts.class.php

from:
var $chartspage = "http://www.imdb.com/chart/top";

to:
var $chartspage = "http://akas.imdb.com/chart/top";

should be enough, you can try safely!

Worked a treat. Thanks.


RE: [RELEASE] - Rating Update - threldor - 2012-10-10

I really wanted to import my Missing_TOP250.txt list into couch potato and didn't really want to do it manually as I am missing a lot. I thought about modifying the rating update script to talk to the couch potato API but realised this was way out of my league.
So instead I copied one of the couch potato automation sections and made this which when enabled in settings automation in couch potato will add the TOP250 list which rating update creates. I just used a regular expression to get the imdb ID (tt#######) and add this directly.

to install shutdown couch potato v2 (Only works with v2)
create a folder couchpotato\core\providers\automation\missingtop250
in this folder add these two files __init__.py and main.py
restart couchpotato and change your settings and enable it

once they have been imported I would disable it as there is no point running it every x hours with the other automation scripts.
enjoy


__init__.py
Code:
from .main import missingtop250

def start():
    return missingtop250()

config = [{
    'name': 'missingtop250',
    'groups': [
        {
            'tab': 'automation',
            'name': 'missingtop250_automation',
            'label': 'Missing Top 250',
            'description': 'Import the missing movies from the Missing_top250.txt created by the rating update script in xbmc. File should be the Missing_top250.txt file of one with similar formatting.',
            'options': [
                {
                    'name': 'automation_enabled',
                    'default': False,
                    'type': 'enabler',
                },
                {
                    'name': 'directory',
                    'type': 'directory',
                    'description': 'Directory where the missing top 250 file is saved to.',
                },
                {
                    'name': 'filename',
                    'default': '',
                    'description': 'Name of the missing top 250 file.',
                },
            ],
        },
    ],
}]

and main.py
Code:
from couchpotato.core.helpers.rss import RSS
from couchpotato.core.helpers.variable import md5, getImdb
from couchpotato.core.logger import CPLog
from couchpotato.core.providers.automation.base import Automation
from couchpotato.environment import Env
from dateutil.parser import parse
import time
import traceback
import xml.etree.ElementTree as XMLTree

import os, fileinput, re

log = CPLog(__name__)

class missingtop250(Automation, RSS):

    interval = 1800

    def getIMDBids(self):

        if self.isDisabled():
            return

        movies = []
        
        directory = self.conf('directory')
        filename = self.conf('filename')
        
        if not directory or not os.path.isdir(directory):
            log.error('No directory set for missing top 250 download or incorrect.')
        elif not filename or not os.path.isfile(os.path.join(directory, filename)):
            log.error('No filename set for missing top 250 download or incorrect.')
        else:
        
            uploaded_file = os.path.join(directory, filename)

            try:
                topFile = open(uploaded_file)
                
                for line in topFile:
                    match = re.match('.*(tt\d+).*$', line)
                    if match:
                        imdb = match.group(1)
                        if getImdb(imdb):
                            movies.append(imdb)
                            log.error('Movie added from Missing Top 250: %s', imdb)

                topFile.close()
            except:
                log.error('Failed to open %s: %s', uploaded_file, traceback.format_exc())

        
        return movies



RE: [RELEASE] - Rating Update - timmyj9 - 2012-11-23

any way to get this working under frodo beta 1?


RE: [RELEASE] - Rating Update - m4x1m - 2012-11-23

(2012-11-23, 08:33)timmyj9 Wrote: any way to get this working under frodo beta 1?

New Version:
script.ratingupdate-1.2.5.zip

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

Hasn't been tested extensively, but I think it should work!