Forums » Tutorial and setups »
autorec file naming issue (bug?)
Added by Daisy Reiss almost 10 years ago
Hi all,
with HTS Tvheadend 3.9.2407~gabea248, I have a very strange file naming issue. While with the "record program" recording of one single movie all is fine, the problem only occurs when I use the auto recording feature.
issue:
I would expect f.i. to get the File 'Kommissar-Beck---Die-neuen-Fälle.E05.Das-Monster.mkv' in the Folder '/media/usb220black/DVBT/Krimis/Komissar_Beck/', as defined in the DVR autorec Entry (see details below).
The Help Button text says: "Directory: When specified, this setting overrides the subdirectory rules specified by the DVR configuration and puts all recordings done by this entry into the specified subdirectory. Useful for e.g. recording multiple different news broadcasts into one common subdirectory called "News". "
But it is not there:
ls -la /media/usb220black/DVBT/Krimis/Komissar_Beck/ drwxrwxrwx 2 pi pi 4096 Jan 30 23:12 . drwxrwxrwx 21 pi pi 4096 Jan 31 21:52 ..
instead, I found a new, crazy named subfolder with a lot of minus signs, one level up:
ls -l /media/usb220black/DVBT/Krimis/-media-usb220black-DVBT-Krimis-Komissar_Beck/ returns: drwxrwxrwx 2 hts video 4096 Jan 30 23:33 . drwxrwxrwx 21 pi pi 4096 Jan 31 21:52 .. -rw-rw-rw- 1 hts video 1786205085 Jan 31 00:47 Kommissar-Beck---Die-neuen-Fälle.E05.Das-Monster.mkvSo for my eyes, it looks like the filename was creates with the Rule:
- take the global path from assigned profile
- if another directory is specified in the autorec definition, take this + convert all slashes to '-', then append it to the global path
- finally, append the file name
- take the global path from assigned profile
- if another directory is specified in the autorec definition, throw away the global path, take the override path instead
- finally, append the file name
Here are my global recording profiles, for your reference:
Configuration | Recording | Digital Video Recorder Profiles:
Profile 1: *(Default Profile)* Recording File Options: /var/tvrecord2/DVBT 0666 UTF-8 [x] Tag Files [x] Skip Commercials Subdirectory Options: 0777 [ ] per day [ ] per channel [ ] per title Filename Options: [ ] Channel in Filename [X] Date in Filename [X] Time in Filename [ ] Episode in Filename [X] Episode before Date & Time [X] Subtitle in Filename [ ] Do not include Title [ ] Remove unsafe chars [x] replace whitespace with '-' [ ] Windoze compatible
and
Profile 2: *Krimi-named* Recording File Options: /media/usb220black/DVBT/Krimis <-- this is different from default 0666 UTF-8 [x] Tag Files [x] Skip Commercials Subdirectory Options: 0777 [ ] per day [ ] per channel [ ] per title Filename Options: [ ] Channel in Filename [ ] Date in Filename <-- this is different from default [ ] Time in Filename <-- this is different from default [ ] Episode in Filename [X] Episode before Date & Time [X] Subtitle in Filename [ ] Do not include Title [ ] Remove unsafe chars [x] replace whitespace with '-' [ ] Windoze compatible
DVR Autorec Entries
Directory: /media/usb220black/DVBT/Krimis/Komissar_Beck <-- this is different from assigned Profile Title (Regexp): (kommissar beck) .. DVR Configuration: Krimi-named
Any hints for me?
Or is it just a bug?
If it's a bug, where to report this bug for the coders?
THX,
Daisy
Replies (2)
RE: autorec file naming issue (bug?) - Added by Prof Yaffle almost 10 years ago
Looks like a bug to me - almost as if some 'remove unsafe characters' is seeing the / characters, deciding they've no place in a filename (which they haven't because they're specifying the path) and replacing them with - characters for safety. I can't see how that behaviour is useful to anyone, hence the conclusion that it's unintentional and thus a bug.
You can raise a new bug from 'New Issue' at the top of this (and any other) screen.
RE: autorec file naming issue (bug?) - Added by Daisy Reiss over 9 years ago
Prof Yaffle wrote:
You can raise a new bug from 'New Issue' at the top of this (and any other) screen.
I did it. [[https://tvheadend.org/issues/2667]]
A nice guy from the coding team made some clearification in the online help.
Now it is fixed by telling the users, how it works under the hood.
I'll will change my recording profiles the way, the general rule (default profile) will only contain what I call 'the unspecified base path', which is
"/media/usb220black/DVBT/" in my case.
Next, the 'bit more' specific rules will be changed
For Regex "(^Tatort)|(^SOKO)|(^Kommissar)|(^Inspe.tor)", folder "/media/usb220black/DVBT/Krimis" to new relative folder "Krimis" For Regex "(Action)|(Schwarzeneger)|(Statham)|(Willis)", folder "/media/usb220black/DVBT/Action" to new relative folder "Action" For Regex "( von oben)|(sch.*ner land)", folder "/media/usb220black/DVBT/Travel" to new relative folder "Travel"
and so on.
As one can guess, my "Kommissar Beck - die neuen Fälle" rules will not work with
Regex "^Komissar.*Beck.*$", folder "/media/usb220black/DVBT/Krimis/Kommisssar_Beck" changed to new relative folder "Krimis/Kommisssar_Beck"since this would result in
"/media/usb220black/DVBT/Krimis-Kommissar_Beck"
which would be in parallel to "Krimis", instead of a sub-folder of "Krimis". Finally, I do not see an smart solution, but also I do not see a dramatical impact on the user experience, so I think I'll change it to a more flat hierarchy like:
Regex "^Komissar.*Beck.*$", folder "/media/usb220black/DVBT/Krimis/Kommisssar_Beck" changed to new relative folder "Krimis_(Beck)"
"ls -l /media/usb220black/DVBT/" (or "dir \\PVR.home\DVBT\") will then look like:
drwxrwxrwx 8 pi pi 4096 Feb 6 09:40 ./ drwxrwxrwx 5 nobody nogroup 4096 Feb 1 16:47 ../ drwxrwxrwx 3 pi pi 4096 Feb 8 01:53 Action/ drwxrwxrwx 2 pi pi 4096 Feb 6 09:41 Movies/ drwxrwxrwx 2 pi pi 4096 Feb 7 12:23 Fun/ drwxrwxrwx 17 pi pi 4096 Feb 8 00:25 Krimis/ drwxrwxrwx 17 pi pi 4096 Feb 8 00:25 Krimis_(Beck) drwxrwxrwx 17 pi pi 4096 Feb 8 00:25 Krimis_(Barnaby) drwxrwxrwx 17 pi pi 4096 Feb 8 00:25 Krimis_(Linley) drwxrwxrwx 17 pi pi 4096 Feb 8 00:25 Krimis_(VargVernum) drwxrwxrwx 17 pi pi 4096 Feb 8 00:25 Krimis_(Wallander) drwxrwxrwx 3 pi pi 4096 Feb 7 20:12 Travel/ -rw-rw-rw- 1 hts video 1321802770 Jan 31 01:05 WDR-Rockpalast---Doro.mkv -rw-rw-rw- 1 hts video 976321184 Jan 22 17:15 ZDF.mkv