You are here

REX - Adding <star-rating> into <desc> ?

11 posts / 0 new
Last post
markovits22
Offline
Donator
Joined: 5 months
Last seen: 6 days
REX - Adding <star-rating> into <desc> ?

Hi guys!
First and foremost I want to point out how great this piece of software is and I'm a huge supporter of Webgrab+!
I've been using it for months now and right now I am diving deep into the world of Rex and MDB which I finally managed to understand I believe. At least up until now haha.
I've made myself some custom Rex and Mdb configs and adapted DaBaschdi's "ratingmapper.pl" perl script for my purposes to replace the numeric value of with full/outline star symbols in order to see the stars in Tivimate. Basically how "Takealug EPG Grabber" for Kodi does this most times depending on the provider or something...
Originally the script didn't work for me - I mean he replaced nothing. Which I suppose is depending of how your xml hierarchy and tags are looking like, as far as I can tell after trying to debug/understand his code.

Anyway, I managed to make it work finally and for showing them in the tag, I would like to know if I can move the tag into the tag or if that's not possible at all. Rex attaches the numeric value only from inside , which is what I want BUT I need the tags also to be there if that's possible.

I left the commented lines in my rex.config so you can see which code I was testing before and to remember the different variations.
It's been a wild ride trying to understand the whole syntax with the brackets ¯\_(ツ)_/¯.

Please help me guys...

mat8861
Offline
WG++ Team memberDonator
Joined: 9 years
Last seen: 2 days

Not sure i understood what you are trying to get, but you can have a look to attached

Attachments: 
Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 20 min

add /a to add the attribute..
<desc>{'country( • )'}{\n\t 'productiondate( • )''episode( • )'}{\n\t 'description(, )'}{'starrating/a(, )'}</desc>
result for starrating..
4.0(Imdb)
or /a+
<desc>{'country( • )'}{\n\t 'productiondate( • )''episode( • )'}{\n\t 'description(, )'}{'starrating/a+(, )'}</desc>
result
4.0(system=Imdb)

markovits22
Offline
Donator
Joined: 5 months
Last seen: 6 days
mat8861 wrote:

Not sure i understood what you are trying to get, but you can have a look to attached

thanks, that's way cleaner and it looks like this now for me (see attached screenshot).
My main question was, if it's possible to move the tags into the tags, restructuring of the hierarchy so to speek.

Check my screenshot attached, there you can see what I originally meant if that didn't come through with my first post. Sorry.

Basically I managed to get the star script that I modified to work:
< star-rating system="Imdb" >
< value>★★★☆☆< /value >
< /star-rating >

And I wanted to know if I can add the < star-rating > into the < desc > tag because my thought was that Tivimate would show the description and the stars at the end of it (and thus interpret it just as a part of the description no matter if they had the < star-rating > tags before as long as it's inside < desc >, plus me having the ability to read the stars inside the xml with getElementsByTagName("value") easily for the ratingmapper script (to change the numeric value to ★☆).

As you can see in the screenshot, I managed to have the rex config adding the < star-rating > even inside the < desc > with < ![CDATA[]] >.
But that's also not what I was looking for. As I don't need the tags to show up in the parsed xml in the browser/iptv app, I just needed the tags inside the xml and handled as such, just on a different place.

But I guess I will have to adapt the ratingmapper script once again, because what I was looking for isn't possible right?

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 20 min

according to your screen shot it should display correctly.
the &lt; and &gt; are encoded < and >
they need to need to be encoded the desc (along with all other) elements uses them.
easy to verify..

markovits22
Offline
Donator
Joined: 5 months
Last seen: 6 days

Thank you all guys!
I did it. That's how I wanted it and it's done. Now I have to adapt the mdb file also but that shouldn't be a problem.

Bildschirmfoto-2024-12-30-um-22-22-18

Bildschirmfoto-2024-12-30-um-22-24-41

Topic can be closed or so! Thanks :)

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 20 min

after looking into the star symbols i found they are html characters.
the ini can be modified to do this without needing external scripts.

markovits22
Offline
Donator
Joined: 5 months
Last seen: 6 days

sweet! thank you very much man.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 20 min

i forgot u also mentioned mdb
this same approach can be used in mdb.ini's.
few adjustments to account for the starrating format is all needed.

markovits22
Offline
Donator
Joined: 5 months
Last seen: 6 days

yeah thanks a lot :)

if I may reactivate this thread of mine for another mdb related question as I'm stuck for days figuring out what's the reason behind this and I'm not getting anywhere sadly.
It seems to be stuck all the time at the same shows/series for what I can tell. The "dots"/progress bar don't move anymore and I hear the fans of my hardware going up so it must be working somehow I suppose - but nothing happens.

First it got stuck at "Vier Frauen und ein Todesfall" anytime and then I figured to change my mdb config back to some earlier version that worked but I get stuck no somewhere else. (see attached)

Not quire sure what's the deal with it. I updated .NET 8.0 and 9.0, switched to Webgrab V5.3.0.6 but nothing seems to work.
Any ideas guys? Thanks a lot already! :)

Attachments: 
Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 20 min

first mdb isnt designed to run on this scale.
2500 movies and almost 11,000 series.you have any idea how long that would take?
if your running webgrab ones a day it wont be done before webrab starts its next update.
example..
5 seconds per movie x 2500 = 208 minutes / 60 = approx 4 hours.
10 seconds per series x 11,000 = 1833 minutes / 60 = approx 30 hours
then there the shows that are checked as both.
these are approx numbers,there will be movies and series that take longer to process thatn the estimated 5 and 10 seconds above.
a good example would be a series like the simpsons.
theres 36 seasons,the number of episodes per seasons varies but i will use a average of 15 episode per season.
36 x 15 = 540 episodes total
mdb has to download 540 pages of data just to try to match a single episode your looking for.
now lets say your source guide.xml has 10 episodes per day of the simpsons.
starting to see the amount od data that has to be downloaded and processed?

zip your.
source guide.xml
mdb config.xml
mdb ini your using.
webgrab log.

and post them here for jan to check.
he's the only one that can debug mdb as he has the source code.

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl