Ticket #8406: python.pginfo.patch
File python.pginfo.patch, 4.5 KB (added by , 14 years ago) |
---|
-
MythStatic.py
8 8 MVSCHEMA_VERSION = 1033 9 9 NVSCHEMA_VERSION = 1004 10 10 PROTO_VERSION = 56 11 PROGRAM_FIELDS = 4712 11 BACKEND_SEP = '[]:[]' -
MythData.py
531 531 _field_order = [ 'title', 'subtitle', 'description', 532 532 'category', 'chanid', 'channum', 533 533 'callsign', 'channame', 'filename', 534 'fs_high', 'fs_low', 'starttime', 535 'endtime', 'duplicate', 'shareable', 534 'filesize', 'starttime', 'endtime', 536 535 'findid', 'hostname', 'sourceid', 537 536 'cardid', 'inputid', 'recpriority', 538 537 'recstatus', 'recordid', 'rectype', 539 538 'dupin', 'dupmethod', 'recstartts', 540 'recendts', 'repeat', 'programflags', 541 'recgroup', 'commfree', 'outputfilters', 542 'seriesid', 'programid', 'lastmodified', 543 'stars', 'airdate', 'hasairdate', 539 'recendts', 'programflags', 'recgroup', 540 'outputfilters','seriesid', 'programid', 541 'lastmodified', 'stars', 'airdate', 544 542 'playgroup', 'recpriority2', 'parentid', 545 543 'storagegroup', 'audio_props', 'video_props', 546 544 'subtitle_type','year'] 547 545 _field_type = [ 3, 3, 3, 548 546 3, 0, 3, 549 547 3, 3, 3, 550 0, 0, 4, 551 4, 0, 0, 548 0, 4, 4, 552 549 0, 3, 0, 553 550 0, 0, 0, 554 551 0, 0, 3, 555 552 0, 0, 4, 556 4, 0, 3, 557 3, 0, 3, 553 4, 3, 3, 558 554 3, 3, 3, 559 1, 3, 0,555 3, 1, 3, 560 556 3, 0, 3, 561 557 3, 0, 0, 562 558 0, 0] … … 582 578 for key in ('title','subTitle','seriesId','programId','airdate', 583 579 'category','hostname','chanNum','callSign','playGroup', 584 580 'recGroup','rectype','programFlags','chanId','recStatus', 585 'commFree','stars' ):581 'commFree','stars','filesize'): 586 582 if key in xmldat: 587 583 dat[key.lower()] = xmldat[key] 588 584 for key in ('startTime','endTime','lastModified', … … 590 586 if key in xmldat: 591 587 dat[key.lower()] = str(int(mktime(strptime( 592 588 xmldat[key], '%Y-%m-%dT%H:%M:%S')))) 593 if 'fileSize' in xmldat:594 dat['fs_high'],dat['fs_low'] = \595 self.splitInt(int(xmldat['fileSize']))596 589 597 590 raw = [] 598 591 defs = (0,0,0,'',0) … … 605 598 else: 606 599 raise InputError("Either 'raw' or 'etree' must be provided") 607 600 self._db = DBCache(db) 608 self.filesize = self.joinInt(self.fs_high,self.fs_low)609 601 610 602 def toString(self): 611 603 """ -
MythFunc.py
189 189 self.freeTuner() 190 190 191 191 def _getPrograms(self, query, recstatus=None, header=0): 192 pgfieldcount = len(Program._field_order) 192 193 programs = [] 193 194 res = self.backendCommand(query).split(BACKEND_SEP) 194 195 for i in range(header): … … 196 197 197 198 num_progs = int(res.pop(0)) 198 199 for i in range(num_progs): 199 offs = i * PROGRAM_FIELDS200 programs.append(Program(res[offs:offs+ PROGRAM_FIELDS], db=self.db))200 offs = i * pgfieldcount 201 programs.append(Program(res[offs:offs+pgfieldcount], db=self.db)) 201 202 202 203 if recstatus: 203 204 for i in reversed(range(num_progs)):