Project

General

Profile

Bug #5765

New Line Character in filename

Added by Martin P. over 1 year ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
General
Target version:
-
Start date:
2019-11-02
Due date:
% Done:

0%

Estimated time:
Found in version:
4.2.8-35~gcfa450ed1
Affected Versions:

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

Recording1.JPG (50 KB) Recording1.JPG Martin P., 2019-11-02 23:43
Recording2.JPG (48.7 KB) Recording2.JPG Martin P., 2019-11-02 23:46
Recording3.JPG (33.5 KB) Recording3.JPG Martin P., 2019-11-02 23:50

History

#1

Updated by Flole Systems over 1 year ago

Try latest master, I think it's fixed already.

#2

Updated by Martin P. about 1 year ago

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

#3

Updated by Flole Systems about 1 year ago

That is not the latest master.

#4

Updated by Martin P. about 1 year ago

I see. So is there a chance that the fix will go into the latest stable?

#5

Updated by Flole Systems about 1 year ago

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.

#6

Updated by Man Oki 6 months ago

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