You are here

Multiple Show Icons

12 posts / 0 new
Last post
hshah
Offline
Has donated long time ago
Joined: 5 years
Last seen: 5 years
Multiple Show Icons

I currently have Radio Times UK configured and it is fetching the showicon with:
index_showicon.scrub {multi(debug)|"Image":"||","|","}

I have then added the following below it to suit my needs:
index_showicon.modify {replace|quality=60|quality=75}
index_showicon.modify {replace|width=130|width=384}
index_showicon.modify {replace|height=100|height=576}

Since showicon can be a multiple, I would like to add another element with the same URL but change the quality, width and height. The plan is to end up with something like this in the XMLTV file, but I'm not sure how to do that:

I tried adding another index_showicon.scrub line below the existing configuration but that didn't seem to do anything :(

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

in order to do what you want you need to understand how multi value elements are stored.

lets say with this it scrubbed 3 showicons..
index_showicon.scrub {multi(debug)|"Image":"||","|","}

the actual index_showicon elements would be stored like this,webgrab uses the | as element separators

httpxxxxxquality=60xxxx|httpxxxxxquality=130xxxx|httpxxxxxquality=100xxxx

so now u apply ur changes..

ndex_showicon.modify {replace|quality=60|quality=75}
index_showicon.modify {replace|width=130|width=384}
index_showicon.modify {replace|height=100|height=576}

httpxxxxxquality=75xxxx|httpxxxxxquality=384xxxx|httpxxxxxquality=476xxxx

now u want to add a additional showicon with another custom quality setting,this is where the problem lies.

say u tried this..

index_showicon.modify {addend|\|httpxxxxmy_custom_imagexx}

you will not end up with this(which you want)..

httpxxxxxquality=75xxxx|httpxxxxxquality=384xxxx|httpxxxxxquality=476xxxx|httpxxxxmy_custom_imagexx
u will get this..
httpxxxxxquality=75xxxx|httpxxxxmy_custom_imagexx|httpxxxxxquality=384xxxx|httpxxxxmy_custom_imagexx|httpxxxxmy_custom_imagexx|httpxxxxxquality=476xxxx|httpxxxxmy_custom_imagexx

the new url is added to the end of every element.

in order to get around this u first have to change the element to a single value elements again.

index_showicon.scrub {multi|"Image":"||","|","}
index_showicon.modify {replace|\||#_#} * replace the elements separators with something to make the element single value
index_showicon.modify {addend|#_#httpxxxxmy_custom_imagexx} * add our custom showicon to the end
index_showicon.modify {replace|#_#|\|} *convert the element back to multi value again

hshah
Offline
Has donated long time ago
Joined: 5 years
Last seen: 5 years

Apologies, I only just saw your reply. Even with all your help in the other thread, I was getting confused with everything so just ended up achieving with via means I am a little more comfortable with.

I have a Windows bat file managing the various WebGrab++ fetches I have, along with any custom post-processing and moving around of files. I just knocked up a fairly simple PowerShell script which uses XMLDocument methods to clone the relevant nodes and apply the desired attributes. This runs straight after the grabbing process completes, and doesn't take more than a few seconds :)

Plum12
Offline
Plum12's picture
Has donated long time ago
Joined: 6 years
Last seen: 2 years

is it possible to modify .ini to add picons to same_as

channel offset="0" same_as="BBC 1 HD" xmltv_id="BBC 1">BBC 1 /channel

channel id="BBC 1 HD"
display-name lang="..">BBC 1/display-name>
url>http://BBC-ONE.uk/url>
Missing logo here for same_as
/channel>

how to use coding on this page? guote only work

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

its not possible to add,why the channel icon isn't copied when same_as is used is something you would have to ask the creator ro fix.
to me it makes sense to copy it from the original channel,why it wasn't added you will have to ask about...

Plum12
Offline
Plum12's picture
Has donated long time ago
Joined: 6 years
Last seen: 2 years

Thanks for the answer, I tried various modifications in .ini but it does not give anything

so

when I remove offset = "0"
something like this arises,

https://pastebin.com/2EkPRpNb

Config

https://pastebin.com/84TqjiF1

but Kodi still shows the logo and epg for one channel only

It's a pity that it does not work, the program is brilliant

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

you could always add the 2nd channel using the same line as the original and change the xmltv_id and display name,it defeats the purpose of using same_as as ur grabbing the same epg twice.

Plum12
Offline
Plum12's picture
Has donated long time ago
Joined: 6 years
Last seen: 2 years

any tip txt?

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

add the same channel twice using different xmltv_id and display names,ur grabbing the same data twice but both will use the same channel logo,example..

https://pastebin.com/VE90nfyx

make sense?

Plum12
Offline
Plum12's picture
Has donated long time ago
Joined: 6 years
Last seen: 2 years

yes

but the time will be extended by the remaining number of channels

normal 4 - 5 hours

x3 = 12 -15 hours

it has to be executable, maybe one time updates with this option

thanks
regards

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

for now that's your only option to get the logo via webgrab.

a few other options is to create your own logo folder or add them to your m3u list,of course whatever your using to view your epg has to support using external logo's or use them from m3u.either way irs a time consuming task but you would be able to use same_as again.

Plum12
Offline
Plum12's picture
Has donated long time ago
Joined: 6 years
Last seen: 2 years

That's what I do, it's the only option that is now available

maybe someday I will see this option in webgrab ++

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