[mythtv-users] Plex integration.
Richard Shaw
hobbes1069 at gmail.com
Mon Mar 15 22:34:26 UTC 2021
I guess I can post the details now...
# cat /usr/local/bin/plexlink
#!/bin/env bash
PLEXDIR=/var/lib/mythtv/plex
if [[ $# -eq 0 ]]; then
# Run for all recordings
/usr/local/bin/mythlink --link $PLEXDIR --format "%T - s%sse%ep"
/usr/bin/symlinks -c $PLEXDIR
else
# Run for a single recording
/usr/local/bin/mythlink --verbose --link $PLEXDIR --format "%T - s%sse%ep" \
--chanid $1 --starttime $2
/usr/bin/symlinks -cd $PLEXDIR
fi
# systemctl cat mythlink.service
# /etc/systemd/system/mythlink.service
[Unit]
Description=Update symbolic links of recordings for Plex
After=mythbackend.service
Requisite=mythbackend.service
[Service]
Type=simple
ExecStart=/usr/local/libexec/mythlink.sh
# systemctl cat mythlink.timer
# /etc/systemd/system/mythlink.timer
[Unit]
Description=Timer for the mythlink service
[Timer]
#OnCalendar=*-*-* 00:00:00
OnCalendar=daily
#OnUnitActiveSec=1d
[Install]
WantedBy=multi-user.target
Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20210315/b18a6ac9/attachment.htm>
More information about the mythtv-users
mailing list