A different DVR Schedule view

I was playing around with API calls I found here on the forum this weekend, and came up with a different view for the DVR schedule... This came about because an update was released, but I didn't know when it would be applied due to the number of recordings scheduled, and I wanted an easier way to see when NO shows would be recording.

Here's what I came up with:
Screenshot 2022-01-03 191618

It's not shown, but the start date/time and endtime are displayed as a 'tooltip' if you hover over the red bar.

The background is shown in 15 minute stripes... I record the majority of shows with a 3 minute lead in time and a 3 minute tail in case the broadcaster's clock is off.

I'm posting this to github so you're free to download and play around with it...

I'm not an active developer, and I'm just learning python, so go easy on me! The CSS / tables are MESSY, but I accomplished my goal to get everything to line up in MY browser (YMMV!!)

Have Fun!

EDIT: Forgot to mention that this screen is WIDE - it is based on how far your schedule goes out... so there will be LOTS of scrolling involved.

EDIT 2: Also forgot to mention that the last few lines will NOT display properly as the code sits -- it gets squished up against the right side of the bounding table... haven't bothered to try to fix it yet.

4 Likes

Any way to separate or choose the sources?
Since you don't have to worry about tuner conflicts with TVE/M3U channels, I could see this being a very useful tool for pointing out conflicts with HDHR tuners.

I don't know -- I wasn't thinking about that when I made it... Lemme think about that for a minute...

So, yes. Source is exposed in the json returned by the API. I'll play around with that... maybe add a dialog at the top that will let you select the source... source could also be listed next to the recording runtime... that would give a quick easy way to see source conflicts.

If you could, I think that would be the way to go. Multiple source selection would allow selecting more than one HDHR if you have them.
I'm sure many users with HDHR tuners would see value in that since there's no conflict management or warnings in Channels DVR. You have to look at the recording schedule and do mental calculations.

In responding "Yes" to your original query, I may have spoke too soon. *Channels-DVR is new to me!

I don't have an HDHR tuner to test with, so I'm not sure what the data will show... DeviceID populates when a recording is happening... the "source" I noticed in the json is not the same thing.

I'll keep looking. Maybe I'll have to buy a tuner to play with... haven't done so because where I live there's almost NO watchable channels OTA... I'm kind of in a dead zone without raising up a high arial, which I cannot do (not my house).

I've had this same problem so many times! I've been thinking about suggesting a different view too for a while now, more like a calendar type of view.

What you have is a very good start. Nice work!

1 Like

I should have realized that. I assume (I'm not fluent in Python) that it's pulling the schedule from /dvr/jobs

def getJobs():
        result = requests.get(channels_dvr + "dvr/jobs")

and that has DeviceID = null until the recording actually starts and then it appears in recorded jobs /dvr/files.

So it sounds like that idea went up in smoke. Thanks for checking.

I'm trying to work out how to map the channel number to the deviceID... but I don't know if it will work for what you want or not... would replicating the "Source" selector from the guide accomplish what you're looking for? I think I might be able to accomplish that...

6 posts were split to a new topic: How can I record Cook's Country and America's Test Kitchen?

Thanks, but I wouldn't bother unless you're looking for a real challenge.
The only "Source" in the scheduled jobs json is for the EPG provider tms (Tribune Media Services) Gracenote.

To map channel numbers to source Devices would require looking up the channel number in /devices, but ignoring those listed as hidden or not enabled.
That would get you the DeviceID's having that channel number.
On top of that, Channels DVR could have multiple "potential candidate" channels to record the job from as listed in the scheduled job json
"Channels": ["1290","1190","1090","790"] see this post Sport Program Priority Not Recorded - #23 by chDVRuser

Yeah — that’s the approach I took… it wasn’t difficult to match everything up… I finished it last night. I’ll push the changes to GitHub later today…

I didn’t do anything (yet) with the potential channels list… only the channel selected to record on…

1 Like

Starting to go off-topic. Please start another topic unless you're discussing the OP's schedule viewer.

Posted the update -- I added a source selector to the top and colorized the sources in the display... not sure what I'm going to do with content that has multiple potential sources... for now it's using the source matched to the channel found in "Airing" in the json.

Thanks. I'll have to give your code a try this weekend when I can get python3 running in a container.

So - a few modifications were made... The list can be filtered by assigned source with a dropdown selector similar to what is seen on the html guide page, each source shows as a different color, and the current time is displayed as well to see progress within active recordings:

For me, this has been a fun exercise that has helped me to understand the channels-dvr interface... Hopefully somebody else can find it useful...

2 Likes

Anyone have a suggestion on what the slimmest container image is I could use to run this?
alpine, slim-bullseye, slim-buster?
https://hub.docker.com/_/python/

Alpine is usually the smallest.

1 Like

OK I'll try the latest stable Alpine version.

Just wanted to let the OP know I'm not a developer, or versed in Python.
The only Python I ever ran was the original pyTiVo on Python v2 on my old, retired Win-7 PC.

I plan to bind mount /usr/src in the container to a local directory on the machine I run it on and put the channels-dvr-gantt.py script there to easily edit/replace and run it interactively in the container to test.

Has anyone else run this yet?
I've read that Python is a pain with dependencies, but not sure what that would mean trying to run it in a container.

I'm running on Debian 11 with standard python3 install from apt repository... I don't believe there are any dependencies outside of the standard install... I'm not a docker guy... if I want space to run something in I spin up a full VM (I run proxmox on an ancient dell desktop, and it's more than powerful enough to run everything for my testing... including channels). :smile:

Thanks, will give it a try this weekend running interactively in a Python3 container.