Insert comma into Listitem.votes?
#1
Hello

Im looking for code to include in includeVariables.xml, that will display vote count with commas in it. My scraper for my movies doesnt include a comma for votes.

e.g.
Would like 1450 to output as 1,450. 125000 as 125,000 and so on for bigger numbers.

Thanks for any info Smile
Reply
#2
(2015-05-15, 17:19)the_bo Wrote: Hello

Im looking for code to include in includeVariables.xml, that will display vote count with commas in it. My scraper for my movies doesnt include a comma for votes.

e.g.
1450 as 1,450. 25000 as 25,000 and so on for bigger numbers.

Thanks for any info Smile

not possible via skinning.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
(2015-05-15, 17:21)phil65 Wrote:
(2015-05-15, 17:19)the_bo Wrote: Hello

Im looking for code to include in includeVariables.xml, that will display vote count with commas in it. My scraper for my movies doesnt include a comma for votes.

e.g.
1450 as 1,450. 25000 as 25,000 and so on for bigger numbers.

Thanks for any info Smile

not possible via skinning.

Hi phil thanks reply.

So is there any other workaround for this?

cheers
Reply
#4
Hundreds of thousands variables. Wink

Or make a script to do it.
Reply
#5
(2015-05-15, 17:30)Hitcher Wrote: Hundreds of thousands variables. Wink

Or make a script to do it.

a script cannot do this on-the-fly without drawbacks.
Modding the scraper would probably make more sense.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#6
(2015-05-15, 17:30)Hitcher Wrote: Hundreds of thousands variables. Wink

Or make a script to do it.

Hundreds of thousands variables just for a comma lol

Is the script difficult to do? Im not very good at coding.

If its too much work i leave it be. Dont want to be stressing over few commas ha Big Grin
Reply
#7
(2015-05-15, 17:34)phil65 Wrote:
(2015-05-15, 17:30)Hitcher Wrote: Hundreds of thousands variables. Wink

Or make a script to do it.

a script cannot do this on-the-fly without drawbacks.
Modding the scraper would probably make more sense.

yeah good idea phil, im using mediaelch for scraping. are u familiar with this scraper and what files i need edit.

cheers
Reply
#8
i don't know much about scrapers, but i don't think they have the ability to modify strings.
they just fetch the info from a website/api and pass the values to kodi.

since mediaelch is not a scraper, but a media manager, you might (and i know see already did) ask over there.

i'm using the moviedb scraper, it it returns the number of votes, including the comma separator.
Image
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
I also never really looked too much into it, but from my experience with APIs it´s hard to imagine that the scrapers itself cannot modify the content to some extent.
this is from scrapers (wiki) wiki:
"A RegExp is a text processing command that takes text in buffer 'input', runs <expression> on it... formats the matches with 'output' and places the result in buffer 'dest'"
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply

Logout Mark Read Team Forum Stats Members Help
Insert comma into Listitem.votes?0