[mythtv-commits] Ticket #13300: Python Bindings enhancemts according to latest MythTV protocol (91)

MythTV noreply at mythtv.org
Mon Jul 2 19:49:51 UTC 2018


#13300: Python Bindings enhancemts according to latest MythTV protocol (91)
-----------------------------------+----------------------------
     Reporter:  rcrdnalor          |      Owner:  Raymond Wagner
         Type:  Patch - Feature    |     Status:  new
     Priority:  minor              |  Milestone:  needs_triage
    Component:  Bindings - Python  |    Version:  v29-fixes
     Severity:  medium             |   Keywords:
Ticket locked:  0                  |
-----------------------------------+----------------------------
 Mythtv v29: Python Bindings enhancements according to latest MythTV
 protocol:


 1) Allow db.seacrchRecorded method to search by given recordedid:

 Patch: 0001-Add-recordedid-to-db.seacrchRecorded-method.patch

 This patch implements a search inside the `recorded` table by given
 `recordedid`
 by modifing the already implemented `searchRecorded` method.



 2) Add the recordedfile table to python bindings and make use of it:

 Patch: 0002-Python-Bindings-Add-recordedfile-table-and-its-usage.patch

 This patch adds the `recordedfile` table to the python bindings and allows
 the
 `Recorded` instance to use (and update) it.

 These patches are compatible with current master and fixes/v29.
 Once accepted, please backport to fixes/v29.


 Example usage:
 {{{
 $ python2
 Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
 [GCC 7.3.0] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from MythTV import MythDB, MythError, MythDBError, Recorded,
 RecordedFile
 >>> db = MythDB()
 >>> reciter = db.searchRecorded(recordedid = 44)
 >>> rec = reciter.next()
 >>> rec
 b'<Recorded 'Servatius Wetter','2018-06-30 11:10:00+02:00' at
 0x7efe3fc482a0>'
 >>> recfile = rec.getRecordedFile()
 >>> recfile
 b'<RecordedFile '2105_20180630091000.ts','44' at 0x7efe3fc554f0>'
 >>> recfile.keys()
 [u'basename', u'filesize', u'width', u'height', u'fps', u'aspect',
 u'audio_sample_rate', u'audio_channels', u'audio_codec', u'video_codec',
 u'comment', u'hostname', u'storagegroup', u'id', u'recordedid',
 u'container', u'total_bitrate', u'video_avg_bitrate',
 u'video_max_bitrate', u'audio_avg_bitrate', u'audio_max_bitrate']
 >>> recfile.values()
 [u'2105_20180630091000.ts', 563401220L, 1920, 1088, 25.0, 1.777778, 0, 0,
 u'AC3', u'H264', u'', u'bionic', u'Default', 51L, 44L, u'MPEG2-TS', 0, 0,
 0, 0, 0]
 }}}

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13300>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list