change IP:port in xmltv cache

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
Post Reply
zmiata

Posts: 5
Joined: Tue Nov 09, 2021 11:33 pm
Location:

HTPC Specs: Show details

change IP:port in xmltv cache

#1

Post by zmiata » Tue Nov 09, 2021 11:44 pm

Hi,

Is there a way to change the IP:port that is used for the cached program images in the xmltv file generated by EPG123? My Chromecast doesn't see it as it is set up currently, even in my local network:

Code: Select all

<icon src="http://DIMITAR-PC:9009/image/b5d1f666a0c3c1484993c80f3a0b909b8e2ed7b67f3ae2b3d7503d98f22ab50c.jpg" />
Also, when I travel and I take my Chromecast with me this address will not be fetched outside my local network anyway. Is there a way for me to setup my external IP address to be written in the xmltv file? Also it will be nice if I can change the port number too.

Alternatively, if the above is not possible, is there a way to disable the image caching so the actual schedules direct link is written into the xmltv file?

User avatar
garyan2

Posts: 7480
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#2

Post by garyan2 » Wed Nov 10, 2021 12:20 am

zmiata wrote: Tue Nov 09, 2021 11:44 pm Hi,

Is there a way to change the IP:port that is used for the cached program images in the xmltv file generated by EPG123? My Chromecast doesn't see it as it is set up currently, even in my local network:

Code: Select all

<icon src="http://DIMITAR-PC:9009/image/b5d1f666a0c3c1484993c80f3a0b909b8e2ed7b67f3ae2b3d7503d98f22ab50c.jpg" />
Also, when I travel and I take my Chromecast with me this address will not be fetched outside my local network anyway. Is there a way for me to setup my external IP address to be written in the xmltv file? Also it will be nice if I can change the port number too.

Alternatively, if the above is not possible, is there a way to disable the image caching so the actual schedules direct link is written into the xmltv file?
Currently no way of changing the port number. It's been in the back of my mind since I created this feature but has been a low priority. Not sure why your Chromecast won't handle it... is there a documented limitation on the port number range for Chromecast? Does it allow port numbers?

For the second question, I don't think I'm going to provide a method for that. You can however modify the xmltv file however you want and should be able to easily find/replace the "http://DIMITAR-PC:9009" with your external IP:PORT or "https://json.schedulesdirect.org/20141201" to direct it to the SD servers.

For the third question, it would be useless to do so. SD is regulating who can access the images now based on the IP address of a successful login to their server. The authorization lasts 24 hours and allows 5000 image downloads. My observation is any login during the 24 hour period does not reset the clock. Being outside your network where the xmltv file was created will result in an UNKNOWN_USER error and you won't get the images. Also, in the future, the image link will require a token (/image/b5d1f666a0c3c1484993c80f3a0b909b8e2ed7b67f3ae2b3d7503d98f22ab50c.jpg?token=0123456789abcdef) to get access and without the service to provide that token for the request, the result will still be no image.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

zmiata

Posts: 5
Joined: Tue Nov 09, 2021 11:33 pm
Location:

HTPC Specs: Show details

#3

Post by zmiata » Wed Nov 10, 2021 6:18 pm

Hi,

Thank you for the quick reply!

About the Chromecast - I was referring to the address, not the port - with http://DIMITAR-PC it will not load the program images. It could be the device itself or the software I use, no idea. I manually replaced it with http://192.168.1.4 (my internal IP) in the xmltv file to test it and it worked fine like that. I was thinking that I could search for a script to do that at a certain time after the xmltv file creation schedule task - to find/replace http://DIMITAR-PC with my external IP so I can have access to the images.
The port question was just a personal preference on my part - I prefer to change the default ports of the software that I use.

P.S. I didn't know that SD regulates the access to the images based on IP - that was very useful info for me, as it happened before that I did not get images with that exact error when I was not at home. I didn't think it was a limitation but a problem at the time, when I got back home it all worked fine so I thought that the problem solved itself. Now I know :) Thank you!

User avatar
garyan2

Posts: 7480
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#4

Post by garyan2 » Sat Nov 13, 2021 3:26 pm

Ah, so it is not resolving the hostname to an IP. For windows, network discovery needs to be enabled to do that. I don't know if there is some setting in Chromecast equivalent to that.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

zmiata

Posts: 5
Joined: Tue Nov 09, 2021 11:33 pm
Location:

HTPC Specs: Show details

#5

Post by zmiata » Sun Nov 14, 2021 6:35 pm

Probably not, but I found a script online for find and replace and I set it up to find the hostname and replace it in the xmltv file with my external IP and scheduled a task to run half an hour after epg123's program update scheduled task and that settled it for me.
With that setup everything is perfect! Your software was all I needed.
Thank you!

P.S. If you are thinking on future improvements - I would suggest to put the web interface behind a login and password protect the output files. Not that I mind if someone would read my stats, but since you cannot change the port from the default people that look for free stuff usually scan a wide range of IPs for the stuff they need. And knowing your default application port, if they find this port open somewhere on their search range there is a high chance that people will have their xmltv files there, i.e. free schedule guides out in the wild, free for the taking.
The good part is that the default save location seem to be hard coded in the links for the files in the web interface, so I just changed the default save location in the application and the links from the webserver did not change, so they are basically useless to scanners.

Post Reply