Best way to import PVR recordings into library?
#1
Has anyone come up with a good method for automatically importing pvr recordings into the library?

Using tvheadend with schedules direct for episode data I end up with files with a file name with an absolute episode number in them such as: Saturday Night Live.E899.mkv In the united states it seems you only get these absolute episode numbers and not season and episode information.

I have added a source for the recordings, set it to use the tvdb scraper with absolute episode numbering and created a regexp in advanced settings to import them (<regexp>E.()[0]*([0-9]+).mkv</regexp>) but it seems the the thetvdb doesn't have absolute episode numbers for most shows and even worse the numbers it has for some shows (such as sesame street) aren't the actual absolute episode numbers.

ideas?

The best I can think of is adding support to tvheadend for putting the original airdate in the filename (I think schedules direct shares this data) but I want to make sure im not missing a better solution before I start digging into the code.

~Jess
Reply
#2
tvheadend can put the time and date of the recording into the filename, maybe that would be enough?
Reply
#3
Might work for some shows but some of the shows I record are purely reruns and it doesn't work so well. I created a script that reads the mkv tags and creates an nfo file. Episodes are listed as season -1 and the absolute episode number which is not ideal but they are atleast indexed and I get episode descriptions. Still tweaking but its something. I can clean up the script and share it if anyone wants it.

~Jess
Reply
#4
Jess, can you please share the script? I am trying to set this up as well.
Reply
#5
I will post it later but I am already working on what I hope will be a better solution. The new script will use xmltv(schedules direct) data to find the origional airdate and rename the file. Hopefully this will allow proper scraping with thetvdb.
Reply
#6
Sorry for not getting back sooner. Been super busy with work. The script I am currently using is available here: http://jesshaas.com/html/software/xbmc/t...nd_post.sh

This script uses xmltv/schedules direct data to find the original airdate then renames the file so that xbmc can use that information to scrape data from tvdb. If it can't find the original airdate it creates an nfo file using information from tvheadend. If it does find it it still creates the nfo file but names it .xml so that xbmc won't use it. I did this in order to save the metadata when using the ts file format in order to get subtitles.

You need to grab schedules direct data with xmltv and put it in /tmp/schedules_direct-past.xml
It needs to be data from before the recording started that includes info on the recording so ideally you would setup a cron job to download and rotate the files on a regular basis. Also you need the proper offset setup for xmltv so that the times are correct otherwise shows at the beginning or end of the day wont be found.

I know that is probably all clear as mud unless you have dug into this stuff but I hope it is useful to someone. Don't have time to package it up all neatly or provide technical support.

~Jess
Reply
#7
Newer version of script and better instructions in this thread: http://forum.xbmc.org/showthread.php?tid=188967
Reply

Logout Mark Read Team Forum Stats Members Help
Best way to import PVR recordings into library?0