dave-p/TVHadmin

ideas from my epg

Closed this issue · 6 comments

Hi,
I too wrote an EPG for TVH and it's nowhere near as nice looking as yours, so I thought maybe we can share some ideas.

Please feel free to steal any ideas and code from mine:
https://github.com/speculatrix/tvh_epg

Here's some things I would do...

things I would add to it in configuration:

  • persistent auth token setting
  • separate URL for connection to service for internal use vs the URL that is given to streaming players because localhost might be better for the former

things I would add to it in timeline view:

  • persistent auth token for streaming
  • when you click, set the downloaded file to be "tvheadend.m3u" so you can open it from the browser in chosen app, e.g. vlc
  • in timeline, hover the mouse for more information, the 2nd title and exact start and end times
  • add chromecast support
  • add a button to record the show
  • filter channels by name or tag

things I would add in recordings view:

  • when you click, set the downloaded file to be "tvheadend.m3u" so you can open it from the browser in chosen app, e.g. vlc
  • set the URL to contain username/password for the streaming player
  • filter by name or channel or something

It seems a few of us have been using our "lockdown" time to write Tvheadend interfaces...

I've created a Javascript version of TVHadmin - https://github.com/dave-p/TVHadmin-JS
It's pure Javascript with no external dependencies and loads from the Tvheadend server - no external web server needed. It uses the same authentication as the native web interface and stores config data in a cookie on the client. The only requirement is a reasonably up-to-date browser on the client - IE definitely will not work.

I've already added a few of your suggestions to the JS version and I'll port them back to the PHP one. On the timeline screen you can click on the current event to view it, and click on a future event to set a timer. Events with timers already set are shown in red.

Hover text on the timeline screen should already show the event description. However EPG sources provide subtitle/summary/description information in different ways and your provider may use a method I've not thought of. Channels can be filtered by tag, though the interface is not a clear as I would like - maybe just better instructions!

Re downloading m3u files, Tvheadend already does this.

The "/play" function is a front-end for /dvrfile and /stream and returns an m3u playlist if the user-agent is not on a specified list. See https://github.com/dave-p/TVH-API-docs/wiki/Other-Functions#play.

what I do in the download is to tell the browser to save the file as tvheadend.m3u, explicitly with the file extension. I know TVH's own web interface gives you an m3u file but it doesn't have the extension and thus you can't double click it. or at least that's the case for me using Chrome on a linux desktop.

If you agree I'd like to use a hacked version of part of your code in the 'Examples' section of the API documentation. There is a simple web application which produces a list of timers, coded in PHP and Javascript, and I've created a version in Python.
tvh.py.txt
I'll acknowledge you as the source.

you're welcome to use any part of my code or documentation, it's GPL licensed, am happy to help your endeavours.

if I get the time I want to dig into the TVH sources and allow persistent auth tokens to give access to recordings, not just streams, so you don't have to past user:pass in the URL to the recording.

I actually found out how to do that, there are two possible URLs when using perst auth tokens, one works, one doesn't.