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

Would you consider modifying your deletelogs.sh script.

As is, it's deleting the Logs/recordings directory.

Background script initiated, with 1d between runs for 192.168.1.4:8089
Deleting recording log files for 192.168.1.4:8089 that are more than 1 days old
Background deletelogs process running for 192.168.1.4:8089
foreground.sh is exiting for deletelogs with exit code 0

Deleting recording log files for 192.168.1.4:8089 that are more than 1 days old
Deleting recording log files for 192.168.1.4:8089 that are more than 1 days old
find: '/mnt/192.168.1.4-8089/Logs/recording': Deleted
Your Channels DVR Server's /dvr directory needs to be bound to this container

Adding a -mindepth 1 option to the find command will work.

find /mnt/$dvrDir/Logs/recording -mindepth 1 -type d -mtime +$recordingLogAge -exec rm -r {} \;

Or modifying the find path used will work.

find /mnt/$dvrDir/Logs/recording/* -type d -mtime +$recordingLogAge -exec rm -r {} \;

Alrighty then! Very big update to OliveTin-for-Channels this morning. pushed as bnhf/olivetin:latest (aka bnhf/olivetin:2026.01.27). Before I describe some of the details, let me start by saying this update will typically require deleting "Cached images and files" (all time) and a <Ctrl>F5 in your browser. If you see a big red warning box, do those two things and you should be good.

Front end changes:

We've moved to using the most recent version of the base OliveTin "2K" package, though this was customized somewhat for best compatibility with OliveTin-for-Channels.

The biggest change you'll notice, is that output is now in a single "xterm" window. This means "standard output" and "standard error" are both displayed in this window, much like a typical terminal. Most Actions also produce debug output, which is now directed to a file with a separate Action to view the debug.

Actions where the icon changes color now have that happen automatically, without the need for browser refresh. Project One-Click Actions are now in on the green icon fun, and will display green for any CDVR extension with a running container. Running projects are identified at OliveTin startup, and then the icons are updated when you install or remove projects using One-Click.

The other big change is that, for the most part, it's no longer mandatory to use the OliveTin Dashboard -- as you can add very full OliveTin functionality to the CDVR WebUI, via a couple of userscripts. Almost all Actions are available this way, and they look like this in the WebUI (minus the red boxes I used in these screenshots of course):

The OliveTin dropdown:

Note that any Actions that have green icons in the Dashboard, will have a green dot next to them in the dropdown. These green dots are "live", so they will immediately reflect changes:

The One-Click dropdown:

Here, any supported projects with a running container will have a green dot -- whether installed as a One-Click or not.

The Extensions dropdown:

The intention of this dropdown is to give immediate access to the WebUI for a supported project WITHOUT opening a new tab. The idea is to give a more integrated feel to community projects, and to allow the back arrow to return you to the CDVR WebUI. Those projects with green dots and highlighted text, are running, and should be accessible.

And finally, here's an example One-Click Action window. All Actions and One-Clicks in the WebUI look similar to this, with the output opening just below after clicking Run:

There's more detail here on this "Project WebUI+" portion of this latest OliveTin-for-Channels:

Be sure to let me know if you run into issues -- given the wide scope of this latest update!

Done, and included in this morning's update.

1 Like

Thanks. It's been working. No longer deletes the Logs/recordings directory

Maybe nit picking, but I'm puzzled over results of using command line find -mtime +[days]

-mtime +0 shows results of modified "more than 24 hours ago" (should be more than 0 hours ago)
-mtime +1 shows results of modified "more than 48 hours ago" (should be more than 24 hours ago)
That doesn't jive with the documentation for find -mtime +(int([days]) * 24hrs).
-mtime -[days] results agree with the documentation.

This is with running it on my NAS at the command line and exec'd into the OliveTin container.

Is it just me, or is this a known issue with find -mtime +[days]?

Good morning!

I was notified by DIUN a couple days ago that there's a new OliveTin for Channels docker container pushed on 2026-01-29 04:19 at Docker Hub.

I've been waiting to update until I saw what the changes in that release were.

I'm looking everywhere I can think of, but I can't find release notes showing what the changes were.
The github page hasn't been updated since 2025-12-19 and the releases page since 2026-01-06.

Is there somewhere else I can look for the latest release notes?

No, but I'll do my best to describe what the latest OliveTin-for-Channels offers, along with a bit of back story:

The base olivetin made some pretty significant changes in the early part of 2024 that represented breaking changes to OliveTin-for-Channels. As a result, I've continued to use the last compatible olivetin deb file as a base for the CDVR version.

  • I've been chipping away at the issues for some time (behind the scenes), and have been able to deal with those breaking changes through a combination of methods:

  • Modified version of base olivetin. I made a modest number of changes here -- only those that were absolutely necessary for OliveTin-for-Channels to continue working in a familiar fashion.

  • Custom "theme" for the CDVR version of olivetin -- which are appearance changes, to optimize the way the WebUI looks.

  • Custom .js to address several issues in the newer version, that were keeping me from updating to the newer codebase. Most notably the way the dialog boxes responded whenever the config.yaml file was updated behind the scenes (required to change the icon color and change defaults for active Actions).

  • The base olivetin moved from separate Standard Output and Standard Error in the results window, to a single xterm-based output, with those mixed together. For OliveTin-for-Channels, that meant sending the debug output to Standard Error was no longer desirable. I changed a number of scripts early last year, when I started this update process, but needed to modify them all for this new release.

So that's the heart of what was changed as far as scripts, and the base olivetin are concerned. Lots of changes, but most are relatively minor.

The big change with this new version, is the option to implement several userscripts, which add OliveTin, One-Click and Extensions dropdowns to the CDVR WebUI. This is totally optional, but the idea is to provide an alternate frontend to OliveTin-for-Channels, that can be accessed through the CDVR WebUI. I love this option personally, and am using it all the time, as it gives a very unified feel to CDVR + Extensions.

More here:

EDIT: Also, I pushed updates to the repo this AM -- thanks for the reminder.

Thanks!
Wow, that's a lot of behind the scene changes.

Did the gracenote function in Olivetin stop working? I was trying to use it today and all I get is a blank screen. I checked the logs and this is what was in it.

/config/stationid.debug.log 2026-02-05 20:22:18

+ dvr=channelsdvr:8089
++ echo ksaz
++ sed 's/ /%20/g; s/^/%22/; s/$/%22/'
+ stationName=%22ksaz%22
+ curl -s http://channelsdvr:8089/tms/stations/%22ksaz%22
+ jq --raw-output '
    sort_by(.type, .name) | .[] |
    "type: \(.type), name: \(.name), callSign: \(.callSign), stationId: \(.stationId), affiliate: \(.affiliateCallSign)\n  logo: \(.preferredImage.uri)\n"
  '

Here's what I get with that same search:

Maybe channelsdvr isn't resolving? Try using the ping Action in once mode to see if that's working.

Got this one

Thu Feb  5 20:58:42  2026
HTTP Status: 000
Effective URL: http://channelsdvr:8089/
One time run mode used...
foreground.sh is exiting for pingcdvr with exit code 0

is that correct?

I tried using the IP address and I do get the same results as you now. I guess something changed because it used to work with me just putting in the name of the server. I don't mind using the IP though.

No. This indicates failure:

HTTP Status: 000

Having a few issues.

I was again notified there's a new version of OliveTin for Channels 2026.02.09, but can't find release notes to see what changed.

Anyway, I updated from 2026.02.02 to 2026.02.09 and my Delete Channels DVR Recording Log Files actions which were running before the update is no longer green. Refreshed browser many times.

I checked the log files and it appears the actions are running and the logs were replaced when I updated, but shouldn't have been (I have PERSISTENT_LOGS=true).

192.168.1.4-8489_deletelogs_latest.log

Background script initiated, with 1d between runs for 192.168.1.4:8489
Deleting recording log files for 192.168.1.4:8489 that are more than 1 days old
find: '/mnt/192.168.1.4-8489/Logs/recording/*': Deleted
Background deletelogs process running for 192.168.1.4:8489
Background deletelogs process running for 192.168.1.4:8089
Background deletelogs process running for 192.168.1.4:8090
Background deletelogs process running for 192.168.1.4:8189
Background deletelogs process running for 192.168.1.4:8190
Background deletelogs process running for 192.168.1.4:8289
Background deletelogs process running for 192.168.1.4:8389
foreground.sh is exiting for deletelogs with exit code 0

The last update was to change project one click for PrismCast. Not sure if there were other changes.

Could you post the output from the OliveTin Actions Debug Log Viewer for this Action?:

EDIT: Also, from your OliveTin config directory (on the host, or exec'd into the container), could you post the results of this (redact your healthchecks.io UUIDs if you're using them):

root@htpc6:/data/olivetin# cat *deletelogs.running
media-server8:8089 deletelogs 7d https://hc-ping.com/[Redacted]

I restarted the OliveTin container, then grabbed what you asked for.

/config/deletelogs.debug.log 2026-02-10 13:35:29

+ dvr=192.168.1.4:8489
++ echo 192.168.1.4:8489
++ awk -F: '{print $1}'
+ channelsHost=192.168.1.4
++ echo 192.168.1.4:8489
++ awk -F: '{print $2}'
+ channelsPort=8489
+ runInterval=1d
+ healthchecksIO=
++ echo 1d
++ sed s/d//
+ recordingLogAge=1
+ [[ 1d == \o\n\c\e ]]
++ basename /config/deletelogs.sh
++ sed s/.sh//
+ scriptBaseName=deletelogs
+ logFile=/config/192.168.1.4-8489_deletelogs_latest.log
+ logTemp=/tmp/192.168.1.4-8489_deletelogs_latest.log
+ runFile=/tmp/192.168.1.4-8489_deletelogs.run
+ dvrDir=192.168.1.4-8489
+ true
+ '[' -d /mnt/192.168.1.4-8489/Logs/recording ']'
+ echo 'Deleting recording log files for 192.168.1.4:8489 that are more than 1 days old'
+ find '/mnt/192.168.1.4-8489/Logs/recording/*' -type d -mtime +1 -exec rm -r '{}' ';'
+ cp /config/192.168.1.4-8489_deletelogs_latest.log /tmp
+ sed -i 's/No such file or directory/Deleted/g' /tmp/192.168.1.4-8489_deletelogs_latest.log
+ cp /tmp/192.168.1.4-8489_deletelogs_latest.log /config
+ '[' '!' -d /mnt/192.168.1.4-8489/Logs/recording ']'
+ [[ 1d == \o\n\c\e ]]
+ [[ -n '' ]]
+ [[ 1d != \o\n\c\e ]]
+ touch /tmp/192.168.1.4-8489_deletelogs.run
+ sleep 1d
+ sed -i '/#deletelogs icon/s|img src = .* width|img src = "custom-webui/icons/channels.png" width|' /tmp/config.yaml
+ sed -i '/#deletelogs interval default/s/default: .* #/default: 1d #/' /tmp/config.yaml
+ [[ -n '' ]]
+ echo '192.168.1.4:8489 deletelogs 1d https://hc-ping.com/your_custom_uuid'
+ sleep 2
+ runningScripts
+ servers=($CHANNELS_DVR $CHANNELS_DVR_ALTERNATES)
+ for server in "${servers[@]}"
++ echo 192.168.1.4:8489
++ awk -F: '{print $1}'
+ serverHost=192.168.1.4
++ echo 192.168.1.4:8489
++ awk -F: '{print $2}'
+ serverPort=8489
++ ps -ef
++ grep '[d]eletelogs.* 192.168.1.4:8489'
++ awk '{print $2}'
+ activeProcess=2233
+ [[ -n 2233 ]]
+ echo 'Background deletelogs process running for 192.168.1.4:8489'
+ for server in "${servers[@]}"
++ echo 192.168.1.4:8089
++ awk -F: '{print $1}'
+ serverHost=192.168.1.4
++ echo 192.168.1.4:8089
++ awk -F: '{print $2}'
+ serverPort=8089
++ ps -ef
++ grep '[d]eletelogs.* 192.168.1.4:8089'
++ awk '{print $2}'
+ activeProcess=454
+ [[ -n 454 ]]
+ echo 'Background deletelogs process running for 192.168.1.4:8089'
+ for server in "${servers[@]}"
++ echo 192.168.1.4:8090
++ awk -F: '{print $1}'
+ serverHost=192.168.1.4
++ echo 192.168.1.4:8090
++ awk -F: '{print $2}'
+ serverPort=8090
++ ps -ef
++ grep '[d]eletelogs.* 192.168.1.4:8090'
++ awk '{print $2}'
+ activeProcess=749
+ [[ -n 749 ]]
+ echo 'Background deletelogs process running for 192.168.1.4:8090'
+ for server in "${servers[@]}"
++ echo 192.168.1.4:8189
++ awk -F: '{print $1}'
+ serverHost=192.168.1.4
++ echo 192.168.1.4:8189
++ awk -F: '{print $2}'
+ serverPort=8189
++ ps -ef
++ grep '[d]eletelogs.* 192.168.1.4:8189'
++ awk '{print $2}'
+ activeProcess=1045
+ [[ -n 1045 ]]
+ echo 'Background deletelogs process running for 192.168.1.4:8189'
+ for server in "${servers[@]}"
++ echo 192.168.1.4:8190
++ awk -F: '{print $1}'
+ serverHost=192.168.1.4
++ echo 192.168.1.4:8190
++ awk -F: '{print $2}'
+ serverPort=8190
++ ps -ef
++ grep '[d]eletelogs.* 192.168.1.4:8190'
++ awk '{print $2}'
+ activeProcess=1341
+ [[ -n 1341 ]]
+ echo 'Background deletelogs process running for 192.168.1.4:8190'
+ for server in "${servers[@]}"
++ echo 192.168.1.4:8289
++ awk -F: '{print $1}'
+ serverHost=192.168.1.4
++ echo 192.168.1.4:8289
++ awk -F: '{print $2}'
+ serverPort=8289
++ ps -ef
++ grep '[d]eletelogs.* 192.168.1.4:8289'
++ awk '{print $2}'
+ activeProcess=1637
+ [[ -n 1637 ]]
+ echo 'Background deletelogs process running for 192.168.1.4:8289'
+ for server in "${servers[@]}"
++ echo 192.168.1.4:8389
++ awk -F: '{print $1}'
+ serverHost=192.168.1.4
++ echo 192.168.1.4:8389
++ awk -F: '{print $2}'
+ serverPort=8389
++ ps -ef
++ grep '[d]eletelogs.* 192.168.1.4:8389'
++ awk '{print $2}'
+ activeProcess=1936
+ [[ -n 1936 ]]
+ echo 'Background deletelogs process running for 192.168.1.4:8389'
+ exit 0
+ finish
+ echo -e 'foreground.sh is exiting for deletelogs with exit code 0\n'
+ backgroundWait=0
+ maxWait=30
+ '[' 0 -lt 30 ']'
+ [[ -f /tmp/192.168.1.4-8489_deletelogs.run ]]
+ break
+ nohup /config/finish.sh /tmp/config.yaml
+ '[' -f /config/192.168.1.4-8489_deletelogs_latest.log ']'
+ cat /config/192.168.1.4-8489_deletelogs_latest.log
root@olivetin:/config# cat *deletelogs.running
192.168.1.4:8089 deletelogs 1d https://hc-ping.com/your_custom_uuid
192.168.1.4:8090 deletelogs 1d https://hc-ping.com/your_custom_uuid
192.168.1.4:8189 deletelogs 1d https://hc-ping.com/your_custom_uuid
192.168.1.4:8190 deletelogs 1d https://hc-ping.com/your_custom_uuid
192.168.1.4:8289 deletelogs 1d https://hc-ping.com/your_custom_uuid
192.168.1.4:8389 deletelogs 1d https://hc-ping.com/your_custom_uuid
192.168.1.4:8489 deletelogs 1d https://hc-ping.com/your_custom_uuid

bnhf/olivetin:latest (aka bnhf/olivetin:2026.02.10) pushed this afternoon with a fix for the CDVR icon color change (purple to green) not happening for certain recurring Actions.

Thanks @chDVRuser for reporting this issue!

Thanks!
It still has the issue with PERSISTENT_LOGS=true
My *deletelogs_latest.log files get overwritten each time I update or restart the container.

No, but that's because this particular script didn't have that option implemented. I'll take a look at adding that, once I know the green icon handling is working properly for you.

1 Like

That's working

1 Like