Live TV - organising recordings in folders
#1
I've recently got Tvheadend running with Kodi on a RasPi and I'm very pleased with it.
One odd thing has me stumped though - can you help?

I'm booting to a USB hard drive (SDA) and have the kodi folders there, one of which is named recordings - that's all fine :-)

When a new recording is created by Tvheadend, it is put into that directory as expected. I do not however want to have all recordings in one huge directory, I'd prefer to have them in sub-directories that are named (e.g. by TV user and then by show etc).

I know Tvheadend does not have the ability to allow me to specify to any great degree where a recording should be placed therefore I am happy to periodically move them manually using the built in file browser. When I've tried this however, the recordings are no longer visible under the TV | Recordings menu.

At first glance, it would seem that Kodi (or probably the Tvheadend client) does not understand sub folders however I know that is not the case because if I configure Tvheadend to file recordings in a sub-directory named with the show title, it does file them correctly and they still appear in the TV | Recordings menu.

I thought it may be a file ownership or permissions problem however I have checked that and changed the file owner and permissions to agree with recordings that Tvheadend has made and filed correctly - no luck.

I then though it was a problem with a file name and location in a database so I have used sqlitebrowser to inspect the kodi database but can't find anything sensible there to change.

Does anyone have any idea where I am going wrong?
Reply
#2
Cracked it!

There are files placed on the disk which appear to be logs however they are linked to recordings and the value stored in the log file is used as the path to the data file.

When mounted as root, looking in:
.kodi/userdata/addon_data/service.multimedia.tvheadend/dvr
shows lots of files with obscure filenames.

Search within those files for the text which occurs in the filename and it should appear on line 22 of one of the files. Note the log filename then once you have moved the file to a new location, it is necessary to manually modify the log file on line 22 so that the filename (inc path) is correct.

It's obviously not safe to move files within the Kodi environment so I will have to write myself an application to be used periodically when the USB drive is plugged in to a linux machine which will allow me to move the files and update the log files appropriately.
Reply
#3
There are configuration options on the recording profile (TVH->Configuration->Recording) to create directories per show, per channel, etc. I don't think per user is one of them, but in any case you can use these to create subfolders under the named recording folder. Perhaps this is all you need.

You can also use multiple profiles with different options, including recording location, and assign each recording to an appropriately configured profile. I'm not sure how that would work for you, since I haven't tried it that way myself. Also, I don't think it would work for recordings scheduled from Kodi.
-- Steve

"I just wanted a media center, not a hobby!"

HW: CPU - Intel Core i3-4130T, RAM - 4GB, Storage: 640GB, TV Tuner - HDHomeRun Connect x3
SW: OS - LibreELEC, Media Center - Kodi 18.5, Skin - Amber, PVR - TVHeadend
Reply

Logout Mark Read Team Forum Stats Members Help
Live TV - organising recordings in folders0