[mythtv-commits] Ticket #12772: Crash in Recorded.getProgram() for recordings without bookmark after upgrade to 0.28

MythTV noreply at mythtv.org
Sun May 29 19:26:56 UTC 2016


#12772: Crash in Recorded.getProgram() for recordings without bookmark after
upgrade to 0.28
-----------------------------------------+--------------------------
 Reporter:  Fred Fettinger <fettinge@…>  |          Owner:  wagnerrp
     Type:  Bug Report - Crash           |         Status:  new
 Priority:  minor                        |      Milestone:  unknown
Component:  Bindings - Python            |        Version:  0.28.0
 Severity:  medium                       |     Resolution:
 Keywords:                               |  Ticket locked:  0
-----------------------------------------+--------------------------

Comment (by Richard Fearn <richardfearn@…>):

 I looked into this tonight. The backend is returning data to the Python
 bindings that looks like this:

 {{{
 0[]:[]1[]:[]Wallander[]:[]A Lesson in Love[]:[]Detective drama. The body
 of a woman is discovered in the forest. When it transpires that the
 victim's daughter is missing, Wallander must act
 quickly.[]:[]0[]:[]0[]:[]0[]:[][]:[]Drama[]:[]1001[]:[]1[]:[]BBC ONE
 Oxford[]:[]BBC ONE
 Oxford[]:[][]:[]0[]:[]1464552000[]:[]1464557400[]:[]0[]:[]mythtv[]:[]1[]:[]1[]:[]1[]:[]0[]:[]-1[]:[]1257[]:[]1[]:[]15[]:[]8[]:[]1464552000[]:[]1464557400[]:[]0[]:[]Default[]:[][]:[]fp.bbc.co.uk/nuj0fe[]:[]fp.bbc.co.uk/1ftwy6[]:[][]:[]1464546156[]:[]0[]:[][]:[]Default[]:[]0[]:[]0[]:[]Default[]:[]33[]:[]66[]:[]0[]:[]0[]:[]0[]:[]0[]:[]2[]:[]0[]:[]~[]:[]4294967295
 }}}

 The last value {{{4294967295}}} is the {{{bookmarkupdate}}} field. This
 value makes its way through the Python bindings to the {{{_process}}}
 function in {{{altdict.py}}}, so I've temporarily patched {{altdict.py}}
 to handle this value:

 {{{
 --- altdict.py.ORIGINAL 2016-04-13 04:15:30.000000000 +0100
 +++ altdict.py  2016-05-29 19:32:01.198800782 +0100
 @@ -160,7 +160,10 @@
                  if v == '':
                      data[i] = None
                  else:
 -                    data[i] = self._trans[self._field_type[i]](v)
 +                    if (self._field_order[i] == "bookmarkupdate") and (v
 == "4294967295"):
 +                        data[i] = None
 +                    else:
 +                        data[i] = self._trans[self._field_type[i]](v)
          return dict(zip(self._field_order,data))

      def _deprocess(self):
 }}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12772#comment:2>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list