Posts: 2,770
Joined: Mar 2011
Reputation:
95
You don't say what OS you're using, but have a look in /home/hts/.hts/tvheadend/dvr/log if you're on a 'buntu-alike. That contains individual log files for each recording (numbered, not named): I believe you get one for each recording scheduled or completed. There's metadata in there. Some metadata gets written to .mkv files as well, but it's really just title/content type/source channel stuff, not a full description.
Posts: 2,770
Joined: Mar 2011
Reputation:
95
I think XBMC is blind to all the metadata - VLC can read what's in an mkv, so maybe mkvinfo or similar would extract it.
XBMC is displaying what the tvheadend backend is telling it to, and it's tvheadend that reads the dvr log files - presumably, this is also how tvheadend works out whether something is complete or not, by what's in these files.
Library export will only work if the file is actually in XBMC's library; if it's in the Recordings list then it's not, it's still under the backend's control. This isn't a tvheadend-specific item, it's part of the architecture of the system. You can move the file to any suitable library folder (wherever you keep your TV shows or Films as appropriate, or even define your Recordings folder as a source if that works for you), name it correctly and scan it into the library - and you'll get all the information as usual from your chosen scraper source (thetvdb.com, for example). This still has nothing to do with tvheadend's metadata or the EPG information, though, it's purely what XBMC goes and gets based on that filename. If you now export the library, you'll get the corresponding .nfo file with this scraper information.
If you want to manufacture something, the only thing I can suggest would be to grep the dvr/log files for the appropriate file name (which is unique if you include time of recording), extract the description, and dump that into a template .nfo file. You could do the same with the title, and perhaps even date and time as well if you were feeling adventurous.
You'd maybe need some help with someone more current with shell scripting than me, but a combination of grep -H and xargs would probably get you there, as would awk.
Posts: 2,770
Joined: Mar 2011
Reputation:
95
It's hardly a bug when something doesn't do what you want it to... if you think it's a missing feature, by all means raise a feature request and I'm sure the developers will get back to you.
Posts: 19,982
Joined: May 2009
Reputation:
451
nickr
Retired Team-Kodi Member
Posts: 19,982
I can't understand this problem at all. Why do you need to take these files outside your tvheadend/xbmc ecosystem anyway? If xbmc has the metadata what is the problem?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Posts: 2,770
Joined: Mar 2011
Reputation:
95
As I said, if you feel that it's a feature you'd like, please raise a feature request on the tvheadend forum - it could be an easy thing to address (I haven't looked at the code myself to see, but I suspect it's simply another field to be written during mux-ing the mkv). That would allow you to see the information in VLC and similar.
However, XBMC will still not be able to see this information, as you rightly point out: XBMC doesn't use in-file metadata (too many variations of container, I suspect), but instead uses scrapers and its own database. This is by design, so I doubt that having anything included in the files by any backend will change that simply because of the number of different sources/backends/formats.
Posts: 1
Joined: Oct 2016
Hello all, it's a quite old thread, but if anyone has the problem i have a solution:
As before mentioned, the logged metadata are sittin in the /hts/tvheadend/dvr/log folder..
You need a shellscript, that copies these data beside your record *after* recording.
You must grep the name from inside the data, because the filename is not explicit.
My shell script is as as follows:
----------------------------------------------------
#!/bin/bash
last_dir=$(ls -rt /home/NEU | tail -n1 | tr " " "\ ") # this provides the last recording dirname at /home/NEU
such=$(ls -rt /home/NEU | tail -n1) # this is the search pattern for the grep next line
quelle=$(egrep -l "$such" /hts/tvheadend/dvr/log/*) # egrep (not grep because of spaces in filename) looks for the appropriate filename in the logs
install -m 777 $quelle "/home/NEU/$last_dir" # install (not cp) because its an easy way to set the appropriate user rights in one shot
----------------------------------------------------
I let it run after recording and have no probs.
Hope that helps anyone
Greetings robw