Hello,
I am trying to modify the index_title.scrub in dagenstv.com.ini (swedish).
Problem is that I'm getting the wrong thing as title in the tv guide.
Line in site.ini is:
index_title.scrub {regex||"name":"(.*?)","||}
output I get on a channel in epg.xml is:
Heartland
Amber Marshall, Michelle Morgan, Shaun Johnston, Graham Wardle,
CAN
12
SVT1
A_1
svt1
Kanadensisk dramaserie från 2019. Room to grow. Jack får reda på att Vernons vilda hästar är i fara och hela familjen sluter upp för att hjälpa till.
10:20
I want the line "Heartland" to be the title in tvguide, but instead I get the last title line "10:20".
Can I adjust the index_title.scrub to say which line I want as the title?
if you do not post files we cannot help you, the forum remove tags
Hi, I'm sorry I missed to attach files.
Here is the site.ini file and the output epg.xml
late reply but the problem is your title scrub regex is to general
index_title.scrub {regex||:"(.*?)","||}
this will get a match for anything that starts with :" and ends with ","
it will match everything inside these parameters.
lets look at the original scrub..
index_title.scrub {regex||"name":"(.*?)","||}
this will match anything that starts with "name":" and ends with ","
again,if we look at the showsplit in debug(u cant see this but i can as i have a developer license).see screenshot
"name":"xxxx"," is used in multiple places so you will het multiple titles.
to solve this u can do it one of 2 ways
regex method
index_title.scrub {regex||^.*?"name":"(.*?)","||}
^ - start from the beginning
.*? match any chanaracter as few time as possible
so this will only the the first match of "name":"(.*?)","
since the title is the first match all is good.
using separator string method.
similar to regex but doesnt require the use to know how to write a regex expression
index_title.scrub {single|"name":"||","|","}
accomplishes the exact same thing as the regex expression,match the first instance of "name":"xxxxx","
Thank you, that works :)