xteve-project / xTeVe

M3U Proxy for Plex DVR and Emby Live TV
MIT License
1.83k stars 236 forks source link

Image Caching is not caching all images in the xmltv #172

Open vexorian opened 4 years ago

vexorian commented 4 years ago

Please first read the documentation. Problems affecting the client, e.g. Plex or Emby should be reported there in the forum.

Describe the bug

With Image Caching enabled. Most images are not actually being cached. The only images that are getting cached are those that are used in the <channel tags. The images that appear only in <programme tags are not cached. If a image happens to be used both in channel and programme tags, it is cached correctly in both.

Server (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Create a xmltv with different src icons both in channel and programme tags.
  2. Enable "Image Caching" in xTeVe configuration.
  3. Generate xTeVe's xmltv

Expected behavior

Screenshots N/A

Desktop (please complete the following information):

Additional context I am in charge of developing dizqueTV, which is a tool to create iptv streams from a plex library. xTeVe is basically the perfect complement to it. In fact, I've been thinking of talking xTeVe officially in the guides as a way to securely share the iptv streams (dTV is very young at the moment and doesn't have any security features). One solution is to use xTeVe as a proxy. Exposing only xTeVe to the outside world while xTeVe is the one that contacts dTV). The stream part of this proposition works great.

The problem is the xmltv. dizqueTV creates programme entries with icon urls. Even though I enabled "image caching", most images are not getting cached, which means that in order for the xmltv to work remotely, I would have to open the dizquetv port, which is a terrible, terrible idea due to the lack of security I've already mentioned. Worse, at the moment the icons are taken from the plex library and the urls expose confidential information, this is an issue with dizquetv at the moment, but until dizquetv is fixed, xteve would be the perfect workaround if not for this caching issue.

mar-mei commented 4 years ago

Ok thanks, that seems like a bug. But has nothing to do with a missing channel logo. For me, all channels have a logo image Two images were cached, two links to the source

vexorian commented 4 years ago

Could it be the size of the image? My channel icons tend to be very small. My program icons are quite large because they are posters from theposterdb.

mar-mei commented 4 years ago

No I do not think so. I have to look at that in the code. xTeVe does not use an image framework. A hash is created from the source URL, which is also the file name for the image cache file. If the file does not yet exist, it will be downloaded and saved. When creating the xteve files, a check is made to see whether a cache file exists, if so, a link is created that points to xteve.

mar-mei commented 4 years ago

Fixed in Beta 2.1.2.0128: https://github.com/xteve-project/xTeVe-Downloads/tree/beta