Bug #5765
open
New Line Character in filename
Added by Martin P. over 5 years ago.
Updated over 4 years ago.
Found in version:
4.2.8-35~gcfa450ed1
Description
After recording a movie new line characters are added to the file name.
Here is some input to this.
Path chars used: $t/$t.$s_$c_%F_%R$n.$x
Expectation:
\n characters are removed from the file name
Files
Try latest master, I think it's fixed already.
I am afraid to say but I still got the issue on the stable repository.
Checked it today with version "HTS Tvheadend 4.2.8-36~g5bdcfd8ac".
cat /etc/apt/sources.list.d/tvheadend.list
deb https://apt.tvheadend.org/stable bionic main
That is not the latest master.
I see. So is there a chance that the fix will go into the latest stable?
There are no real updates anymore for the old 4.2 version, in fact the plan was to shuffle the version Numbers around (as in move forward) as latest master is currently a lot better than 4.2. Unfortunately there is currently nobody working on it and development is pretty much stalled at the moment.
Here is my workaround (cron) script:
#!/bin/bash
RECORDINGS_DIR=/home/hts/recordings
find "$RECORDINGS_DIR" -type f -cmin +5 -iname '*'$'\n''*' -print0 | while IFS= read -r -d $'\0' file; do
newfile="${file//[[:cntrl:]]/ }"
mv "$file" "${newfile}"
done
It searches for files with newline character (which was changed last time more than 5 min, i.e., stopped recordings) and renames them by replacing any (bash) control character by a space. This should be the same naming like the filename in the dvr log entry.
Also available in: Atom
PDF