Skip to content

Commit

Permalink
ProgramInfo: Add partnumber,parttotal and syndicatedepisode to serial…
Browse files Browse the repository at this point in the history
…ized

data.

Allows the use of this information in textareas and templates.
  • Loading branch information
jpoet committed Nov 23, 2012
1 parent 60d5477 commit d4dcff3
Show file tree
Hide file tree
Showing 12 changed files with 346 additions and 229 deletions.
6 changes: 3 additions & 3 deletions mythtv/bindings/perl/MythTV.pm
Expand Up @@ -107,8 +107,8 @@ package MythTV;
# Note: as of July 21, 2010, this is actually a string, to account for proto
# versions of the form "58a". This will get used if protocol versions are
# changed on a fixes branch ongoing.
our $PROTO_VERSION = "75";
our $PROTO_TOKEN = "SweetRock";
our $PROTO_VERSION = "76";
our $PROTO_TOKEN = "FireWilde";

# currentDatabaseVersion is defined in libmythtv in
# mythtv/libs/libmythtv/dbcheck.cpp and should be the current MythTV core
Expand All @@ -120,7 +120,7 @@ package MythTV;
# NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
# the number of items in a ProgramInfo QStringList group used by
# ProgramInfo::ToSringList and ProgramInfo::FromStringList.
our $NUMPROGRAMLINES = 44;
our $NUMPROGRAMLINES = 47;

# Reasons a recording wouldn't be happening (from libs/libmythtv/programinfo.h)
our %RecStatus_Types = (
Expand Down
162 changes: 84 additions & 78 deletions mythtv/bindings/perl/MythTV/Program.pm
Expand Up @@ -45,49 +45,52 @@ package MythTV::Program;
$self->{'description'} = $_[2]; # 02 description
$self->{'season'} = $_[3]; # 03 season
$self->{'episode'} = $_[4]; # 04 episode
$self->{'category'} = $_[5]; # 05 category
$self->{'chanid'} = $_[6]; # 06 chanid
$self->{'channum'} = $_[7]; # 07 chanstr
$self->{'callsign'} = $_[8]; # 08 chansign
$self->{'channame'} = $_[9]; # 09 channame
$self->{'filename'} = $_[10]; # 10 pathname
$self->{'filesize'} = $_[11]; # 11 filesize
$self->{'syndicatedepisode'} = $_[5]; # 05 syndicated episode
$self->{'category'} = $_[5]; # 06 category
$self->{'chanid'} = $_[6]; # 07 chanid
$self->{'channum'} = $_[7]; # 08 chanstr
$self->{'callsign'} = $_[8]; # 09 chansign
$self->{'channame'} = $_[9]; # 10 channame
$self->{'filename'} = $_[10]; # 11 pathname
$self->{'filesize'} = $_[11]; # 12 filesize

$self->{'starttime'} = $_[12]; # 12 startts Scheduled starttime (unix timestamp)
$self->{'endtime'} = $_[13]; # 13 endts Scheduled endtime (unix timestamp)
$self->{'findid'} = $_[14]; # 14 findid
$self->{'hostname'} = $_[15]; # 15 hostname
$self->{'sourceid'} = $_[16]; # 16 sourceid
$self->{'cardid'} = $_[17]; # 17 cardid
$self->{'inputid'} = $_[18]; # 18 inputid
$self->{'recpriority'} = $_[19]; # 19 recpriority
$self->{'recstatus'} = $_[20]; # 20 recstatus
$self->{'recordid'} = $_[21]; # 21 recordid
$self->{'starttime'} = $_[12]; # 13 startts Scheduled starttime (unix timestamp)
$self->{'endtime'} = $_[13]; # 14 endts Scheduled endtime (unix timestamp)
$self->{'findid'} = $_[14]; # 15 findid
$self->{'hostname'} = $_[15]; # 16 hostname
$self->{'sourceid'} = $_[16]; # 17 sourceid
$self->{'cardid'} = $_[17]; # 18 cardid
$self->{'inputid'} = $_[18]; # 19 inputid
$self->{'recpriority'} = $_[19]; # 20 recpriority
$self->{'recstatus'} = $_[20]; # 21 recstatus
$self->{'recordid'} = $_[21]; # 22 recordid

$self->{'rectype'} = $_[22]; # 22 rectype
$self->{'dupin'} = $_[23]; # 23 dupin
$self->{'dupmethod'} = $_[24]; # 24 dupmethod
$self->{'recstartts'} = $_[25]; # 25 recstartts ACTUAL start time (unix timestamp)
$self->{'recendts'} = $_[26]; # 26 recendts ACTUAL end time (unix timestamp)
$self->{'progflags'} = $_[27]; # 27 programflags
$self->{'recgroup'} = $_[28]; # 28 recgroup
$self->{'outputfilters'} = $_[29]; # 29 chanOutputFilters
$self->{'seriesid'} = $_[30]; # 30 seriesid
$self->{'programid'} = $_[31]; # 31 programid
$self->{'inetref'} = $_[32]; # 32 inetref
$self->{'rectype'} = $_[22]; # 23 rectype
$self->{'dupin'} = $_[23]; # 24 dupin
$self->{'dupmethod'} = $_[24]; # 25 dupmethod
$self->{'recstartts'} = $_[25]; # 26 recstartts ACTUAL start time (unix timestamp)
$self->{'recendts'} = $_[26]; # 27 recendts ACTUAL end time (unix timestamp)
$self->{'progflags'} = $_[27]; # 28 programflags
$self->{'recgroup'} = $_[28]; # 29 recgroup
$self->{'outputfilters'} = $_[29]; # 30 chanOutputFilters
$self->{'seriesid'} = $_[30]; # 31 seriesid
$self->{'programid'} = $_[31]; # 32 programid
$self->{'inetref'} = $_[32]; # 33 inetref

$self->{'lastmodified'} = $_[33]; # 33 lastmodified
$self->{'stars'} = $_[34]; # 34 stars
$self->{'airdate'} = $_[35]; # 35 originalAirDate (ISO 8601 format)
$self->{'playgroup'} = $_[36]; # 36 playgroup
$self->{'recpriority2'} = $_[37]; # 37 recpriority2
$self->{'parentid'} = $_[38]; # 38 parentid
$self->{'storagegroup'} = $_[39]; # 39 storagegroup
$self->{'audio_props'} = $_[40]; # 40 Audio properties
$self->{'video_props'} = $_[41]; # 41 Video properties
$self->{'subtitle_type'} = $_[42]; # 42 Subtitle type
$self->{'lastmodified'} = $_[33]; # 34 lastmodified
$self->{'stars'} = $_[34]; # 35 stars
$self->{'airdate'} = $_[35]; # 36 originalAirDate (ISO 8601 format)
$self->{'playgroup'} = $_[36]; # 37 playgroup
$self->{'recpriority2'} = $_[37]; # 38 recpriority2
$self->{'parentid'} = $_[38]; # 39 parentid
$self->{'storagegroup'} = $_[39]; # 40 storagegroup
$self->{'audio_props'} = $_[40]; # 41 Audio properties
$self->{'video_props'} = $_[41]; # 42 Video properties
$self->{'subtitle_type'} = $_[42]; # 43 Subtitle type

$self->{'year'} = $_[43]; # 43 Production year
$self->{'year'} = $_[43]; # 44 Production year
$self->{'partnumber'} = $_[44]; # 45 part number
$self->{'parttotal'} = $_[45]; # 46 part total

# Load the channel data
if ($self->{'chanid'}) {
Expand Down Expand Up @@ -139,49 +142,52 @@ package MythTV::Program;
$self->{'description'} , # 02 description
$self->{'season'} , # 03 season
$self->{'episode'} , # 04 episode
$self->{'category'} , # 05 category
$self->{'chanid'} , # 06 chanid
$self->{'channum'} , # 07 chanstr
$self->{'callsign'} , # 08 chansign
$self->{'channame'} , # 09 channame
$self->{'filename'} , # 10 pathname
$self->{'filesize'} , # 11 filesize
$self->{'syndicatedepisode'}, # 05 syndicated episode
$self->{'category'} , # 06 category
$self->{'chanid'} , # 07 chanid
$self->{'channum'} , # 08 chanstr
$self->{'callsign'} , # 09 chansign
$self->{'channame'} , # 10 channame
$self->{'filename'} , # 11 pathname
$self->{'filesize'} , # 12 filesize

$self->{'starttime'} , # 12 startts
$self->{'endtime'} , # 13 endts
$self->{'findid'} , # 14 findid
$self->{'hostname'} , # 15 hostname
$self->{'sourceid'} , # 16 sourceid
$self->{'cardid'} , # 17 cardid
$self->{'inputid'} , # 18 inputid
$self->{'recpriority'} , # 19 recpriority
$self->{'recstatus'} , # 20 recstatus
$self->{'recordid'} , # 21 recordid
$self->{'starttime'} , # 13 startts
$self->{'endtime'} , # 14 endts
$self->{'findid'} , # 15 findid
$self->{'hostname'} , # 16 hostname
$self->{'sourceid'} , # 17 sourceid
$self->{'cardid'} , # 18 cardid
$self->{'inputid'} , # 19 inputid
$self->{'recpriority'} , # 20 recpriority
$self->{'recstatus'} , # 21 recstatus
$self->{'recordid'} , # 22 recordid

$self->{'rectype'} , # 22 rectype
$self->{'dupin'} , # 23 dupin
$self->{'dupmethod'} , # 24 dupmethod
$self->{'recstartts'} , # 25 recstartts
$self->{'recendts'} , # 26 recendts
$self->{'progflags'} , # 27 programflags
$self->{'recgroup'} , # 28 recgroup
$self->{'outputfilters'} , # 29 chanOutputFilters
$self->{'seriesid'} , # 30 seriesid
$self->{'programid'} , # 31 programid
$self->{'inetref'} , # 32 inetref
$self->{'rectype'} , # 23 rectype
$self->{'dupin'} , # 24 dupin
$self->{'dupmethod'} , # 25 dupmethod
$self->{'recstartts'} , # 26 recstartts
$self->{'recendts'} , # 27 recendts
$self->{'progflags'} , # 28 programflags
$self->{'recgroup'} , # 29 recgroup
$self->{'outputfilters'} , # 30 chanOutputFilters
$self->{'seriesid'} , # 31 seriesid
$self->{'programid'} , # 32 programid
$self->{'inetref'} , # 33 inetref

$self->{'lastmodified'} , # 33 lastmodified
$self->{'stars'} , # 34 stars
$self->{'airdate'} , # 35 originalAirDate
$self->{'playgroup'} , # 36 playgroup
$self->{'recpriority2'} , # 37 recpriority2
$self->{'parentid'} , # 38 parentid
$self->{'storagegroup'} , # 39 storagegroup
$self->{'audio_props'} , # 40 audio properties
$self->{'video_props'} , # 41 video properties
$self->{'subtitle_type'} , # 42 subtitle type
$self->{'lastmodified'} , # 34 lastmodified
$self->{'stars'} , # 35 stars
$self->{'airdate'} , # 36 originalAirDate
$self->{'playgroup'} , # 37 playgroup
$self->{'recpriority2'} , # 38 recpriority2
$self->{'parentid'} , # 39 parentid
$self->{'storagegroup'} , # 40 storagegroup
$self->{'audio_props'} , # 41 audio properties
$self->{'video_props'} , # 42 video properties
$self->{'subtitle_type'} , # 43 subtitle type

$self->{'year'} , # 43 production year
$self->{'year'} , # 44 production year
$self->{'partnumber'} , # 45 part number
$self->{'parttotal'} , # 46 part total
'' # trailing separator
);
}
Expand Down
6 changes: 3 additions & 3 deletions mythtv/bindings/php/MythBackend.php
Expand Up @@ -11,16 +11,16 @@ class MythBackend {

// MYTH_PROTO_VERSION is defined in libmyth in mythtv/libs/libmyth/mythcontext.h
// and should be the current MythTV protocol version.
static $protocol_version = '75';
static $protocol_token = 'SweetRock';
static $protocol_version = '76';
static $protocol_token = 'FireWilde';

// The character string used by the backend to separate records
static $backend_separator = '[]:[]';

// NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
// the number of items in a ProgramInfo QStringList group used by
// ProgramInfo::ToSringList and ProgramInfo::FromStringList.
static $program_line_number = 44;
static $program_line_number = 47;

private $fp = null;
private $connected = false;
Expand Down
6 changes: 3 additions & 3 deletions mythtv/bindings/php/MythTVProgram.php
Expand Up @@ -10,6 +10,7 @@ class MythTVProgram {
public $description = 'No Description';
public $season;
public $episode;
public $syndicatedepisodenumber;
public $category;
public $chanid;
public $channum;
Expand Down Expand Up @@ -49,6 +50,8 @@ class MythTVProgram {
public $videoprop;
public $subtitletype;
public $year;
public $partnumber;
public $parttotal;

// Additional program table fields
public $category_type;
Expand All @@ -58,12 +61,9 @@ class MythTVProgram {
public $subtitled;
public $hdtv;
public $closecaptioned;
public $partnumber;
public $parttotal;
public $originalairdate;
public $showtype;
public $colorcode;
public $syndicatedepisodenumber;
public $manualid;
public $generic;
public $listingsource;
Expand Down
50 changes: 26 additions & 24 deletions mythtv/bindings/python/MythTV/mythproto.py
Expand Up @@ -818,34 +818,36 @@ class Program( CMPRecord, DictData, RECSTATUS, AUDIO_PROPS, \
"""Represents a program with all detail returned by the backend."""

_field_order = [ 'title', 'subtitle', 'description',
'season', 'episode', 'category',
'chanid', 'channum', 'callsign',
'channame', 'filename', 'filesize',
'starttime', 'endtime', 'findid',
'hostname', 'sourceid', 'cardid',
'inputid', 'recpriority', 'recstatus',
'recordid', 'rectype', 'dupin',
'dupmethod', 'recstartts', 'recendts',
'programflags', 'recgroup', 'outputfilters',
'seriesid', 'programid', 'inetref',
'lastmodified', 'stars', 'airdate',
'playgroup', 'recpriority2', 'parentid',
'storagegroup', 'audio_props', 'video_props',
'subtitle_type','year']
'season', 'episode', 'syndicatedepisode',
'category', 'chanid', 'channum',
'callsign', 'channame', 'filename',
'filesize', 'starttime', 'endtime',
'findid', 'hostname', 'sourceid',
'cardid', 'inputid', 'recpriority',
'recstatus', 'recordid', 'rectype',
'dupin', 'dupmethod', 'recstartts',
'recendts', 'programflags', 'recgroup',
'outputfilters','seriesid', 'programid',
'inetref', 'lastmodified', 'stars',
'airdate', 'playgroup', 'recpriority2',
'parentid', 'storagegroup', 'audio_props',
'video_props', 'subtitle_type','year',
'part_number', 'part_total']
_field_type = [ 3, 3, 3,
0, 0, 3,
0, 3, 3,
3, 3, 0,
4, 4, 0,
3, 0, 0,
0, 0, 0,
0, 3, 0,
0, 4, 4,
3, 0, 3,
3, 3, 3,
0, 4, 4,
0, 3, 0,
0, 0, 0,
0, 0, 3,
0, 0, 4,
4, 3, 3,
3, 3, 3,
4, 1, 5,
3, 0, 3,
3, 0, 0,
3, 4, 1,
5, 3, 0,
3, 3, 0,
0, 0, 0,
0, 0]
def __str__(self):
return u"<Program '%s','%s' at %s>" % (self.title,
Expand Down
4 changes: 2 additions & 2 deletions mythtv/bindings/python/MythTV/static.py
Expand Up @@ -8,8 +8,8 @@
SCHEMA_VERSION = 1308
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1018
PROTO_VERSION = '75'
PROTO_TOKEN = 'SweetRock'
PROTO_VERSION = '76'
PROTO_TOKEN = 'FireWilde'
BACKEND_SEP = '[]:[]'
INSTALL_PREFIX = '/usr/local'

Expand Down

0 comments on commit d4dcff3

Please sign in to comment.