You are here

[SOLVED] Line problem in .ini file

4 posts / 0 new
Last post
illiac4
Offline
Joined: 9 years
Last seen: 6 years
[SOLVED] Line problem in .ini file

I have modified this file http://webgrabplus.com/sites/default/files/download/ini/info/SiteIni.Pac... according to this link
http://www.webgrabplus.com/comment/470#comment-470 The icon source is added but at the end it writes 2014. (slo1.png2014 it should be slo1.png)
In config.xml it is set right:
<channel update="i" site="siol.net" site_id="SLO+1" site_channel="http://cdn1.siol.tv/logo2/150x80/slo1.png" xmltv_id="SLO+1">SLO+1</channel>
I have only added this two lines into .ini file:
index_variable_element.modify {addstart(scope=datelogo)|'config_site_channel'}
index_urlchannellogo.modify {addstart|'index_variable_element'}
Sample of what writes:
<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version 1.1.1/53.17 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
  <channel id="SLO+1">
    <display-name lang="sl">SLO+1</display-name>
    <icon src="http://webgrabplus.com/%3Ca%20href%3D"http://cdn1.siol.tv/logo2/150x80/slo1.png2014"">http://cdn1.siol.tv/logo2/150x80/slo1.png2014" />
    <url>http://www.siol.net</url>
  </channel>
  <channel id="SLO+2">
    <display-name lang="sl">SLO+2</display-name>
    <icon src="http://webgrabplus.com/%3Ca%20href%3D"http://cdn1.siol.tv/logo2/150x80/slo2.png2014"">http://cdn1.siol.tv/logo2/150x80/slo2.png2014" />
    <url>http://www.siol.net</url>
  </channel>

francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 2 weeks
Is the support helpful?
support us

Almost right.
Because your ini already uses the index_variable_element, it will contain the content of it already. In your case, it is the current year (index_variable_element.modify {calculate(format=date,yyyy)|'urldate'})
 
So you just need to clear the index_variable_element before you add you own info. So just make the "scope.range {(datelogo)|end}" like:
At the strart, index_variable_element is already cleared. So if you first use this to do the channellogo. Later, the index_variable_element is already cleared, before being used. So this should work
 

scope.range {(datelogo)|end}
index_variable_element.modify {addstart|'config_site_channel'}
index_urlchannellogo.modify {addstart|'index_variable_element'}
index_date.scrub {single (force)|<span>danes, ||<|</a}
index_date.modify {replace ()|.|/}
index_date.modify {remove ()| }
index_variable_element.modify {clear}
index_variable_element.modify {calculate(format=date,yyyy)|'urldate'}
index_date.modify {addend ()|'index_variable_element'}
end_scope
illiac4
Offline
Joined: 9 years
Last seen: 6 years

TNX it works.
Is it possible to add chanel icon source automatically into .ini file so that there is no need for manual editing the file (siol.net.channels.xml)?
Icons are like:
http://cdn1.siol.tv/logo2/150x80/planettv.png

francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 2 weeks
Is the support helpful?
support us

Auto channel icons are added.

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