Feature #4585

RFE for recordings format string: Add variable for number of errors

Added by Ludi K. over 4 years ago. Updated over 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:



First of all, thanks for all the work you put into tvheadend.

As tvheadend keeps track of the errors occurred during a recording, I would like to ask whether you could take into account adding a variable for the number of errors to the format string of the recording.

This way, the users, who for example are using frontends like Kodi, would not have to consult the web interface of tvheadend to see whether the recording is free of error.

Finally, it might even make sense to actually have the variable add the number of errors to the path/filename, only in the case when the number of errors is not 0.

Thanks in advance for taking the enhancement into account.




Updated by Em Smith over 4 years ago

Seems sensible. But may I ask what format string you currently use for recording and where the new format would be placed? If you add a number to the filename then might Kodi try to use it to scrape as an episode/year, especially if your EPG didn't have specific details?

For example if you had 103 errors then this page suggests it would think it was S1 E03:

Or do you mean the error should be reported via the Kodi PVR HTS add-on?


Updated by Jaroslav Kysela over 4 years ago

The "main" issue is that the filename is composed when the recordings starts, so the error counter is not available at this time. Of course, the file can be renamed later.


Updated by Ludi K. over 4 years ago


Sorry for the late reply.

I am currently using the following format to have the necessary information to identify the recording in case I decide to keep it:

But there is also a script that gets called by the post recording hook and that creates among others a .nfo file with the epg description.

Considering Jaroslav's remark however, it might be better making the error information available to the post record script, so that the script can act on it, for example adding the error number to the filename if it is not 0.

Having the information available for the post recording hook would be fine for me, too.

That said, it would also be helpful to have the season and episode information in the recording hook for my .nfo file creation script. Should I open a new issue for the season and episode request?



Updated by Ludi K. over 4 years ago

In the meantime, I think that the error number might be more useful in the post recording hook, as the post recording hook is more powerful than the format string.

Thus, I decided to create a new RFE for the post recording hook:

Also available in: Atom PDF