<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>401894</bug_id>
          
          <creation_ts>2018-12-08 18:02:25 +0000</creation_ts>
          <short_desc>IMBD Rating not parsed from IMBD website</short_desc>
          <delta_ts>2019-01-05 02:06:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>tellico</product>
          <component>general</component>
          <version>3.1.3</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alessandro Russo">axela74</reporter>
          <assigned_to name="Robby Stephenson">robby</assigned_to>
          
          
          <cf_commitlink>https://commits.kde.org/tellico/509d339f81d05a00e73d037102db20c56c8db42a</cf_commitlink>
          <cf_versionfixedin>3.1.5</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1825264</commentid>
    <comment_count>0</comment_count>
    <who name="Alessandro Russo">axela74</who>
    <bug_when>2018-12-08 18:02:25 +0000</bug_when>
    <thetext>SUMMARY


STEPS TO REPRODUCE
1. Search a film on IMBD
2. Select one result
3. Add element. In the database the IMDB rating field remains empty

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1825311</commentid>
    <comment_count>1</comment_count>
    <who name="Robby Stephenson">robby</who>
    <bug_when>2018-12-09 02:43:18 +0000</bug_when>
    <thetext>The handful of searches I just did seemed to work correctly. Can you confirm that you have &quot;IMDB Rating&quot; checked in the IMDB data source settings to include in results? If you do, could you tell me a specific search and result that is failing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1828189</commentid>
    <comment_count>2</comment_count>
    <who name="Alessandro Russo">axela74</who>
    <bug_when>2018-12-23 16:32:33 +0000</bug_when>
    <thetext>Sorry, I replied to the email but didn&apos;t add a comment on bugs.kde.org.
I&apos;ll do it now.

Yes, it&apos;s set.

I tried to debug a bit the problem.
I wrote the following lines after &quot;bool ok;&quot; (the line 1117 of imdbfetcher.cpp)

      myWarning() &lt;&lt; ratingRx.cap(1) &lt;&lt;&quot;\n&quot;;
      myWarning() &lt;&lt; ratingRx.cap(1).toFloat() &lt;&lt;&quot;\n&quot;;

And for the film Mission Impossible Fallot ( https://www.imdb.com/title/tt4912910/?ref_=nv_sr_1 ) I get:

&quot;7,9&quot;
0

I don&apos;t know why the number is 7,9 instead of 7.9. When I go directly to the imdb webpage I see only 7.9
Can this be a locale problem? My locale is set to italian/italy and here the numbers are written with the comma (7.9 -&gt; 7,9)

For the moment I fixed it with:
      QLocale italian(QLocale::Italian);
      float value = italian.toFloat(ratingRx.cap(1),&amp;ok);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1828316</commentid>
    <comment_count>3</comment_count>
    <who name="Robby Stephenson">robby</who>
    <bug_when>2018-12-24 13:37:28 +0000</bug_when>
    <thetext>Ah, locale would explain it. Thanks for the follow-up details. I&apos;ll check into it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1830396</commentid>
    <comment_count>4</comment_count>
    <who name="Robby Stephenson">robby</who>
    <bug_when>2019-01-05 02:06:07 +0000</bug_when>
    <thetext>Git commit 509d339f81d05a00e73d037102db20c56c8db42a by Robby Stephenson.
Committed on 05/01/2019 at 02:01.
Pushed by rstephenson into branch &apos;3.1&apos;.

Fallback to user&apos;s locale for setting IMDB rating

The IMDB fetcher assumed the decimal point would always be &apos;.&apos; which is
obviously incorrect in many locales. While the IMDB website apparently
always uses the period, fall back to using the default locale to convert
to a float.
FIXED-IN: 3.1.5

M  +4    -0    ChangeLog
M  +3    -0    src/fetch/imdbfetcher.cpp
M  +7    -0    src/tests/imdbfetchertest.cpp
M  +1    -1    src/tests/tellicotest.config

https://commits.kde.org/tellico/509d339f81d05a00e73d037102db20c56c8db42a</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>