You are here

Want to add 2 things to TVguide.com.ini but having trouble figuring it out

15 posts / 0 new
Last post
jhr1948
Offline
Donator
Joined: 4 years
Last seen: 3 days
Want to add 2 things to TVguide.com.ini but having trouble figuring it out

EDIT:
I realized something about the sports sub-titles, so forget my original questions.
I'm trying to figure out how to get a live show to add an entry like this <live />

<programme start="20200211060000 -0600" stop="20200211080000 -0600" channel="I137.60222.zap2it.com">
<title lang="en">The Great Outdoors With Dan</title>
<desc lang="en">Tools, entertaining, gardening and more.</desc>
<length units="minutes">120</length>
<icon src="https://zap2it.tmsimg.com/assets/p8042483_b_v9_ae.jpg" />
<url>https://tvlistings.zap2it.com//overview.html?programSeriesId=SH01243596&...
<episode-num system="dd_progid">SH01243596.0000</episode-num>
<new />
<live />
<subtitles type="teletext" />
<rating>
<value>TV-G</value>
</rating>
</programme>

Currently, tvguide.com.ini is putting (live) in the description.

<programme start="20200212040000 -0600" stop="20200212060000 -0600" channel="ESPN2">
<title lang="en">College Basketball: New Mexico at San Diego State</title>
<sub-title lang="en">New Mexico at San Diego State</sub-title>
<desc lang="en">New Mexico at San Diego State. From Viejas Arena. (live) (cc).(n)</desc>
<date>2020</date>
<category lang="en">sports</category>
<icon src="https://tvguide1.cbsistatic.com/mediabin/galleries/sports/sportstype/thu... />
</programme>

How can i modify the ini to add that to a listing?

I'm using the latest Webgrap+ beta (2.1.11)
I have the latest mono version 6.8.0.105
Latest Linux Mint
I'm uploading the tvguide.com.ini

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

webgrab doesn't use the tags new and live..

the only one it has is premiere so I think your going to have to live with (live) being added to the description.there are also others that are added like (new),(repeat) and (cc).

what u can do it remove the * being added to the title and have the premiere tag added.

change this..
index_title.modify {addend('index_temp_5'=="4")| *}
to
index_premiere.modify {set('index_temp_5'=="4")|true}

and disable this line by placing a * at the beginning of the line..
title.modify {addend('temp_5'=="4")| *}
to
*title.modify {addend('temp_5'=="4")| *}

jhr1948
Offline
Donator
Joined: 4 years
Last seen: 3 days
Blackbear199 wrote:

webgrab doesn't use the tags new and live..
the only one it has is premiere so I think your going to have to live with (live) being added to the description.there are also others that are added like (new),(repeat) and (cc).
what u can do it remove the * being added to the title and have the premiere tag added.
change this..
index_title.modify {addend('index_temp_5'=="4")| *}
to
index_premiere.modify {set('index_temp_5'=="4")|true}
and disable this line by placing a * at the beginning of the line..
title.modify {addend('temp_5'=="4")| *}
to
*title.modify {addend('temp_5'=="4")| *}

I appreciate it Blackbear199, i'm going to give it a shot

jhr1948
Offline
Donator
Joined: 4 years
Last seen: 3 days

[quote=jhr1948]

Blackbear199 wrote:
webgrab doesn't use the tags new and live..
the only one it has is premiere so I think your going to have to live with (live) being added to the description.there are also others that are added like (new),(repeat) and (cc).
what u can do it remove the * being added to the title and have the premiere tag added.
change this..
index_title.modify {addend('index_temp_5'=="4")| *}
to
index_premiere.modify {set('index_temp_5'=="4")|true}
and disable this line by placing a * at the beginning of the line..
title.modify {addend('temp_5'=="4")| *}
to
*title.modify {addend('temp_5'=="4")| *}

Hey Blackbear199, i changed those lines and although it took the "*" out of the title name it didn't add the premiere tag., However, honestly, i'm starting be ok with the "*". The one thing i cant figure out is how to remove the Sub-titles from the Title.
*remove subtitle from title
"title.modify {remove(notnull type=string)|:'index_subtitle'}"

I have that enabled, but the sports sub-title still gets added

    <title lang="en">College Wrestling: Oklahoma at Oklahoma State</title>
    <sub-title lang="en">Oklahoma at Oklahoma State</sub-title>

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 5 hours

the premiere tag is broken in 2.1.9 and below,i believe its fixed in later versions
for
this
"title.modify {remove(notnull type=string)|:'index_subtitle'}"
notnull mean only remove if the result is not nothing(blank title),think of it as a kinda safety check as u wouldn't want a blank title.
also u have to know that the details title always overwrites the index title so you would also need this same line without the index_ prefix for the details title.
I didn't look at the ini but assume its there,but check anyway.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 5 hours

just notice a small problem after seeing ur data,there is a space after the :
which isn't there..
"title.modify {remove(notnull type=string)|:'index_subtitle'}"
shud be(imho) to mske sure be this

title.modify {remove(notnull type=regex)|":\s*'index_subtitle'"}
this will match is there is a space after the : or no space.

jhr1948
Offline
Donator
Joined: 4 years
Last seen: 3 days
Blackbear199 wrote:

just notice a small problem after seeing ur data,there is a space after the :
which isn't there..
"title.modify {remove(notnull type=string)|:'index_subtitle'}"
shud be(imho) to mske sure be this
title.modify {remove(notnull type=regex)|":\s*'index_subtitle'"}
this will match is there is a space after the : or no space.

Hey man, that mostly worked! Most of Sports sub-titles were removed, however, a few stayed in the title. I'm not 100% sure, but the one thing the sub-titles that didn't get removed have in common is that they have something in parenthesis.
Here are 2 examples where sub-titles didn't get removed:
<title lang="en">College Basketball: Northern Iowa at Loyola (Chicago)</title>
<sub-title lang="en">Northern Iowa at Loyola (Chicago)</sub-title>
 
 
<title lang="en">College Basketball: UC (Irvine) at Hawaii</title>
<sub-title lang="en">UC (Irvine) at Hawaii</sub-title>
 
 
Once again, the parenthesis are the only connection i can see to why those sub-titles didn't get removed.  
I tried for almost 2 hours to figure out, but i'm completely new to this and finally had to give up. Any advice?
 
 
Also, you mentioned that the premiere tag is broken in 2.1.9 and below.  I am running 2.1.11, but that change you recommended doesn't work either, so maybe its still broken.
 
This is what you recommended.
"change this..
index_title.modify {addend('index_temp_5'=="4")| *}
to
index_premiere.modify {set('index_temp_5'=="4")|true}"
 
 
I really appreciate all the help!

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 5 hours

add...
index_subtitle.modify {cleanup(type-regex)}
before this line
title.modify {remove(notnull type=regex)|":\s*'index_subtitle'"}
its misses the subtitle with (xxx) because in regex ( and ) have a special meaning,so the cleanup command will add a escape(\) backslslash which will tell regex look for a real ( and ) rather than treat it as its special meaning.

jhr1948
Offline
Donator
Joined: 4 years
Last seen: 3 days
Blackbear199 wrote:

add...
index_subtitle.modify {cleanup(type-regex)}
before this line
title.modify {remove(notnull type=regex)|":\s*'index_subtitle'"}
its misses the subtitle with (xxx) because in regex ( and ) have a special meaning,so the cleanup command will add a escape(\) backslslash which will tell regex look for a real ( and ) rather than treat it as its special meaning.

That worked!
But it broke a modification I added.  I'm really trying to learn this (as best as i can), this morning through trial and error, I figured out to add 2 asterisks at the end of a "Live" program's Title.
<title lang="en">College Basketball **</title>
 
That change you suggested did take out the subtitles with parenthesis, but I guess it's taking out everthing, including the "**"
 
Tried figuring it out, but couldn't get it to work.  Is there a way i can ignore the "**" added at the end of a "Live" Title?
Thanks for all the help!

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 5 hours

without seeing your modified ini I can only guess.
if u change the original ini to what I originally said then you shudnt have any ** added to title.
it shud add the premiere tag as I said but depending on what wg version your using this may not happen.

jhr1948
Offline
Donator
Joined: 4 years
Last seen: 3 days
Blackbear199 wrote:

without seeing your modified ini I can only guess.
if u change the original ini to what I originally said then you shudnt have any ** added to title.
it shud add the premiere tag as I said but depending on what wg version your using this may not happen.

 

 
I decided to keep the 1 asterisk "*" at the end of the Title for "new" programs and not worry about the premiere entry.  So i successfully added 2 asterisks "**" at the end of the Title to indicate a "live" program.
 
Update: I can't get that last line you suggested to also delete Sub-titles with parenthesis anymore. Not sure what i did differently.  
 
I'm attaching my ini.  Once again, i've added the ** to the end of a Title to indicate Live programs.  That should be the only differences I did this morning.
 

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

there is a lot of things that can affect the title considering its probably the most important element bedises the time.
without trying to get into too much technical stuff on how wg work(you can doenload the manual and read it ig you want).

I will give this advice...

most sites have a index_ttle and a details_title(or simply title is also accepted by webgrab)
the details title will always overwrite the index_title as the creator chose to give it priority between the over the different locations that the title can exist.
you have to be carefull when messing with this as again(read the manual) the title is used for a number of things and not just a title.
whatever you do to the index_title you should also do to the details_title(or just title).
this is because when webgrab runs it performs a title check,this is how it check to see if a program has changed and needs to be updated.
in other words if the existing title in the xml file doesn't match the one it just grabbed wg will perform a update,again read the manual as it really isn't that simple.i am just trying to explaining it as simple as possible.
so you shouldn't go just adding this,changing that,ect unless you know exactly what your doing and u can end up doing more harm than good.

my best advice would to read the manual,its a lot to absorb I know but its the best way to get a somewhat understading of how webgrab works.you don't have to read it all,there is a section the give a kind of overview on the epg update process.

jhr1948
Offline
Donator
Joined: 4 years
Last seen: 3 days
Blackbear199 wrote:

there is a lot of things that can affect the title considering its probably the most important element bedises the time.
without trying to get into too much technical stuff on how wg work(you can doenload the manual and read it ig you want).
I will give this advice...
most sites have a index_ttle and a details_title(or simply title is also accepted by webgrab)
the details title will always overwrite the index_title as the creator chose to give it priority between the over the different locations that the title can exist.
you have to be carefull when messing with this as again(read the manual) the title is used for a number of things and not just a title.
whatever you do to the index_title you should also do to the details_title(or just title).
this is because when webgrab runs it performs a title check,this is how it check to see if a program has changed and needs to be updated.
in other words if the existing title in the xml file doesn't match the one it just grabbed wg will perform a update,again read the manual as it really isn't that simple.i am just trying to explaining it as simple as possible.
so you shouldn't go just adding this,changing that,ect unless you know exactly what your doing and u can end up doing more harm than good.
my best advice would to read the manual,its a lot to absorb I know but its the best way to get a somewhat understading of how webgrab works.you don't have to read it all,there is a section the give a kind of overview on the epg update process.

I appreciate the tips. I do have the manual and have definitely spent many hours trying to figure everything out. As far as what i did to indicate live shows by adding 2 asterisks to the title, i followed what was already in the ini that added the 1 asterisk to the title for a "New" program. Just like the "New" indicator (which is in "Index_Temp" and "Title_modify"), i added the same entries except for "Live".

Out of curiosity, does the ini not look right to you?

mat8861
Offline
WG++ Team memberDonator
Joined: 9 years
Last seen: 7 hours

Like BlackBear (my teacher) said you have to consider a lot of things. An easy example is title: "Play in the garden - Kids fun" first you would do is consider "Kids Fun" as subtitle and separate them with "-" , but then you may have a sport channel like "Soccer : Barcelona - Atletico Madrid) then you are messed up. So be carefull !!

jhr1948
Offline
Donator
Joined: 4 years
Last seen: 3 days
mat8861 wrote:

Like BlackBear (my teacher) said you have to consider a lot of things. An easy example is title: "Play in the garden - Kids fun" first you would do is consider "Kids Fun" as subtitle and separate them with "-" , but then you may have a sport channel like "Soccer : Barcelona - Atletico Madrid) then you are messed up. So be carefull !!

Ah, i see you guys are talking about the removing of sub-titles from the title. I was thinking he was talking about me adding the "Live" indicator. I think i'm going to leave the removing sub-title the way it is. Sub-titles that have parenthesis are not that common and better to not break it and deal with some sub-titles not removed than to try to remove and break it all.
Thanks to the both of you for your advice!

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