OliveTin for Channels: An Interface for Misc Channels DVR Scripts & Tricks

Yep. I see that in channels_dvr_monitor_channels.sh

nohup python3 -u /config/$foregroundScript.py -i $channelsHost -p $channelsPort -f $frequency $optionalArguments > /config/"$channelsHost"-"$channelsPort"_monitor_channels.log 2>&1 &

Possibly NUL characters are coming from std_error?
Or changing the output redirect from > to >> might fix it?

Thanks for posting that command, as I'm not at my computer atm. Seeing it though, I bet it's the -u flag (buffer flush), which is required for this particular redirection.

I'll see what can be done to cleanup the output.

Getting this error in the logs when trying to create a manual recording. Any ideas?

exit status 2

sh: -c: line 1: unexpected EOF while looking for matching `''

Have you pulled the most recent bnhf/olivetin:latest image, with UPDATE_SCRIPTS and UPDATE_YAMLS both set to true?

I just pulled the latest image and tried again and it errored out with the same error. And yes both are set to true.

Are you seeing the added requirement to specify a recording as a TV Show or Movie in the dropdown at the bottom?

Yes.

And which are option are you using?

TV Show.

Ok, thanks. I'll try to set a manual recording myself, and see what I get. Could you post a screenshot of the parameters you're using?

EDIT: Working here. No error, and the recording shows in the DVR calendar. This is what I used for values:

I tried removing stack and redeploying it and still getting the same error.

Figured out that it didn’t like this link that I put into the image field.

https://www.wwe.com/f/styles/wwe_16_9_xl_r/public/all/2023/11/20231121_SS_WG_Men's_Match_FC_Day_Date--6f60e726b0e8230450fe9fde1eef6b1b.jpg

I ended up finding another and it worked.

https://www.wrestlezone.com/wp-content/uploads/sites/8/2022/09/wwe-survivor-series-war-games-2022.jpg

1 Like

I bet it's the apostrophe in "Men's" in the link -- and I'll fix that for the next build. Thanks for closing the loop on this.

Saw the same behavior using VS Code earlier today. It’s a bit of an edge use case, but I’ll see if there’s anything I can tweak to sort it out.

Ultimately writing the output to a file in the Python script, rather than redirecting console output might be the best fix. I’ll let you know if changing anything in the foreground bash script looks promising.

What worked for me is changing the output redirect > to an append >> in channels_dvr_monitor_channels.sh

nohup python3 -u /config/$foregroundScript.py -i $channelsHost -p $channelsPort -f $frequency $optionalArguments >> /config/"$channelsHost"-"$channelsPort"_monitor_channels.log 2>&1 &

That also has the advantage of preserving the log file if you change parameters or restart the container.

Excellent. I'll make that change in the next build.

I'm working on an "M3U generator" of sorts for Channels DVR using OliveTin. The idea is to both create an M3U using a Channels DVR as the source and curl the results all in one operation. I'd like to get some input on anything I should add to this, but here's what I've done so far:

Are there other options that should be included?

EDIT: Added true/false field for "abr" (Adaptive Bitrate), and "duration" for generating matching optional URL for XML guide data spanning x seconds.

2 Likes

Cool stuff. :+1:

I think what would make it more awesome is if you could display on the screen the list of channels from the source and give the option to the user to change the channel numbers.
Then save it as another source.

Just an idea. :grinning:

Would this mainly be for those using this M3U in non-Channels DVR scenarios? If so, I could probably add some sort of offset option -- e.g. add 10000 to every existing channel number.

If you're using one Channels DVR as a source for another, the option to ignore existing channel numbers and re-assign to another number range is already present in the Custom Channels dialog right?

New OliveTin-for-Channels :test tag build pushed that includes the M3U generator described a few posts back:

The M3U can be seen in stdout, but is also output in ready-to-use form in /config/data. If desired you can host the data directory using the static-file-server container. This gives you a URL you can use on your LAN or Tailnet, and would allow for hosting an edited version of the m3u:

version: '3.9'
services:
  static-file-server:
    image: halverneus/static-file-server:${TAG}
    container_name: static-file-server
    dns_search: ${DOMAIN} # This can be your local or tailnet domain name
    ports:
      - 8080:8080 # Change the value to the left of the colon if 8080 is in use on your system
    environment:
      - FOLDER=${FOLDER} # The name of the folder in the static-file-server container you'd like to host. (usually /web)
    volumes:
      - ${HOST_DIR}/olivetin/data:${FOLDER}
    restart: unless-stopped

Example environment variables:

TAG=latest
DOMAIN=localdomain
FOLDER=/web
HOST_DIR=/data 

In this example, the M3U would be available at http://[olivetin]:8080/[dvr]-[port].m3u