You are here

modifying supersport.com.ini

34 posts / 0 new
Last post
khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month
modifying supersport.com.ini

I'm trying to understand and learn the ini creation process and looking at the new supersport.com.ini I thought I could add the programme description data which is missing. Having looked at the docs and the recent ini and looking at the guide page on supersport.com I thought that adding the line:

description.scrub {single|"synopsis":"||","}

would scrub the description but nothing is being added, could you give me any advice as to why it's not working and what the correct expression should look like?

I think dstv.com.ini scrubs similar description data but the ini is locked/encrypted so I can't see the expressions used there.

Thanks

Attachments: 
khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Sorry, was tired, I spotted the issue, expression should be:

index_description.scrub {single|"synopsis":"||","}

japangelo
Offline
japangelo's picture
Donator
Joined: 4 years
Last seen: 23 min

Good job!
Remember to use index_element.scrub if you're grabbing from the main page and use element.scrub if you're scrubbing from the detail page.
I would use this to be more correct in your case :)

index_description.scrub {single|"synopsis":"||","|","}

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Thanks for the advice! I have another problem now ;)

I'm now trying to pull the showicons from the page. The problem is the site sends the link:

https://03mcdecdnimagerepository.blob.core.windows.net/epguideimage/img/...

Which will not display as it needs to be downloaded. On the site it will display this by adding to the hyperlink.

https://supersport.com/_next/image?url=https://03mcdecdnimagerepository....

However if I try to use addstart and addend to the element the & is converted to & which then breaks the link. How can I resolve this issue?

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

I tried substituting %26 but that doesn't work...

japangelo
Offline
japangelo's picture
Donator
Joined: 4 years
Last seen: 23 min

Ive never done this ini but you can try something simple like:

index_temp_1.scrub {single|"thumbnailUri":"||",|",}
index_showicon.modify {set('index_temp_1' not "")|https://supersport.com/_next/image?url='index_temp_1'&w=1080&q=75}

see if this works ok for you

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

that should work.you could even scrub the thumbnail with index_showicon and have it set itself in the modify line.

the & is is a special character in xml files and needs to be encoded.
so dont do anything to it,just scrub and then use the 'set' command like japangelo has above.
webgrab will encode the & character when it writes the data to the guide.xml file(see screenshot).

it also depends on the editor your using.
notepad will convert the encoded & back to just a &.
sublime,notepad++,vscode,ect wont do this and show it as its original encoded value which is & a m p ; with no spaces,even the forums would convert it back to just the character &.
see screenshot.
the epg viewing software converts it back to just a & so the link will load correctly.

fyi if you copied the url from the generated guide.xml file and tried it in your web browser it wouldnt work without manually converting the encoded & back to just a &.

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Brilliant!
I figured out that the trick was in the element.modify {set|} command to encode the &, I just could find out how to do it correctly. {set|not""} is not in the documented examples and I couldn't find the correct reference online so that would've take a while thanks for the pointer.

I am using notepad++ and testing the link from there, hence it not working, are you saying that even like that with the & a m p ; the epg software would decode it and display it correctly? I didn't think of testing it out like that tbh.

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

yes thats how it works.
if you google xml special characters there are others besides the & like ' "
these all need to be encoded,as i said webgrab does this for you when it writes to the guide.xml file.

a common channel is A&E
in your guide.xml it will appear as A& a m p ;E(without spaces) for the xmltv_id and channel name but your epg viewer will show it as A&E

if your going to get into editing/creating ini i strongly suggest you contact the creator via the contact us link and ask to have debug enabled.
by default only developers have this.

you can add the debug option to any .scrub or .modify line and the details of the operation will be written to your webgrab log file,example

index_showicon.modify {set(debug)|xxxxxxxx} where xxxxxx would be your scrub info

right now your guessing if your doing things correctly and its not a good way to learn.

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

index_showicon.modify {set(debug not "")|xxxxscrub infoxxxx}

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

another thing i suggest you use is syntax highlighting.
i try to keep it updated for notepad++,sublime and visual studio code editors.
https://github.com/Blackbear199?tab=repositories

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

How frustrating, that means that the edits I made would've worked all the time! I spent ages trying to find a solution to a problem that didn't exist. You live and learn ;) And your code is obviously much more elegant than mine so thanks for adding the completed ini.

Thanks for all the tips, I will request to enable debugging and add syntax highlighting to notepad++

Cheers, my only bugbear now is the foxtel ini issue but that seems beyond any solution apart from running WG+ on an Australian server.

One more question, I was only able to do this because the supersport.ini code provided was not encrypted as most of them are, is there a way to get others that are displayed in normal code or is that the purpose of enabling debug? I would like to take a look inside, yourtv and fetchtv to see if I can extract showicons from them for my epg's as well.

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

some are encrypted and some are not.
encrypted came out before the licensing did.
i dont think it should be used anymore but i'm not the boss.
we get requests all the time from users that want things changed who like you cant edit the file because of encryption.
maybe this will change in the future.
we sent our test result to the creator about foxtel,we think its a webgrab issue and not users being blocked.
we are waiting to hear back from him.

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Is there a way to get unencyrpted ini's for youtv and fetchtv or do they just not exist?

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

not unless u can convince mat8861 to post them as he encrypts files and adds them.
what your thinking wont work because most likely the showicons for those ini are comming from the details page(i didnt look)
so there now way to grab them for example from the fetchtv site and use them in the yourtv ini or vice versa.

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

yourtv is the details page so good to know that will not work but fetchtv seems to be the same as supersport.com with a popup.

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

how are you going to grab the url's to use in a different ini?
its just not possible.

heres yourtv,i did a quick update on it as my version was from 2017
read the remarks at the top of the ini as the timezone needs to be set to the region your grabbing epg for(default is sydney)
the channel list creation is also a bit complicated so read it carefully.
a fresh list for sydney is included.

Attachments: 
khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Sorry I think we misunderstand each other. yourtv will not work, as you said the showicon is in the details page and as I understand it that cannot be pulled. I did not realise that at first but now I understand.

My intention was to update fetchtv ini with the showicon by much the same process as with supersport.com. I can see the image is in a popup on the main guide page with the link visible e.g. https://www.fetchtv.com.au/v2/epg/program/290927/image/334x188.

Am I missing something that will make this not possible?

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

ok.
fetchtv changed something not long ago,i forget what.
i deleted anything i had for it as i figured it wasnt worth fixing.
i dont know how whatever version thats in the pack is working.
i will have a look at the site when i have time.

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Oh, I'm using fetchtv for some local Australian channels and it is working.
I have @Revision 1 - [09/06/2021] Mat8861

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

fixed.

Updated 10 mar 2023

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

i figured out how to add the ratings also.
updated ini is added to git/siteini.pack
its the same revision number.
other than this,its the same as the above files.

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Nice one, I saw ratings and thought I might have a crack at scrubbing them but you beat me to it.

A couple of things, I've noticed the supersport (and dstv) websites both display an hour out for me when set to UTC. This translates to the EPG. I've corrected it but seems strange their website is out by an hour. I verified it by checking the location ZA against live football games on their channels.

I'm having some sort of similar issue with fetchtv. Not sure exactly how much out but EPG does not match the shows on the website, verified against yourtv which matches fetchtv. Does it align if you test?

Edit:ignore that, it's to do with differing schedule for Perth vs NSW, all good I think, supersport defo out by 1hr tho

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

what are you using to view the epg?
if the timezone of the pc running this software happen to he 1 hour off from utc?
if so then its not adjusting the epg to its utc offset.
ex.
if the epg start time is 01:00 utc and its local offset is utc +01:00 it should adjust the start time to 02:00
so its correct for its local time.

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Three different devices, 1 x windows, 2 x android, all set to UTC.

Does you fetchtv ini generate shows starting at the current time? Here the first shows generated are +~6hrs from current time. Correct shows and time, just EPG blank for 6hrs.

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

i think supersport timezone= needs to be set to the users local timezone.

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

fetchtv is using unix time for start/stop so it has to be in utc time.
now i wouldnt chisel that in stone as sometime although its rare that the site would have the unix time offset to the users local time.
i just compared the site to grabbed epg and accouting for my utc offset it looks correct to me.

edit:
yes the first show is at my current local time utc

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

No idea why but UTC+2 sorts supersport out fine for me.
Fetchtv is fine set to UTC but as I said I'm just missing first 6hrs or so, will try your updated ini and see if that makes a diff. Thanks

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

the site uses a block id to grab the epg which is calculated from the start date which is in utc
we have to set the timezone= to UTC because thats what the actual time the shows are in.
its not accounting for the users offset from utc.
i can fix that,will post a fix shortly.

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Tx for that.
Tbf it's not a major issue as once it's run for 6 hrs updates will add and keep existing shows, just wondered why really.

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

post #21 updated.

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Hi, I noticed recently the program/show images have stopped displaying for me.
On checking I saw that the link generated was throwing an error,

""w" parameter (width) is required".

The ini contains the w param:

index_showicon.modify {set(not "")|https://supersport.com/_next/image?url='index_showicon'&w=1080&q=75}

It seems to be an issue with the ampersand encoding as when I edit the link generated:

https://supersport.com/_next/image?url=https://03mcdecdnimagerepository....

And remove the 'amp;' following the '&' I receive:

w" parameter (width) of 1080 is not allowed

Checking supersports.com I can see all images are now default w=500 and changing the w parameter to 500 then displays the image correctly:

https://supersport.com/_next/image?url=https://03mcdecdnimagerepository....

Is there anything that can be done to resolve this encoding issue?
Thanks

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

& need to ne encoded as &

khpov
Offline
Donator
Joined: 2 years
Last seen: 1 month

Ignore my previous post, its resolved, I forgot about one of the stages my data went through so the changes to w parameter were not being pushed through to the player. All sorted now.

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