I've been working on a Channels DVR specific version of the OliveTin project. The idea is to make this a central interface for the various scripts people have developed, and miscellaneous tricks that require Python, cURL, jq or whatever. I'll build and maintain the container, including whatever dependencies are required for your favorite script or command line magic for Channels DVR.
Here are some screenshots of a few things I have running so far, just to give you an idea of what's possible. I'd like to get some feedback on this idea, and whatever suggestions anyone might have for things to add. OliveTin can do all kinds of stuff, and lends itself quite well to tablets and phones. It's also pretty great for automating stuff that you might want someone else in your family to be able to do in a pinch:
You'll be able to add your own stuff of course, but anything that others might want to do I'd like to include in the container. This will be strictly a Docker with Portainer project, and will run on the same processors as Channels DVR. The interface is super-simple, but supports multiple arguments of various kinds, and produces standard output and error output in log form.
EDIT 2023.12.28 -
Here's the current list of "Actions" supported by OliveTin-for-Channels:
- Comskip on/off by channel
- List channels with Comskip off
- Manually add recordings
- Find Gracenote station IDs
- Fix YouTube thumbnails
- Download TwiT.tv guide data
- Generate channels list in CSV format
- Generate movie list in CSV format
- Scan/Prune local content
- Mark an episode for re-recording
- Channel lineup change notifications
- Generate filtered Channels DVR log
- List sources for a single channel
- Delete Channels DVR recording log files
- Send message to defined Channels clients
- Docker-Compose Examples for Channels & Related Extensions
- Remove Comskip markers from a recording
- Restart or shutdown a Channels DVR server
- Ping Channels DVR server
- Generate a Channels DVR M3U playlist
- Remove commercials based on an EDL file
- Create EDL file from PlayOn recording chapters
- Create subtitles (.srt) file from Closed Captions
- Update Commercials Metadata from LosslessCut LLC File
And, here's what the interface looks like as of the edit date:
Here's the current recommended docker-compose (this project is supported through Portainer):
version: '3.9'
services:
olivetin: # This docker-compose requires little or no editing. Set the Environment variables section of Portainer.
# 2024.10.20
# GitHub home for this project: https://github.com/bnhf/OliveTin.
# Docker container home for this project with setup instructions: https://hub.docker.com/repository/docker/bnhf/olivetin.
image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below.
container_name: olivetin
hostname: olivetin
dns_search: ${DOMAIN} # For Tailscale users using Magic DNS, add your Tailnet (tailxxxxx.ts.net) to use hostnames for remote nodes, otherwise use your local domain name.
ports:
- ${HOST_PORT}:1337
environment:
- CHANNELS_DVR=${CHANNELS_DVR_HOST}:${CHANNELS_DVR_PORT} # Add your Channels DVR server in the form CHANNELS_DVR_HOST=<hostname or ip> and CHANNELS_DVR_PORT=<port>.
#- CHANNELS_DVR_ALTERNATES=${CHANNELS_DVR2_HOST}:${CHANNELS_DVR2_PORT} # Space separated list of alternate Channels DVR servers to choose from in the form hostname:port or ip:port.
- CHANNELS_CLIENTS=${CHANNELS_CLIENTS} # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP.
- ALERT_SMTP_SERVER=${ALERT_SMTP_SERVER} # SMTP server to use for sending alert e-mails. smtp.gmail.com:587 for example.
- ALERT_EMAIL_FROM=${ALERT_EMAIL_FROM} # Sender address for alert e-mails.
- ALERT_EMAIL_PASS=${ALERT_EMAIL_PASS} # SMTP "app" password established through GMail or Yahoo Mail. Do not use your everyday e-mail address.
- ALERT_EMAIL_TO=${ALERT_EMAIL_TO} # Recipient address for alert e-mails.
- UPDATE_YAMLS=${UPDATE_YAMLS} # Set this to true to update config.yaml.
- UPDATE_SCRIPTS=${UPDATE_SCRIPTS} # Set this to true to update all included scripts.
- TZ=${TZ} # Add your local timezone in standard linux format. E.G. US/Eastern, US/Central, US/Mountain, US/Pacific, etc.
- PORTAINER_TOKEN=${PORTAINER_TOKEN} # Generate via <username> dropdown (upper right of WebUI), "My account", API tokens.
- PORTAINER_HOST=${PORTAINER_HOST} # Hostname or IP of the Docker host you're running Portainer on.
volumes:
- ${HOST_DIR}/olivetin:/config # Add the parent directory on your Docker you'd like to use.
- ${DVR_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR network share.
- ${LOGS_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
#- ${DVR2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT} # Note that these volume mounts should always be to /mnt/hostname-port or /mnt/ip-port (dash rather than a colon between).
#- ${LOGS2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
static-file-server:
image: halverneus/static-file-server:latest
container_name: static-file-server
dns_search: ${DOMAIN}
ports:
- ${HOST_SFS_PORT}:8080
environment:
- FOLDER=${FOLDER}
volumes:
- ${HOST_DIR}/olivetin/data:${FOLDER}
restart: unless-stopped
#volumes: # Use this section if you've setup docker volumes named channels-dvr and channels-dvr-logs, with CIFS or NFS, to bind to /mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} and /mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs inside the container. Set DVR_SHARE=channels-dvr and LOGS_SHARE=channels-dvr-logs in this example.
#channels-dvr:
#external: true
#channels-dvr-logs:
#external: true
And some sample environment variables:
TAG=latest
DOMAIN=tailxxxxx.ts.net
HOST_PORT=1337
CHANNELS_DVR_HOST=local-server
CHANNELS_DVR_PORT=8089
CHANNELS_DVR2_HOST=another-server
CHANNELS_DVR2_PORT=8089
CHANNELS_CLIENTS=appletv4k-den firestick-bedroom
ALERT_SMTP_SERVER=smtp.gmail.com:587
ALERT_EMAIL_FROM=username@gmail.com
ALERT_EMAIL_PASS=xxxxxxxxxxxxxxxx
ALERT_EMAIL_TO=username@gmail.com
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Mountain
HOST_DIR=/data
DVR_SHARE=/mnt/dvr
LOGS_SHARE=/mnt/channelsdvr
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PORTAINER_HOST=docker-host
If you're not familiar with binding directories or Docker Volumes to a Docker Container, here's a post with some additional detail:
For those that haven't used Portainer before (highly recommended as a WebUI for Docker!), here's the command line install for it:
docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
cr.portainer.io/portainer/portainer-ce:latest
And, here's step-by-step video I put together on installing OliveTin-for-Channels: