Jump to content

Commas in IMDb votes?


Recommended Posts

Posted (edited)

Emby doesn't add commas when it scrapes votes from the IMDb, which makes it look pretty awful in Kodi. ex: 9.6 (1451346) vs 9.6 (1,451,346)

 

If you change the nfo manually and refresh, Emby doesn't even populate the votes section.

 

 

 

Edit: I should have added that if this ever changes, I'd switch from using Media Companion to Emby in a heartbeat. I just bought the mobile app and I'm loving it. Emby Theater is looking pretty good too.

Edited by GlassJoe
im85288
Posted

Try one of the skins that use the skin helper addon (eg Titan), this sort of info (and a lot more eg IMDB Top 250 for movies/shows) is refreshed regularly.

 

If your query is more to do with how it shows in other Emby clients please post that query in the server section of the forum.

xnappo
Posted

It might be in how we format it when we translate from Emby API to Kodi API.  I'll take a quick look.  (thinking Emby provides it as an int and we convert to string, but don't make it pretty?)

im85288
Posted

Possibly, my main point really was that sort of info is almost redundant as soon as it's scraped (as of course it changes regularly in IMDB) but yes if it is a problem from our side it's worth looking into.

xnappo
Posted

Okay - I took a look.  Looks like the vote count is always a string, and it is not 'pretty formatted' on the server.

 

We could format it in the addon, but best to request 'pretty format' on the server.

 

xnappo

Posted

Are you sure? It is an int in the api json, a number that you can do whatever you like with.

xnappo
Posted

Okay, thanks @@Luke - I didn't see us converting it to str, must be getting done automatically somehow.

Angelblue05
Posted (edited)

We don't do anything to the vote count. Should we really do anything in the add-on, because numbers displays differently in different languages? For example, in French, we use spaces instead of commas. [emoji52]

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Posted

Yea if you can't localize it might be better to not do it at all.

xnappo
Posted

11439572 vs. 311589342 is pretty pointless.  You can not tell by glancing at that which is higher.  11,439,572 vs 311,589,342.

 

We could use Engineering notation :)  11.439Mvotes

Angelblue05
Posted (edited)

I'm surprised this is not handled by Kodi internally, with the label parsing... I wonder how they handle it by default.

 

Edit: I meant the label parsing in the skinning engine.

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
xnappo
Posted (edited)

According to the op, the native Kodi scraper does handle it? 

 

@@GlassJoe - we need you to explain more.

Edited by xnappo
  • Like 1
spootdev
Posted

We don't do anything to the vote count. Should we really do anything in the add-on, because numbers displays differently in different languages? For example, in French, we use spaces instead of commas. [emoji52]

 

 

Sent from my iPhone using Tapatalk

 

import locale

locale.setlocale(locale.LC_ALL, '')

 

locale.format('%d', total_movie_added, True)

Angelblue05
Posted

Want to do a pull request and I'll check it out? Thanks [emoji854]

 

 

Sent from my iPhone using Tapatalk

spootdev
Posted

Hehehe, just an example.  No coding for me this weekend.  Way too little sleep.  :blink:

  • Like 1
xnappo
Posted

I think I have lost track of what we are even talking about.

 

I thought it was this:

        votecount = item.get('VoteCount')

 

But that is always NoneType/None.

 

xnappo

Angelblue05
Posted

How is it always none?

 

 

Sent from my iPhone using Tapatalk

xnappo
Posted

I don't know - I added a print after that line and it is always none for me.

Angelblue05
Posted (edited)

You are right. Nothing is populated in c04 of the database. What the cluck? Looks like VoteCount is missing from the field list. So then, votecount is not the imdb vote count? What is?

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
  • Like 1
xnappo
Posted

Yep, exactly why I am confused!

Angelblue05
Posted

Is this provided by the script skin helper or something?

 

 

Sent from my iPhone using Tapatalk

Guest
This topic is now closed to further replies.
×
×
  • Create New...