You are here

Update XMLTV_ID but keep the Channel Name

6 posts / 0 new
Last post
Maddy
Offline
Joined: 6 years
Last seen: 10 months
Update XMLTV_ID but keep the Channel Name

Hi there,

Can someone help me here? I have a working site.ini file however I want to make some changes to get the desired result.

My current working ini to generate a list is:

* @auto_xml_channel_start
url_index {url|https://somewebsite}
scope.range {(channellist)|end}
index_site_id.scrub {regex||channel_id":(.*?),"||}
index_site_channel.scrub {regex||channel_name":(.*?),"||}
end_scope
* @auto_xml_channel_end

Now I modified this to change the xmltv_id to append the country code; which is working fine

index_site_channel.modify {replace| |}
index_site_channel.modify {addend|.uk}

However, it changes both the xmltv_id and the display name.
For example:
<channel update="i" site="somewebsite.com" site_id="11" xmltv_id="SkySport1.uk">SkySport1.uk</channel>

How do I get this?
<channel update="i" site="somewebsite.com" site_id="11" xmltv_id="SkySport1.uk">Sky Sport 1</channel>

So I get this result?

</channel>
<channel id="SkySport1.uk">
<display-name lang="en">Sky Sport 1</display-name>
<icon src="https://link.to.png" />
<url>http://www.somewebsite.com</url>
</channel>

I really appreciate any help you can provide.

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 1 min

you cant.
webgrab assigns the index_site_channel value to both.

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 1 min

i forgot to mention these is one thing u can do.
its called channelnameprefix=xxxx
its added to the site {xxx} line at the top of the ini.

as the name suggests it adds whatever the xxxx value to the xmltv_id only and not the display name.
so you could do something like this..

channelnameprefix=uk
<channel update="i" site="somewebsite.com" site_id="11" xmltv_id="uk SkySport1">Sky Sport 1</channel>

if i remember right its adds a space after the prefix value.

Maddy
Offline
Joined: 6 years
Last seen: 10 months

here is a link that someone has done this of course not by appending .xx but the channel id is different from display-name

https://raw.githubusercontent.com/AqFad2811/epg/main/astro.xml

Blackbear199
Online
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 1 min

he manually changed the xmltv_id value before grabbing epg.

Maddy
Offline
Joined: 6 years
Last seen: 10 months

Thanks. that explains.

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