You are here

Rex config syntax question

38 posts / 0 new
Last post
Nitaro
Offline
Donator
Joined: 2 years
Last seen: 3 weeks
Rex config syntax question

I use webgrabplus with the site.ini from tvdigital.de and copy the grabbed.xml so that tvhaedend can read it with the webgrab++ module. This also works perfectly.
I watch TV via Kodi and tvheadend, everything also works.

With Rex I wanted to change the EPG so that I can see "Series title and episode number" in Kodi. In Rex Config I have the line:

desc'description'{Folge: 'episode(, )'}/desc

I had to delete <> because otherwise it would be displayed incorrectly here.

The problem is, afterwards I only see the episode number. Title and description are gone. Can someone tell me where I am making the mistake in rex.config.xml ?

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

with the old rex/mdb what you have would have worked as expected.
with the newest its different.
if u have..
<desc lang="en">'description'{Episode Name: 'subtitle'}{Fogle: 'episode'}</desc>
result..
<desc lang="en">After a 69-year-old woman is found dead in her bathtub, a suspect leads Tulsa detectives on a high-speed chase that ends tragically.</desc>
<desc lang="en">Episode Name: Below the Surface</desc>
<desc lang="en">Fogle: S26 E6</desc>
what happens is each element is put on a separate description line.
the new way you need to specify the separator you want for each in the element name.
example,use a period as a separator..
<desc lang="en">'description(.)'{Episode Name: 'subtitle(.)'}{Fogle: 'episode(.)'}</desc>
result..
<desc lang="en">After a 69-year-old woman is found dead in her bathtub, a suspect leads Tulsa detectives on a high-speed chase that ends tragically.Episode Name: Below the Surface.Fogle: S26 E6</desc>

btw if you download the documented configuration files from the downloads page it explains the new syntax and also has some examples.

Nitaro
Offline
Donator
Joined: 2 years
Last seen: 3 weeks

Great, it's working again now. Is it also possible to use a space or a pipe as a separator? A minus sign with a space ( - ) did not work.

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

sure,use whatever u wish.
btw remember what docs say..
A separator can only contain 'nonword' characters like , space - _ + | / etc.

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

Great, it's working again now. Is it also possible to use a space or a pipe as a separator? A minus sign with a space ( - ) did not work.

show me ur rex line for this that doesnt work.

Nitaro
Offline
Donator
Joined: 2 years
Last seen: 3 weeks

Here are all the files and what happened when i use ( - ) and ( ).

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

nice.
all i can say jan is jan(owner) took something that was already confusing enough and made it even more confusing.
i already my expressed my dislike.
his mess,he can fix it.
i'm done with rex/mdb.
sent him a msg with link to your post.

edit:
the solution,separators must be the same..
makes no sense to me but whatever...
you should also surround each in { } so if element is empty(episode number info or subtitle in this case) is empty nothing is added.
<sub-title lang="de">{'episode( - )'}{'subtitle( - )'}</sub-title>

Nitaro
Offline
Donator
Joined: 2 years
Last seen: 3 weeks

Thank you very much.
I edited my config. We will see what happened :-)

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 12 years
Last seen: 1 hour
Is the support helpful?
support us

Hi .. sorry for the 'changes' in the rex syntax.
These 'corrected' config lines should give the result you want
'description(, )'{Folge: 'episode(, )'}
'episode( - )''subtitle( - )'

If you use separators , use the same in each source element even if there is nothing to separate .
So add (, ) to description in the first and add ( - ) to subtitle in the second line
Right now, the separators must be the same and added to all source elements .. If you don't specify a separator the default is used which is | and will create separate xml elements for each source element.

Nitaro
Offline
Donator
Joined: 2 years
Last seen: 3 weeks
WGMaker wrote:

So add (, ) to description in the first and add ( - ) to subtitle in the second line
Right now, the separators must be the same and added to all source elements

Confusing
You mean they have to be the same for every source per line, right?

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

well..
the reason jan enclosed the episode info in { } is because it has Fogle: in it.
if it wasnt enclosed in these if the episode value was empty Fogle: [nothing] would be added.
from what i see u dont need them if adding no text to the element like 'subtitle(-)'
and yes for each line like desc the separators must be the same.
in my post above this would also be acceptable..
<sub-title lang="de">'episode( - )''subtitle( - )'</sub-title>

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 12 years
Last seen: 1 hour
Is the support helpful?
support us

Yes ..

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

ok,so if a user did this..
<desc lang="de">'description(, )'{Folge: 'episode(, )'}'episode( - )''subtitle( - )'</desc>
you would end up with..
<desc lang="de">[description], Folgle: [episode number info]</desc>
<desc lang-"de">[episode number info] - [subtitle]</desc>

it would group with same separator together and each group in a separate desc?
this seems weird to me,what if users wish to use a different separator and have result in a single desc tag?
the issue i see with this is desc isnt a multi value element like category?
i have doubts the epg software will load both desc tags,most likely only the first.

edit:
just tried it and my hunch looks correct.
only first desc shows...
in this case shouldnt both desc be combined just like they are with regular scrubbing with index_description/description scrubs?

Nitaro
Offline
Donator
Joined: 2 years
Last seen: 3 weeks

It is very confusing for me, especially as I am not a software developer. I am trying to understand it.
I have tried this:
{'episode( )'}{'subtitle( )'}
But again the subtitle was cut off, see attached files.
From the previous posts I understood that this is correct:
'episode( )''subtitle( )'
Correct ?

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

update to V5.1.2.3
a space works fine for me.
https://github.com/SilentButeo2/webgrabplus-siteinipack/tree/master/eval....
i think i had your same problem with V5.1.2
a work around for just a space that i think worked for me was to use a no-break space rather than a regular one.
you can do with by..
1.holding alt key and enter 0160(i had use keypad,not number keys on top keyboard).
2. in windows,search for character map
when it opens click on the space in the list characters,you will see it say no-break space
at the bottom beside character to copy click select then copy,paste it in your rex config as a space.

or try this i uses no-break spaces in it,dont know if the forums will mess it up when posting though.
{'episode( )'}{'subtitle( )'}

janKO
Offline
Donator
Joined: 10 years
Last seen: 7 hours

How can I use only mdb-actor if exist and if not exist in mdb then use existing actor from my EPG xml file?

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

try 5.2.1.3 from evaulation builds on github.
jan said he did something regarding this.
i didnt have a chance to test it much,only tried it once i think with..
<actor>'mdb-actor''actor'</actor>
if i remember right actors were conbine(no duplicates) if existed in both.
if absent from mdb(i disabled actor scrub) it used the source actors(if present).

janKO
Offline
Donator
Joined: 10 years
Last seen: 7 hours

This is work only if you have actor role in your source xml...I have 100% actor tag in my source but always without actor role... my mdb match only 60-80% but always have actor role which i want if i can....so because of that i got also this:
***actor role="?"***Jason Priestley***/actor***

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

post a txt file with a single program for me to test.
also mdb ini your using.

janKO
Offline
Donator
Joined: 10 years
Last seen: 7 hours

Here we go

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

i was able to duplicate your results.
what i tested on has role attributes for actor so i didnt get what you get.
reading through the latest documentation this result is intentional.
role="?" is added because the role element is absent.

crude work around if you want to remove these.
run mdb as you do.
then setup another instance of webgrab that grabs nothing but run the rex post processor.
use your mdb_guide.xml as its source file.
<postprocess grab="n" run="y">rex</postprocess>

in rex.config
<actor role=""></role>
this will remove the actors with role="?"

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

another option..

<actor>'mdb-actor''actor/a'</actor>

<actor role="Robert 'Rocky' Balboa">Sylvester Stallone</actor>
<actor>Sylvester Stallone</actor>

it removed the role="?" but not the duplicate actor name as it wasnt a exact match as one has the role attribute.
it did remove the duplicate when both source and mdb had both role and name.
the actor without role is added to the end of the list last after all actors with role attribute(mdb)

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

i just noticed.
i had other actors without role attributes in my source.xml
they were removed as they were grabbed by mdb with the role attribute.
i dont know why this one wasnt removed as i had 4-5 actors without role in source and all were removed leaving only the mdb entry with the role attribute.

i would give the 'actor/a' above a try and what results you get.

janKO
Offline
Donator
Joined: 10 years
Last seen: 7 hours

Yes thanks...this is much better...i add another 11 actors without role in my source file and i got all mdb-actors with role and the last one is the first from my source without role... so it doesn't matter how many actors without role you have in source file you got only first one...

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

yes and i think the first one always being added(without role) is a bug.send it to jan to check.

janKO
Offline
Donator
Joined: 10 years
Last seen: 7 hours

OK, thanks for your help and let's hope that Jan will fix the error.

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

fyi
i just did another test.
i removed the first 5 actors from mdb results to see if it would keep the source actors.
it didnt.
it added only the first as we have seen.
if we remove the /a from 'actor' sure we get them but we get them regardless if mdb also gets them.
so something is wrong here.
i assume your using this on your own source(i think u used to use it for movies)
dont add the role attribute for actors in your source for now until jan answers.

janKO
Offline
Donator
Joined: 10 years
Last seen: 7 hours

OK, thanks again :-)

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

there's new new 5.2.1.4 beta
u can now use different separators.

Version 5.2.1.4 eval
- postprocess 3.4.0
fixed : separator values that occur in the epanded string , like ( ) caused the result to be trimmed to the first occurance of it. Solved by encrypting the separator value .
: this also allows the separator to be any string (not just non word chars)
added : rex/mdb config setting (temp?) that specifies the sectionseparator

https://github.com/SilentButeo2/webgrabplus-siteinipack/blob/master/eval...

janKO
Offline
Donator
Joined: 10 years
Last seen: 7 hours

just one small error...if i have actors in my SOURCE without role and mdb file have actors with role FINISH xml have at the end also the first actor from SOURCE... If mdb file dont have actors FINISH xml use all actors from SOURCE so this is OK now

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

jan messaged me this morning that he was going to have a look at the actor issue today.
v5.2.1.4 still doesnt have this fixed.
its mostly a separator fix.

janKO
Offline
Donator
Joined: 10 years
Last seen: 7 hours

OK, thanks...but this now work better then yesterday at least for me :-)

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

ok,thks.
least were goin in the right direction..improvements.

BassPower
Offline
Donator
Joined: 2 years
Last seen: 4 days

Hello friends, can you help me
in rex.ini i add
{'title()'}{, ('episode()')}{, 'category(, )'}{. 'productiondate()'}
i get on xml:
Men at Work, (S2-E9), , Drama, Comedy, . 2013
how i can remove double ","
Men at Work, (S2-E9), Drama, Comedy. 2013

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

what wg version?
i would get the latest evaluation buide for github.
there been alot of improvements to rex/mdb
https://github.com/SilentButeo2/webgrabplus-siteinipack/tree/master/eval...

i am guessing ur using a older build as there were problems with separators that have been fixed in latest eval versions.

'title' doesnt really need to be in { and } as it has to exist. bu i doubt that make any difference.
also i would download the documented configuration files from the downloads page.
there are examples.ect for rex/mdb
its become a complex thing lately.

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

i did a quick dummy program and looks ok with latest eval version..
<title lang="en">Men at Work, (S02 E09), Drama, Comedy, . 2013</title>

mat8861
Offline
WG++ Team memberDonator
Joined: 9 years
Last seen: 19 hours
BassPower wrote:

Hello friends, can you help me
in rex.ini i add
{'title()'}{, ('episode()')}{, 'category(, )'}{. 'productiondate()'}
i get on xml:
Men at Work, (S2-E9), , Drama, Comedy, . 2013
how i can remove double ","
Men at Work, (S2-E9), Drama, Comedy. 2013

You added in category ;) try {'title()'}{, ('episode()')}{, 'category()'}{. 'productiondate()'}

BassPower
Offline
Donator
Joined: 2 years
Last seen: 4 days

Hey your way will be connected, the difference is that there are 3 or 5 categories
Men at Work, (S2-E9), DramaComedyTrillerAction. 2013 this is why i do in category this "(, )" "{, 'category(, )'}"
Men at Work, (S2-E9), , Drama, Comedy, Triller, Action, . 2013
i can do {, 'category()'[max_elements=1]} just 1 shows and looks good
i check in category {'category(, )'} /category no double "," showing nice

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