Just started thinking it would be nice to get notified when an m3u source guide data runs out.
So to start with, I threw together a shell script that runs every hour (via a scheduled task).
Right now it logs the Titles of shows/movies in the EPG of a channel in a source.
It also creates a daily timestamped log of the count of airings in all sources in the script.
Trying to determine the best way to generate a notification when the airing count is 0.
Shell script (EPG for 8xxx.sh)
#!/bin/sh
# '/volume1/arkives/EPG for 8xxx.sh'
# using pass for a channel in each non-gracenote source, log EPG Titles
# then keep timestamped line count (# Titles) for each source
curl -s http://192.168.1.4:8389/dvr/rules/test --data "{\"EQ\":{\"Channel\":\"9040\"},\"Name\":\"8389 frndly-TVNoEpg 9040 Dove Channel\"}" | jq --raw-output ".[] | \"\(.Title)\"" > "/volume1/arkives/EPG for 8389 frndly-TVNoEpg 9040 Dove Channel.txt"
curl -s http://192.168.1.4:8489/dvr/rules/test --data "{\"EQ\":{\"Channel\":\"1140\"},\"Name\":\"8489 PlexNoEpg 1140 MythBusters\"}" | jq --raw-output ".[] | \"\(.Title)\"" > "/volume1/arkives/EPG for 8489 PlexNoEpg 1140 MythBusters.txt"
curl -s http://192.168.1.4:8489/dvr/rules/test --data "{\"EQ\":{\"Channel\":\"9289\"},\"Name\":\"8489 Pluto 9289 America's Test Kitchen\"}" | jq --raw-output ".[] | \"\(.Title)\"" > "/volume1/arkives/EPG for 8489 Pluto 9289 America's Test Kitchen.txt"
curl -s http://192.168.1.4:8089/dvr/rules/test --data "{\"EQ\":{\"Channel\":\"10237\"},\"Name\":\"8089 SamsungTVPlus 10237 InWonder\"}" | jq --raw-output ".[] | \"\(.Title)\"" > "/volume1/arkives/EPG for 8089 SamsungTVPlus 10237 InWonder.txt"
curl -s http://192.168.1.4:8089/dvr/rules/test --data "{\"EQ\":{\"Channel\":\"20002\"},\"Name\":\"8089 tubi-TVNoEpg 20002 Cosmos\"}" | jq --raw-output ".[] | \"\(.Title)\"" > "/volume1/arkives/EPG for 8089 tubi-TVNoEpg 20002 Cosmos.txt"
echo >> "/volume1/arkives/EPG for 8xxx $(date -Idate).txt"
echo $(date -Iseconds) $(wc -l "/volume1/arkives/EPG for 8389 frndly-TVNoEpg 9040 Dove Channel.txt") >> "/volume1/arkives/EPG for 8xxx $(date -Idate).txt"
echo $(date -Iseconds) $(wc -l "/volume1/arkives/EPG for 8489 PlexNoEpg 1140 MythBusters.txt") >> "/volume1/arkives/EPG for 8xxx $(date -Idate).txt"
echo $(date -Iseconds) $(wc -l "/volume1/arkives/EPG for 8489 Pluto 9289 America's Test Kitchen.txt") >> "/volume1/arkives/EPG for 8xxx $(date -Idate).txt"
echo $(date -Iseconds) $(wc -l "/volume1/arkives/EPG for 8089 SamsungTVPlus 10237 InWonder.txt") >> "/volume1/arkives/EPG for 8xxx $(date -Idate).txt"
echo $(date -Iseconds) $(wc -l "/volume1/arkives/EPG for 8089 tubi-TVNoEpg 20002 Cosmos.txt") >> "/volume1/arkives/EPG for 8xxx $(date -Idate).txt"
Titles in EPG (EPG for 8089 SamsungTVPlus 10237 InWonder.txt)
Ancient Engineering
Ancient Engineering
Ancient Engineering
War Factories
War Factories
Daily timestamped log (EPG for 8xxx 2025-02-14.txt)
# Hourly count of airings in EPG of five non-gracenote FAST source channels
# Generated by Syno Task FastEPGLogs which uses /volume1/arkives/EPG for 8xxx.sh
2025-02-14T15:08:44-08:00 94 /volume1/arkives/EPG for 8389 frndly-TVNoEpg 9040 Dove Channel.txt
2025-02-14T15:08:44-08:00 89 /volume1/arkives/EPG for 8489 PlexNoEpg 1140 MythBusters.txt
2025-02-14T15:08:44-08:00 46 /volume1/arkives/EPG for 8489 Pluto 9289 America's Test Kitchen.txt
2025-02-14T15:08:44-08:00 5 /volume1/arkives/EPG for 8089 SamsungTVPlus 10237 InWonder.txt
2025-02-14T15:08:44-08:00 24 /volume1/arkives/EPG for 8089 tubi-TVNoEpg 20002 Cosmos.txt
2025-02-14T16:00:01-08:00 93 /volume1/arkives/EPG for 8389 frndly-TVNoEpg 9040 Dove Channel.txt
2025-02-14T16:00:01-08:00 88 /volume1/arkives/EPG for 8489 PlexNoEpg 1140 MythBusters.txt
2025-02-14T16:00:01-08:00 45 /volume1/arkives/EPG for 8489 Pluto 9289 America's Test Kitchen.txt
2025-02-14T16:00:01-08:00 6 /volume1/arkives/EPG for 8089 SamsungTVPlus 10237 InWonder.txt
2025-02-14T16:00:01-08:00 24 /volume1/arkives/EPG for 8089 tubi-TVNoEpg 20002 Cosmos.txt
2025-02-14T17:00:02-08:00 92 /volume1/arkives/EPG for 8389 frndly-TVNoEpg 9040 Dove Channel.txt
2025-02-14T17:00:02-08:00 86 /volume1/arkives/EPG for 8489 PlexNoEpg 1140 MythBusters.txt
2025-02-14T17:00:02-08:00 43 /volume1/arkives/EPG for 8489 Pluto 9289 America's Test Kitchen.txt
2025-02-14T17:00:02-08:00 5 /volume1/arkives/EPG for 8089 SamsungTVPlus 10237 InWonder.txt
2025-02-14T17:00:02-08:00 23 /volume1/arkives/EPG for 8089 tubi-TVNoEpg 20002 Cosmos.txt
2025-02-14T18:00:02-08:00 90 /volume1/arkives/EPG for 8389 frndly-TVNoEpg 9040 Dove Channel.txt
2025-02-14T18:00:02-08:00 85 /volume1/arkives/EPG for 8489 PlexNoEpg 1140 MythBusters.txt
2025-02-14T18:00:02-08:00 45 /volume1/arkives/EPG for 8489 Pluto 9289 America's Test Kitchen.txt
2025-02-14T18:00:02-08:00 4 /volume1/arkives/EPG for 8089 SamsungTVPlus 10237 InWonder.txt
2025-02-14T18:00:02-08:00 22 /volume1/arkives/EPG for 8089 tubi-TVNoEpg 20002 Cosmos.txt
2025-02-14T19:00:02-08:00 89 /volume1/arkives/EPG for 8389 frndly-TVNoEpg 9040 Dove Channel.txt
2025-02-14T19:00:02-08:00 112 /volume1/arkives/EPG for 8489 PlexNoEpg 1140 MythBusters.txt
2025-02-14T19:00:02-08:00 43 /volume1/arkives/EPG for 8489 Pluto 9289 America's Test Kitchen.txt
2025-02-14T19:00:02-08:00 5 /volume1/arkives/EPG for 8089 SamsungTVPlus 10237 InWonder.txt
2025-02-14T19:00:02-08:00 21 /volume1/arkives/EPG for 8089 tubi-TVNoEpg 20002 Cosmos.txt