You are here

Swap subtitle & title always

8 posts / 0 new
Last post
J
Offline
Has donated long time ago
Joined: 7 years
Last seen: 4 years
Swap subtitle & title always

Following on from previous tasks (http://www.webgrabplus.com/content/mlb-extra-innings-tvpassport), there is sample code on there which illustrates how to switch the subtitle & title (every time regardless) for the tvpassport ini, I'm not familiar with the language but tried it in every way I deemed fit, can someone advise what to change in that ini so it always swaps title & subtitle?

mat8861
Offline
WG++ Team memberDonator
Joined: 8 years
Last seen: 18 min

Without looking the site ini he renamed (i guess) the two modify, this means that the part of regex that was getting title is inverted with subtitle just renaming the modify originally should have been:

index_subtitle.modify          {substring(type=regex)|'index_temp_4' "<st>([^<]*)"}
index_title.modify       {substring(type=regex)|'index_temp_4' "<t>([^<]*)"}

and then renamed into

index_title.modify          {substring(type=regex)|'index_temp_4' "<st>([^<]*)"}
index_subtitle.modify       {substring(type=regex)|'index_temp_4' "<t>([^<]*)"}

This let's say is small trick to invert title with subtitle, applicable in this particular case. Personally I wouldn't do that, has this might be good for a sport show but could mess up everything and/or end up with shows without a title, in other channels.

What you could do, is a replace in case it contains "Baseball"  but you will title=subtitle and again will work for all title that contain the word Baseball

index_title.modify {replace(include="Baseball")|'index_title'|'index_subtitle'}

You can do it one way only as most probably the word baseball will not be in subtitle

J
Offline
Has donated long time ago
Joined: 7 years
Last seen: 4 years

I've separated my sports to a different Config to keep these modifications safe from the other content, if it's possible to switch based on 1 word like "baseball" it would be ideal for all users if someone was to modify the base ini to support these sports as all are like it. 

I will try your suggestions but I'm still hesitant as it's one language I'm still getting my head round. 

J
Offline
Has donated long time ago
Joined: 7 years
Last seen: 4 years
Blackbear199 wrote:

seems to an awlful lot of hassle for such a simple problem..

for mlb extra innings,nhl center ice,ect.team names as title with no subtitle.

<programme start="20170911190000 -0400" stop="20170911220000 -0400" channel="MLB Extra Innings">
    <title lang="en">Baltimore Orioles vs. Toronto Blue Jays</title>

regular show with a title and subtitle..

<programme start="20170911190000 -0400" stop="20170911193000 -0400" channel="FXX">
    <title lang="en">The Simpsons</title>
    <sub-title lang="en">Stark Raving Dad</sub-title>

 

perfect! Can't thank you enough! Do you think this should be the common approach and as such merged to the public ini?

ole
Offline
Donator
Joined: 6 years
Last seen: 2 months
Blackbear199 wrote:

seems to an awlful lot of hassle for such a simple problem..

for mlb extra innings,nhl center ice,ect.team names as title with no subtitle.

<programme start="20170911190000 -0400" stop="20170911220000 -0400" channel="MLB Extra Innings">
    <title lang="en">Baltimore Orioles vs. Toronto Blue Jays</title>

regular show with a title and subtitle..

<programme start="20170911190000 -0400" stop="20170911193000 -0400" channel="FXX">
    <title lang="en">The Simpsons</title>
    <sub-title lang="en">Stark Raving Dad</sub-title>

 

I tried this version on WebGrab 2.1 but keep getting "no shows in indexpage".

The previous version of the tvpassports.ini (@Revision 0) works fine but @Revision 2 I get the error : "no shows in indexpage".

Any reason that could cause the error?

 

ole
Offline
Donator
Joined: 6 years
Last seen: 2 months

I just did that now and and I got the following 

<channel update="i" site="tvpassport.com" site_id="" xmltv_id="">
 

Which is the same as previous one.

This is an example of what I use and end up getting no index error with the revised version

<channel update="i" site="tvpassport.com" site_id="amc-eastern-feed-hd/6219" xmltv_id="AMC">AMC (US)</channel>

ole
Offline
Donator
Joined: 6 years
Last seen: 2 months
Blackbear199 wrote:

no idea what ur doing wrong..

no config files or logs.

i cannot guess very good.

 

 

Attached both two sets of files; that worked and failed.

ole
Offline
Donator
Joined: 6 years
Last seen: 2 months
Blackbear199 wrote:

i dont see anything wrong.in the ini that dont work make sure all of the channels.xml generation sections are disabled.

You are right, one section was still enabled. It now working fine. Thank you so much for your help.

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