Ratings wrong (Math node problem when (comma) is used as decimal seperator -- FIXED) (1 Viewer)

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Re: AW: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.3

    Was the , seperator fixed yet?

    No, this was semi-fixed on the input side in MovPic, but the output side still needs to be fixed. So the latest editions of MovPic can read localized numbers now, but any futher usage in math nodes leads to problems.

    Star the following issue to stay informed: Issue 608 - moving-pictures - Math Nodes Sometimes Fail to Parse Floating Point Numbers - A movies plugin for the MediaPortal media center application. - Google Project Hosting
     

    drealit

    Portal Pro
    March 15, 2008
    190
    17
    Re: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.4

    Hmmm am I the only one having issues with Single Score + RT % value not working. It seems to only pull score of 0. This is with latest scraper and plugin. I can provide logs later tomorrow. Disabling single score brings in the calculated score...
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Re: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.4

    Hmmm am I the only one having issues with Single Score + RT % value not working. It seems to only pull score of 0. This is with latest scraper and plugin. I can provide logs later tomorrow. Disabling single score brings in the calculated score...

    There is still the problem for users on an OS where (comma) is used as decimal seperator. The MovPic plugin freaks out then on the math stuff. Some of the RT scores still need that math, because they are 5-scale based and MovPic uses a 10-scale rating.

    But it can also be that RT changed their site, so in that case I'll need scraper debug logs. They will allow me to see exactly what is going wrong, so if you can reproduce the problem with that setting enabled, muchas gracias.

    As far as math node issue in MovPic, that is Issue #608, so you can 'star' that one and be kept informed on the progress. It is set for next milestone though, so should hopefully not be long.
     

    drealit

    Portal Pro
    March 15, 2008
    190
    17
    Re: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.4

    Thanks I'll have to get into it tonight after work. Last night I was dealing with a ESXi system that failed to properly power down during a power outage (ugh). From the behavior of it I have a strong feeling it isn't communicating with RT properly since it is literally malfunctions as soon as I switch on that setting. I'll remove some movies and then setup the scraper and readd so that you can see what is going on in the logs.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Re: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.4

    Thanks I'll have to get into it tonight after work. Last night I was dealing with a ESXi system that failed to properly power down during a power outage (ugh). From the behavior of it I have a strong feeling it isn't communicating with RT properly since it is literally malfunctions as soon as I switch on that setting. I'll remove some movies and then setup the scraper and readd so that you can see what is going on in the logs.

    Perfect, and yeah a single movie would be all I need, and actually prefer (The asynchrone multi-thread based import process makes reading logs on import of 2+ movies a lot harder). Just pick one that you know goes wrong, keep MovPic config open, and via Windows Explorer delete the movingpictures.log file. Then sent the movie back to the importer, and once done, verify in details that it indeed imported ratings wrong, zip up the log and attach here :)
     

    drealit

    Portal Pro
    March 15, 2008
    190
    17
    Re: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.4

    Yep I see some kind of error message:
    22-Sep-2011 19:25:06 Error [ ScraperNode]: Error parsing numbers: <divide name="rotten_rating_float" value1="${rotten_rating[0][0]:htmldecode}" value2="10" result_type="float" />

    Code:
    22-Sep-2011 19:24:13  Info [FollwitBackgroundPro]: Removing An Education from follw.it collection 
    22-Sep-2011 19:24:13  Warn [     DatabaseManager]: Tried to delete an uncommited object... 
    22-Sep-2011 19:24:13  Info [        DBLocalMedia]: Removing '\\TOWER\Media\Videos\Films\An Education (2009)\An.Education.2009.1080p.BluRay.DTS.dxva.x264.D-Z0N3.mkv' and associated movie. 
    22-Sep-2011 19:24:24  Info [       MovieImporter]: User reprocessing An.Education.2009.1080p.BluRay.DTS.dxva.x264.D-Z0N3.mkv 
    22-Sep-2011 19:24:25  Info [       MovieImporter]: Auto-approved An.Education.2009.1080p.BluRay.DTS.dxva.x264.D-Z0N3.mkv as "An Education" (2009) 
    22-Sep-2011 19:24:25  Info [       MovieImporter]: Retrieving details for "An Education" 
    22-Sep-2011 19:24:28 Error [         ScraperNode]: Error parsing numbers: <divide name="rotten_rating_float" value1="${rotten_rating[0][0]:htmldecode}" value2="10" result_type="float" /> 
    22-Sep-2011 19:24:29  Info [         DBMovieInfo]: Added cover art for 'An Education' from: \\TOWER\Media\Videos\Films\An Education (2009)\folder.jpg 
    22-Sep-2011 19:24:29  Info [         DBMovieInfo]: Added backdrop for 'An Education' from: I:\MediaPortal Files\thumbs\MovingPictures\Backdrops\FullSize\{An.Education} [1094356667].jpg 
    22-Sep-2011 19:24:29  Info [         DBMovieInfo]: Added backdrop for 'An Education' from: I:\MediaPortal Files\thumbs\MovingPictures\Backdrops\FullSize\{An.Education} [1094356667].jpg 
    22-Sep-2011 19:24:29  Info [FollwitBackgroundPro]: Adding An Education to follw.it Collection 
    22-Sep-2011 19:24:29  Info [       MovieImporter]: Retrieving media information for: An Education 
    22-Sep-2011 19:24:29  Info [       MovieImporter]: Added "An Education" (2009). 
    22-Sep-2011 19:24:41  Info [FollwitBackgroundPro]: Removing An Education from follw.it collection 
    22-Sep-2011 19:24:56  Info [        DBLocalMedia]: Removing '\\TOWER\Media\Videos\Films\An Education (2009)\An.Education.2009.1080p.BluRay.DTS.dxva.x264.D-Z0N3.mkv' and associated movie. 
    22-Sep-2011 19:24:56  Warn [     DatabaseManager]: Tried to delete an uncommited object... 
    22-Sep-2011 19:24:56  Info [       MovieImporter]: Shutting Down Media Scanner Threads... 
    22-Sep-2011 19:24:56  Info [       MovieImporter]: Shutting Down Path Scanner Thread... 
    22-Sep-2011 19:24:56  Info [       MovieImporter]: Stopped MovieImporter 
    22-Sep-2011 19:24:56  Info [       MovieImporter]: Started MovieImporter 
    22-Sep-2011 19:24:56  Info [       MovieImporter]: Initiating full scan on watch folders. 
    22-Sep-2011 19:24:56  Info [       MovieImporter]: Started watching '\\TOWER\Media\Videos\Films' (Network) - Path is now being monitored for changes. 
    22-Sep-2011 19:25:04  Info [        DBImportPath]: Skipping scan for 'D:\': the drive is empty. 
    22-Sep-2011 19:25:04  Info [        DBImportPath]: Skipping scan for 'E:\': the drive is empty. 
    22-Sep-2011 19:25:05  Info [     FileSyncProcess]: File maintenance started in the background. 
    22-Sep-2011 19:25:05  Info [DatabaseMaintenanceM]: Checking for invalid file entries in the database. 
    22-Sep-2011 19:25:05  Info [       MovieImporter]: Auto-approved An.Education.2009.1080p.BluRay.DTS.dxva.x264.D-Z0N3.mkv as "An Education" (2009) 
    22-Sep-2011 19:25:05  Info [       MovieImporter]: Retrieving details for "An Education" 
    22-Sep-2011 19:25:06 Error [         ScraperNode]: Error parsing numbers: <divide name="rotten_rating_float" value1="${rotten_rating[0][0]:htmldecode}" value2="10" result_type="float" /> 
    22-Sep-2011 19:25:06  Info [         DBMovieInfo]: Added cover art for 'An Education' from: \\TOWER\Media\Videos\Films\An Education (2009)\folder.jpg 
    22-Sep-2011 19:25:06  Info [         DBMovieInfo]: Added backdrop for 'An Education' from: I:\MediaPortal Files\thumbs\MovingPictures\Backdrops\FullSize\{An.Education} [1094356667].jpg 
    22-Sep-2011 19:25:06  Info [         DBMovieInfo]: Added backdrop for 'An Education' from: I:\MediaPortal Files\thumbs\MovingPictures\Backdrops\FullSize\{An.Education} [1094356667].jpg 
    22-Sep-2011 19:25:06  Info [FollwitBackgroundPro]: Adding An Education to follw.it Collection 
    22-Sep-2011 19:25:06  Info [       MovieImporter]: Retrieving media information for: An Education 
    22-Sep-2011 19:25:06  Info [       MovieImporter]: Added "An Education" (2009).
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Re: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.4

    Yep I see some kind of error message:
    22-Sep-2011 19:25:06 Error [ ScraperNode]: Error parsing numbers: <divide name="rotten_rating_float" value1="${rotten_rating[0][0]:htmldecode}" value2="10" result_type="float" />

    An Education - Rotten Tomatoes

    All Critics Percentage = 94%
    All Critics Average = 7.8

    Top Critics Percentage = 94%
    Top Critics Average = 7.9

    Audience Percentage = 78%
    Audience Average = 3.7​

    The only scores I can use "as-is" are "All Critics Average" and "Top Critics Average", because all the percentage scores I have to divide by 10, and the "Audience Average" has to be multiplied by factor two.

    So until the MovingPictures bug gets fixed you could switch to one of those average scores.

    However on testing myself on that movie, I noticed only the Audience scores are properly obtained, so it looks like RottenTomatoes has made changes to their website. I'll work on correcting those :)
     

    Merlyn

    Portal Pro
    July 8, 2011
    250
    322
    Home Country
    Germany Germany
    AW: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.5

    Regarding the comma issue... for the percentage values, that just need to be divided by 10, you could do that with a regex...
    something like

    Code:
    <parse name="tmp" input="${rotten_rating}" regex="(\d)?(\d)?(\d)?\%" />
    <if test="${tmp[2]}=0">
        <set name="rating" value="${tmp[0]}${tmp[1]}.${tmp[2]}" /> <!-- we've got all 3 digits, so it must be 100% -->
    </if>
    <if test="${tmp[2]}=">
    	<if test="${tmp[1]}!=">
    			<set name="rating" value="${tmp[0]}.${tmp[1]}" />
    	</if>
    	<if test="${tmp[1]}=">
    			<set name="rating" value="${0.${tmp[0]}" />
    	</if>
    </if>

    Wouldnt that work? (Maybe needs a bit of your regex magic applied ;) ) Just thinking...
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Re: AW: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.5

    Wouldnt that work? (Maybe needs a bit of your regex magic applied ;) ) Just thinking...

    That only solves a small part of the problem, and more math is done, such as doing math on average and multiplying.

    I rather just wait for issue 608 to be fixed, which is set for v1.1.6 (as in next milestone), and focus on adding multi-language support and finishing the IMDb+ plugin to allow auto-update of scraper scripts and MPEI package for easy installation.

    :D though, I always like to stay alert on alternative solutions to the same problem and that was indeed a nice one.
     

    Kossu

    Portal Pro
    June 8, 2008
    109
    0
    Home Country
    Finland Finland
    Re: IMDb+ Scraper (Fix English, Rename+Group, RottenTomatoes, and more) v3.2.5

    Thank you very much for the scraper, forcing Finnish titles was driving me absolutely nuts. I did however end up with the same issue as the other finn (Hell_Angel) talked about with the ratings being way too low. I tried everything I could think of to fix it with regards to settings but no success. Changing the region to UK in Windows fixed it though, so you're right about the floats. Just wanted to give you a heads up. (I used the newest MP, newest StreamedMP and newest scraper, I updated yesterday :p)
     

    Users who are viewing this thread

    Top Bottom