[mythtv-users] python bindings

Jeremy Jones jeremy.dwain.jones at gmail.com
Thu Jan 30 02:42:45 UTC 2014


On Thu, Jan 23, 2014 at 12:57 PM, Jeremy Jones <jeremy.dwain.jones at gmail.com
> wrote:

>
> On Jan 23, 2014 12:18 PM, "Raymond Wagner" <raymond at wagnerrp.com> wrote:
> >
> > On Jan 23, 2014, at 8:10, Jeremy Jones <jeremy.dwain.jones at gmail.com>
> wrote:
> >
> >>
> >> On Wed, Jan 22, 2014 at 10:51 PM, Raymond Wagner <raymond at wagnerrp.com>
> wrote:
> >>>
> >>>
> >>>> 4) And this is really what I need: Is there a place that I can look
> that
> >>>> will tell me about accessing the following database tables using the
> >>>> python bindings?
> >>>>    a) music_playlists
> >>>>    b) music_songs
> >>>>    c) music_directories
> >>>
> >>>
> >>> The relevant pages list objects for those, but it seems I never filled
> them in.
> >>>
> >>>
> http://www.mythtv.org/wiki/0.26_Python_bindings/Data_Handlers#MusicPlaylist
> >>>
> >>> Also see...
> >>>
> >>>
> http://code.mythtv.org/cgit/mythtv/tree/mythtv/bindings/python/MythTV/dataheap.py#n1229
> >>>
> >>> In any case, they follow the same behavior of all other
> database-derived objects.  They can be accessed by the class constructor by
> using the table's primary keys, and all columns are accessible as
> attributes.  You can alter the attributes and run .update() to push the
> changes, or you can feed those changes into .update({}) with a dict
> argument.  You can create a new, empty object, populate it, and then push
> it with .create().  You can delete an existing object with .delete().
> >>>
> >>
> >> That's exactly what I needed.  Thank you Raymond.
> >>
> >> Jeremy
> >
> >
> > Be aware that there is no data protection on those classes.  It's up to
> you to add data in the manner mythmusic is happy with.
>
> Thanks for the warning, but I only plan to read from the database.
>

What would cause this:

Python Database Connection MythMusic schema mismatch: we speak 1018 but
database speaks 1020
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140129/40fd4457/attachment.html>


More information about the mythtv-users mailing list