Kodi Webserver - how to access local files with URL paths

I asked this question over in the kodi forums and haven’t gotten a reply. It involves tvheadend, so maybe people are thinking it’s in the wrong place, but it’s really more of a kodi web server question, so maybe somebody can help me out here. I’m trying to access local icon files on my RasPi2 with the tvheadend interface. It wants a URL path, but I can’t figure out how to format that or make the folder accessible to the webserver or both.

I have activated the kodi webserver under services and I have checked both options in the “remote control” menu as well. I manually set the port to 8080, since I read that linux sometimes has problems with low numbered ports (like the default 80). I’ve tried about a zillion path variations, including converting the linux filesystem path to base64.

I can access the default http UI and have even tried out other web addons, but none of them seem to give me access to the local filesystem, even though I have added the relevant folder as a media source in the file manager.

In case you couldn’t tell, a lot of this stuff is over my head, so if anyone can offer any guidance on this, it would be much appreciated.

I’m assuming that tvheadend is running on the same device? If so you can use a path like file://home/osmc/tvicons/%C.jpg as the url path to access the files - this works for my setup.

If your settings this in tvheadend>Configuration>General
Chanel Icon Path: file://home/osmc/tvicons/%C.jpg.

The %C is replaced with the channel name in ASCII (safe characters, no spaces etc.).
or %c is replaced with the channel name (URL encoded ASCII).

When you add channels/services the ‘user icon’ field should of changed to
If %C - file://home/osmc/tvicons/bbcone.jpg
if %c - file://home/osmc/tvicons/bbc one.jpg

You can also manually set the paths in this field too, for each channel. This doesn’t use the KODI webserver to access the icons, it reads them off the device directly via the file:// protocol.

Hopefully that helps.

Thanks so much! I’ll try it. I read old posts about people setting up webservers to host their icons, etc, so I guess I was making it a lot more complicated than necessary. I’m assuming that I should change the icon name to exactly match the channel name?

It totally did. I got it working and, in the end, it was a lot less complicated than I was making it out to be. Thanks again.

Its easier if you do, just in-case you re-install you don’t have to put the paths in yourself. The other option is to use the picons - its very similar but a bit more involved to get the images.