Forums » Kodi (XBMC) as frontend »
Recordings retention policy
Added by Lothar Albrecht almost 4 years ago
Hello, I wonder why when I do schedule a recording through Kodi the retention policy is 3 month but when I schedule a record through the tvheadend webpage there´s no retention policy (which is what I want cause I set the "keep file checkbox" to forever).
Why is there a difference and how can I prevent files from being deleted after the given time of three month. I´m using Kodi 18.9 from Libreelec 9.2.6, TVheadend Version is 4.2.8-36 Tvh-addon v9.2.0.123
Thanks in advance
L
Replies (1)
RE: Recordings retention policy - Added by Lothar Albrecht almost 4 years ago
Memo to myself, the recording retention policy info is stored in the removal flag for each file in /storage/.kodi/userdata/addon_data/service.tvheadend42/dvr/log/
What I do is use a small script that changes the according flag. I do that once a night via cronjob, problem solved for me.
Be aware that changes require a reboot to at least make them visible, not sure if the log entry would be removed without reboot.
Anyway, afaik the file itself wouldn´t get removed, tvheadend just removes the entries from the recordings list.
Make sure that the path fits your environment! A Backup before trying is recommended!
#!/bin/bash
cd /storage/.kodi/userdata/addon_data/service.tvheadend42/dvr/log
for TheFile in *; do ToReplace=`cat "$TheFile" | grep removal | awk '{$1=$1};1' | cut -d '"' -f2-`; sed -i 's/'"$ToReplace"'/removal\"\:\ 0,/' "$TheFile"; done
But I found the appropriat setting, it´s under Kodi, Settings TV and PVR advanced Timer settings...