#!/bin/bash # Define log file LOGFILE="/iptv/grabber-update.log" # Log the start time and initialize the log file echo "Starting TV guide update: $(date)" > "$LOGFILE" echo "-------------------------------------------------\ -------------------------------\n" >> "$LOGFILE" # # Run the grabbers tv_grab_na_dd --config-file /iptv/conf-texas --days 7 --output /iptv/tvtx.xml >> "$LOGFILE" 2>&1 tv_grab_na_dd --config-file /iptv/conf-canada --days 7 --output /iptv/tvca.xml >> "$LOGFILE" 2>&1 tv_grab_na_dd --config-file /iptv/conf-att --days 7 --output /iptv/att.xml >> "$LOGFILE" 2>&1 # Log the completion time echo "\n----------------------------------------------\ -------------------------------------" >> "$LOGFILE" echo "TV guide update completed: $(date)" >> "$LOGFILE" # Refresh Guide Date curl -s -X POST "http://localhost:8096/emby/ScheduledTasks/Running/bea9b218c97bbf98c5dc1303bdb9a0ca" \ -H "X-Emby-Token: " #The API key is obtained by generating it from Jellyfin app "Dashboard -> API Keys"