Thought I would raise this for discussion before submitting any of my modified code.
I use caddy to serve media to my KODI instance over the internet, and I need to use a special template to allow KODI to understand the file listing (this is needed because the KODI http scraping code is specialised to
lighttpd directory indexes). I wrote a template the works around this by mimicking the
nginx (simplest) listing.
My solution was very specific and I basically copied the default template and added an
if user-agent is kodi block around the whole thing, rendering either the default listing or a super simple kodi-understandable version as needed. It works fine.
My question is:
Given that some software behaves this way do you think it would be beneficial to the browse plugin to have some extra builtin templates that mimic well known other indexes?
Or if not, would the Caddy project be better off if the browse plugin recognized a KODI UA specifically and adapted it’s template accordingly?
The first seems more general, the second would mean KODI specifically would work out of the box.