Dear all, this is not entirely related to tvheadend rather comskip with tvheadend and folder management.
If this is inappropriate just delete the post and notify me and I'll look for support elsewhere.
I record a tv channel every day for two hours. ComSkip cleans out most commercials and that's that. The recording profile is set to retain recordings (Recorded file(s) retention period:) for three (3) days and then remove them, this works fine.
The recording file itself is removed but the folder created is still there and the logs from comskip and some other files are retained, so after a while I have a bunch of folders with files but the recordings itself are removed. Like I say, tvhedend does exactly what it should and everything works, just leaves lot of artifacts... anyone have a solution for this?
My own idea that I want to test here is this - would this work or is there a better way.
The recorded filename is always .ts, so some-genereated-name.ts
Create a script (cleanup-recorings-folder.sh) that looks in every folder under /media/recordings/ for folders where the is no file named *.ts in that folder and removes the folder.
Update the recordings post-processor command to do comskip first and then the clean script.
/usr/bin/comskip --ini=/config/comskip/comskip.ini "%f" & /cfgfiles/tvheadend/cleanup-recorings-folder.sh
Would this work?
I'm not much of a shell scripter so if anyone have something like this or can point me in the right direction I'd be grateful.
My environment is OpenMediaVault 5 and running this docker image:
https://hub.docker.com/r/linuxserver/tvheadend