Gotcha, I have the Docker desktop app installed and running ESPN+ for Channels, Pluto for Channels, & ABDtuner on my Mac Pro. I am not familiar with installing Docker Compose just the one liners. How would I go about installing it on my Mac through the terminal?
I did it by first creating a stack. This is where Portainer comes in handy, it works great on my M1 Mac Mini. I copied-and-pasted as instructed above. It looks like this:
I have added Portainer on my Mac through Docker. But, I am now getting this error.
I have tried adding different folder's in the desktop app but can't seem to get permissions.
failed to deploy a stack: Network olivetin-for-channels_default Creating Network olivetin-for-channels_default Created Container olivetin Creating Container olivetin Created Container olivetin Starting Error response from daemon: Mounts denied: The path /data/olivetin is not shared from the host and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing. See https://docs.docker.com/docker-for-mac for more info.
Got it working but now seeing this.
sh: line 1: /config/manualrecordings.sh: No such file or directory
A mistake on my part, that I'll fix on the next build. Go to the directory you're binding /config to and rename manualrecord.sh to manualrecordings.sh
The Bash version of the script just wasn't making the grade, so I incorporated the original Ruby script with a few minor mods to make it OliveTin-friendly. No real world way for me to test it, but it does run without error -- even though I don't have any actual video_groups. 
Re-pull and redeploy the container and give it a try if you would please. A smaller data set to start might be nice. If it works, I've been testing a method to run scripts cron-style (every x minutes or hours) with OliveTin -- and it looks very promising.
EDIT: Be sure to set UPDATE_SCRIPTS and UPDATE_YAMLS to true before you spin-up the container.
I've added support for TWiT.tv guide data as well. Currently, the data file is executed on demand for each OliveTin button push, and can be found in /data in whatever directory on your host computer you have bound (mapped) to /config in the container.
Similar to the Fix YouTube Thumbnails function, once you've tested it we'll add the ability to run it in the background every x minutes/hours. Let me know how it goes.
Alright, trying this again tonight. I have changed the file name to manualrecordings.sh but it's not scheduling anything into my recordings plus it giving an error on the logs.
/config/manualrecordings.sh: line 6: 7:00 * 60: syntax error in expression (error token is ":00 * 60")
* Trying XXX.XXX.XX.XX:8089...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 192.168.254.19 (192.168.254.19) port 8089 (#0)
> POST /dvr/jobs/new HTTP/1.1
> Host: XXX.XXX.XXX.XX:8089
> User-Agent: curl/7.82.0
> Accept: */*
> Content-Length: 318
> Content-Type: application/x-www-form-urlencoded
>
} [318 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Cache-Control: no-cache, no-store
< X-Channels-Dvr-Identifier:
< Date: Wed, 27 Sep 2023 00:55:08 GMT
< Content-Length: 23
< Content-Type: text/plain; charset=utf-8
<
{ [23 bytes data]
100 341 100 23 100 318 2844 39327 --:--:-- --:--:-- --:--:-- 48714
* Connection #0 to host XXX.XXX.XXX.XX left intact
Darn it! I made a very small change to the JSON being sent to to the CDVR, that I didn't think would make a difference -- but it did.
I saw what you're seeing right away.
I modified the script, and rebuilt the container. It's live now on Docker Hub, so stop the stack and go into the stack editor. Click on update, and use the re-pull and redeploy button. Be sure you have environment variables with UPDATE_SCRIPTS and UPDATE_YAMLS set to true first.
With the recent change removed, it's working here, so you should see the same. Let me know when you've tested it if you would please.
Still for some reason getting this error code.
/config/manualrecordings.sh: line 6: 19:00 * 60: syntax error in expression (error token is ":00 * 60")
* Trying XXX.XXX.XXX.XX:8089...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 192.168.254.19 (192.168.254.19) port 8089 (#0)
> POST /dvr/jobs/new HTTP/1.1
> Host: XXX.XXX.XXX.XX:8089
> User-Agent: curl/7.82.0
> Accept: */*
> Content-Length: 314
> Content-Type: application/x-www-form-urlencoded
>
} [314 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Cache-Control: no-cache, no-store
< X-Channels-Dvr-Identifier:
< Date: Wed, 27 Sep 2023 01:29:46 GMT
< Content-Length: 23
< Content-Type: text/plain; charset=utf-8
<
{ [23 bytes data]
100 337 100 23 100 314 3358 45852 --:--:-- --:--:-- --:--:-- 56166
* Connection #0 to host XXX.XXX.XXX.XX left intact
I got a recording setup for just putting in for instance 7pm but when I try to put....time: 10/01/2023 19:00 It ends up erroring like above? Am I inputting something wrong with the wrong syntax?
Nope, me again. I gotta say I'm glad to have somebody besides me testing functionality for manual recordings -- so thanks! This one you can fix yourself in the interest of speed, but I'll update the container too of course.
In the config.yaml file you'll find in the directory on your host you have mapped to /config in the container, add double quotes around {{ time }} on this line:
shell: /config/manualrecordings.sh "{{ name }}" {{ channel }} "{{ time }}" {{ duration }} "{{ summary }}" {{ image }}
Fixed here, so it should work for you too.
EDIT: Container updated now, so you can re-pull if you prefer.
That ended up working! Thank you!
I have another question. Is it possible to be able to add a genre to a recording? For instance, add Pro wrestling so it ends up in my wrestling library collection.
I'm not sure. I'll check it out and let you know though.
Just set Airing.Genres to ["Pro wrestling"]
A look at your /dvr/jobs shows the structure
Thanks for this, I updated and it working fine. All of those "Tiny Desk Concert" videos are now tagged properly with YouTube's thumbnail.
This ran successfully too. I assigned the resulting XML to the custom source where my TWiT.tv livestream comes from, and all seems to be working. Super cool!
Now that @Fofer has tested TWiT.tv guide data generation, I've proceeded with the plan to make that a process that can be executed on a recurring schedule (i.e. x minutes or hours between runs).
In addition, there's an integration with healthchecks.io to execute a "ping" on every guide data update. You can view this online to confirm the background process is active, and set it up to generate an e-mail if the scheduled ping is missed.
Click on the TWiT.tv Guide Data button in OliveTin and you'll see:
Leave the defaults as they are, and it'll run once and terminate. Enter an interval of 24h, and it'll update every 24 hours, and so on. Add the ping URL from healthchecks.io in place of the default, and you'll be able to view the pings on the specified interval:
If you want to kill the background process for any reason, enter 0 for the interval and it will terminate. In all cases, leave the default healthchecks.io URL in place unless you want to add your own. OliveTin does not allow fields to be empty.
The generated XML file can be found under /data in whatever directory on your host you've mapped to /config in the container.
If you'd like to have that file statically hosted, so that you can access it via URL in Custom Channels settings, that can be easily done. I use another container for that called static-file-server. If you're interested in that let me know and I can do a quick post about it.
I love all the new functions captured in OliveTin for Channels. A great place to capture all these utility scripts that I use to augment Channels functionality.
When I view the container logs, I don't see any date/time stamps so it gets a little hard to see what is going on with repeating scripts. Is there any way to add date & time stamps to log entries?
We'd probably have do some custom logging to get what I think you're after. Having some visibility on background script operation is the reason I added the healthchecks.io option. It would be pretty easy to add custom logging, but trickier to do it with log rotations, size limits, and the like.



