[mythtv-users] scan for changes

Tom Lichti tom at redpepperracing.com
Tue Mar 27 00:45:07 UTC 2012


On Mon, Mar 26, 2012 at 4:01 PM, Raymond Wagner <raymond at wagnerrp.com> wrote:
> On 3/26/2012 13:51, Tom Lichti wrote:
>>
>> That looks like a neat way to do it. Is there a corresponding
>> recording function? Right now I have a hand crafted script that copies
>> records from videos into recordings, but having an easier way of doing
>> it would be nice. Or perhaps a better question would be is there
>> documentation about what methods are available in the bindings? I know
>> I've tried to look and haven't had much success in the past, maybe
>> things have changed, or I just wasn't looking in the right place?
>
>
> http://www.mythtv.org/wiki/Python_bindings
>
> There is a similar 'importMetadata()' method for Recorded objects, matching
> one recording entry in the `recorded` table.  However, the Video Library was
> designed for arbitrary addition of content, the Recording Library was not.
>  There are around a dozen tables you need to touch to add a single fake
> recording to MythTV, and a few additional that carry optional data.  For
> some not-so-light reading, dig through MiroBridge for what is needed to add
> your own files as recordings.
>

Well, MiroBridge does import into recordings, but it doesn't use the
videometadata (I guess it predates that function?).

What I'd like to do is add a video file to the video database (done,
with above snippet) and then the next step in the script I would like
to add a recorded entry with the data from the previous step. I can't
seem to figure out that part though. I've read through MiroBridge
code, and dataheap.py, I just can't figure out how to pass the vid
metadata into the rec.importmetadata step. I admit, I've never really
used python before, but I have worked on scripts for years, so I'm not
a complete noob at this, I just can't seem to wrap my head around the
python syntax. I've added a command line to pass in the filename, I've
imported the Recorded functions, I'm sure it's only 2 or 3 more lines,
but those 2 or 3 lines are messing me up. Help!

Tom


More information about the mythtv-users mailing list