Feature #4255
Autorec directory name improvement
0%
Description
Hello,
2 years ago a directory feature for recordings was added to tvheadend:
https://tvheadend.org/issues/2123
But this feature does not support any placeholders same as what postprocessor command supports. For example:
Support format strings: Format Description Example value %f Full path to recording /home/user/Videos/News.mkv %b Basename of recording News.mkv %c Channel name BBC world %C Who created this recording user %t Program title News %d Program description News and stories... %e Error message Aborted by user %S Start time stamp of recording, UNIX epoch 1224421200 %E Stop time stamp of recording, UNIX epoch 1224426600
The reason I ask for this is because I have title regexes which match same programs which exist in multiple channels. It makes little sense to put all the recordings of same show from different channels into same directory. Because they may be in different seasons etc. So I would like to set a directory like '%c/Program Name' but this is not supported.
1- It should be easy to implement support for at least few reasonable placeholders, such as %c, %d, %t, %C . It looks like just a matter of copy/paste in dvr_rec.c ?
2- An alternative would be in Recording configuration at Subdirectory Options, there can be an option to use autorec name as subdirectory. So one can use a custom directory for all recordings which match the autorec. Then one can combine Make Subdirectories Per Channel and autorec entry name to accomplish same result.
Thanks!
History
Updated by Jaroslav Kysela over 7 years ago
Add '$$' as the start prefix and then you can use all '$' modifiers in the directory field for every DVR entry or in the autorecs. The formatters are described in 'Format string' field in the DVR config. And yes, the documentation is missing.
Updated by Evren Yurtesen over 7 years ago
Jaroslav Kysela wrote:
Add '$$' as the start prefix and then you can use all '$' modifiers in the directory field for every DVR entry or in the autorecs. The formatters are described in 'Format string' field in the DVR config. And yes, the documentation is missing.
Can you clarify exactly which field and five an example? and since which version this is working? I am using 4.0.9 and I tried $$test/$c and it creates a directory $$test-$c
Updated by Evren Yurtesen over 7 years ago
Jaroslav Kysela wrote:
Latest 4.1.
Can you give a simple example? I will install latest 4.1 and try if I would know what to try thanks!
Updated by Evren Yurtesen over 7 years ago
Thank you! It works! Amazing I would like to close this feature request but I dont know how?