Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for loading season, episode and total episodes into Progr…

…amInfo.

This alters the protocol version to 78

I've done my best to update the bindings, but I have not have got it
entirely correct. With luck they'll be converted to the services API
before the next time someone alters the protocol, it's a painful
process atm.
  • Loading branch information...
commit e8bfd99e214d636b2cf408fc71b0087ad9535622 1 parent 83ff754
Stuart Morgan stuartm authored
6 mythtv/bindings/perl/MythTV.pm
View
@@ -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 = "77";
- our $PROTO_TOKEN = "WindMark";
+ our $PROTO_VERSION = "78";
+ our $PROTO_TOKEN = "IceBurns";
# currentDatabaseVersion is defined in libmythtv in
# mythtv/libs/libmythtv/dbcheck.cpp and should be the current MythTV core
@@ -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 = 47;
+ our $NUMPROGRAMLINES = 48;
# Reasons a recording wouldn't be happening (from libs/libmythtv/programinfo.h)
our %RecStatus_Types = (
95 mythtv/bindings/perl/MythTV/Program.pm
View
@@ -40,57 +40,58 @@ package MythTV::Program;
$self->{'_mythtv'} ||= $MythTV::last;
# Load the passed-in data - info about this data structure is stored in libs/libmythtv/programinfo.cpp
- $self->{'title'} = $_[0]; # 00 title
- $self->{'subtitle'} = $_[1]; # 01 subtitle
- $self->{'description'} = $_[2]; # 02 description
- $self->{'season'} = $_[3]; # 03 season
- $self->{'episode'} = $_[4]; # 04 episode
- $self->{'syndicatedepisode'} = $_[5]; # 05 syndicated episode
- $self->{'category'} = $_[6]; # 06 category
- $self->{'chanid'} = $_[7]; # 07 chanid
- $self->{'channum'} = $_[8]; # 08 chanstr
- $self->{'callsign'} = $_[9]; # 09 chansign
- $self->{'channame'} = $_[10]; # 10 channame
- $self->{'filename'} = $_[11]; # 11 pathname
- $self->{'filesize'} = $_[12]; # 12 filesize
+ $self->{'title'} = $_[0]; # title
+ $self->{'subtitle'} = $_[1]; # subtitle
+ $self->{'description'} = $_[2]; # description
+ $self->{'season'} = $_[3]; # season
+ $self->{'episode'} = $_[4]; # episode
+ $self->{'totalepisodes'} = $_[5]; # total episodes
+ $self->{'syndicatedepisode'} = $_[6]; # syndicated episode
+ $self->{'category'} = $_[7]; # category
+ $self->{'chanid'} = $_[8]; # chanid
+ $self->{'channum'} = $_[9]; # chanstr
+ $self->{'callsign'} = $_[10]; # chansign
+ $self->{'channame'} = $_[11]; # channame
+ $self->{'filename'} = $_[12]; # pathname
+ $self->{'filesize'} = $_[13]; # filesize
- $self->{'starttime'} = $_[13]; # 13 startts Scheduled starttime (unix timestamp)
- $self->{'endtime'} = $_[14]; # 14 endts Scheduled endtime (unix timestamp)
- $self->{'findid'} = $_[15]; # 15 findid
- $self->{'hostname'} = $_[16]; # 16 hostname
- $self->{'sourceid'} = $_[17]; # 17 sourceid
- $self->{'cardid'} = $_[18]; # 18 cardid
- $self->{'inputid'} = $_[19]; # 19 inputid
- $self->{'recpriority'} = $_[20]; # 20 recpriority
- $self->{'recstatus'} = $_[21]; # 21 recstatus
- $self->{'recordid'} = $_[22]; # 22 recordid
+ $self->{'starttime'} = $_[14]; # startts Scheduled starttime (unix timestamp)
+ $self->{'endtime'} = $_[15]; # endts Scheduled endtime (unix timestamp)
+ $self->{'findid'} = $_[16]; # findid
+ $self->{'hostname'} = $_[17]; # hostname
+ $self->{'sourceid'} = $_[18]; # sourceid
+ $self->{'cardid'} = $_[19]; # cardid
+ $self->{'inputid'} = $_[20]; # inputid
+ $self->{'recpriority'} = $_[21]; # recpriority
+ $self->{'recstatus'} = $_[22]; # recstatus
+ $self->{'recordid'} = $_[23]; # recordid
- $self->{'rectype'} = $_[23]; # 23 rectype
- $self->{'dupin'} = $_[24]; # 24 dupin
- $self->{'dupmethod'} = $_[25]; # 25 dupmethod
- $self->{'recstartts'} = $_[26]; # 26 recstartts ACTUAL start time (unix timestamp)
- $self->{'recendts'} = $_[27]; # 27 recendts ACTUAL end time (unix timestamp)
- $self->{'progflags'} = $_[28]; # 28 programflags
- $self->{'recgroup'} = $_[29]; # 29 recgroup
- $self->{'outputfilters'} = $_[30]; # 30 chanOutputFilters
- $self->{'seriesid'} = $_[31]; # 31 seriesid
- $self->{'programid'} = $_[32]; # 32 programid
- $self->{'inetref'} = $_[33]; # 33 inetref
+ $self->{'rectype'} = $_[24]; # rectype
+ $self->{'dupin'} = $_[25]; # dupin
+ $self->{'dupmethod'} = $_[26]; # dupmethod
+ $self->{'recstartts'} = $_[27]; # recstartts ACTUAL start time (unix timestamp)
+ $self->{'recendts'} = $_[28]; # recendts ACTUAL end time (unix timestamp)
+ $self->{'progflags'} = $_[29]; # programflags
+ $self->{'recgroup'} = $_[30]; # recgroup
+ $self->{'outputfilters'} = $_[31]; # chanOutputFilters
+ $self->{'seriesid'} = $_[32]; # seriesid
+ $self->{'programid'} = $_[33]; # programid
+ $self->{'inetref'} = $_[34]; # inetref
- $self->{'lastmodified'} = $_[34]; # 34 lastmodified
- $self->{'stars'} = $_[35]; # 35 stars
- $self->{'airdate'} = $_[36]; # 36 originalAirDate (ISO 8601 format)
- $self->{'playgroup'} = $_[37]; # 37 playgroup
- $self->{'recpriority2'} = $_[38]; # 38 recpriority2
- $self->{'parentid'} = $_[39]; # 39 parentid
- $self->{'storagegroup'} = $_[40]; # 40 storagegroup
- $self->{'audio_props'} = $_[41]; # 41 Audio properties
- $self->{'video_props'} = $_[42]; # 42 Video properties
- $self->{'subtitle_type'} = $_[43]; # 43 Subtitle type
+ $self->{'lastmodified'} = $_[35]; # lastmodified
+ $self->{'stars'} = $_[36]; # stars
+ $self->{'airdate'} = $_[37]; # originalAirDate (ISO 8601 format)
+ $self->{'playgroup'} = $_[38]; # playgroup
+ $self->{'recpriority2'} = $_[39]; # recpriority2
+ $self->{'parentid'} = $_[40]; # parentid
+ $self->{'storagegroup'} = $_[41]; # storagegroup
+ $self->{'audio_props'} = $_[42]; # Audio properties
+ $self->{'video_props'} = $_[43]; # Video properties
+ $self->{'subtitle_type'} = $_[44]; # Subtitle type
- $self->{'year'} = $_[44]; # 44 Production year
- $self->{'partnumber'} = $_[45]; # 45 part number
- $self->{'parttotal'} = $_[46]; # 46 part total
+ $self->{'year'} = $_[45]; # Production year
+ $self->{'partnumber'} = $_[46]; # part number
+ $self->{'parttotal'} = $_[47]; # part total
# Load the channel data
if ($self->{'chanid'}) {
4 mythtv/bindings/php/MythBackend.php
View
@@ -11,8 +11,8 @@ 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 = '77';
- static $protocol_token = 'WindMark';
+ static $protocol_version = '78';
+ static $protocol_token = 'IceBurns';
// The character string used by the backend to separate records
static $backend_separator = '[]:[]';
1  mythtv/bindings/php/MythTVProgram.php
View
@@ -10,6 +10,7 @@ class MythTVProgram {
public $description = 'No Description';
public $season;
public $episode;
+ public $totalepisodes;
public $syndicatedepisodenumber;
public $category;
public $chanid;
6 mythtv/bindings/python/MythTV/mythproto.py
View
@@ -826,7 +826,8 @@ class Program( CMPRecord, DictData, RECSTATUS, AUDIO_PROPS, \
"""Represents a program with all detail returned by the backend."""
_field_order = [ 'title', 'subtitle', 'description',
- 'season', 'episode', 'syndicatedepisode',
+ 'season', 'episode', 'totalepisodes',
+ 'syndicatedepisode',
'category', 'chanid', 'channum',
'callsign', 'channame', 'filename',
'filesize', 'starttime', 'endtime',
@@ -842,7 +843,8 @@ class Program( CMPRecord, DictData, RECSTATUS, AUDIO_PROPS, \
'video_props', 'subtitle_type','year',
'part_number', 'part_total']
_field_type = [ 3, 3, 3,
- 0, 0, 3,
+ 0, 0, 0,
+ 3,
3, 0, 3,
3, 3, 3,
0, 4, 4,
210 mythtv/libs/libmyth/programinfo.cpp
View
@@ -115,6 +115,7 @@ ProgramInfo::ProgramInfo(void) :
description(),
season(0),
episode(0),
+ totalepisodes(0),
syndicatedepisode(),
category(),
director(),
@@ -198,6 +199,7 @@ ProgramInfo::ProgramInfo(const ProgramInfo &other) :
description(other.description),
season(other.season),
episode(other.episode),
+ totalepisodes(other.totalepisodes),
syndicatedepisode(other.syndicatedepisode),
category(other.category),
director(other.director),
@@ -578,12 +580,14 @@ ProgramInfo::ProgramInfo(
uint _audioproperties,
uint _subtitleType,
+ uint _season,
+ uint _episode,
+ uint _totalepisodes,
+
const ProgramList &schedList) :
title(_title),
subtitle(_subtitle),
description(_description),
- season(0),
- episode(0),
syndicatedepisode(_syndicatedepisode),
category(_category),
director(),
@@ -647,6 +651,10 @@ ProgramInfo::ProgramInfo(
dupin(kDupsInAll),
dupmethod(kDupCheckSubDesc),
+ season(_season),
+ episode(_episode),
+ totalepisodes(_totalepisodes),
+
// everything below this line is not serialized
availableStatus(asAvailable),
spread(-1),
@@ -714,6 +722,7 @@ ProgramInfo::ProgramInfo(
const QString &_description,
uint _season,
uint _episode,
+ uint _totalepisodes,
const QString &_category,
uint _chanid,
@@ -738,6 +747,7 @@ ProgramInfo::ProgramInfo(
description(_description),
season(_season),
episode(_episode),
+ totalepisodes(_totalepisodes),
category(_category),
director(),
@@ -977,6 +987,7 @@ void ProgramInfo::clone(const ProgramInfo &other,
description = other.description;
season = other.season;
episode = other.episode;
+ totalepisodes = other.totalepisodes;
syndicatedepisode = other.syndicatedepisode;
category = other.category;
director = other.director;
@@ -1085,6 +1096,7 @@ void ProgramInfo::clear(void)
description.clear();
season = 0;
episode = 0;
+ totalepisodes = 0;
syndicatedepisode.clear();
category.clear();
director.clear();
@@ -1257,52 +1269,53 @@ void ProgramInfo::ToStringList(QStringList &list) const
STR_TO_LIST(description); // 2
INT_TO_LIST(season); // 3
INT_TO_LIST(episode); // 4
- STR_TO_LIST(syndicatedepisode); // 5
- STR_TO_LIST(category); // 6
- INT_TO_LIST(chanid); // 7
- STR_TO_LIST(chanstr); // 8
- STR_TO_LIST(chansign); // 9
- STR_TO_LIST(channame); // 10
- STR_TO_LIST(pathname); // 11
- INT_TO_LIST(filesize); // 12
-
- DATETIME_TO_LIST(startts); // 13
- DATETIME_TO_LIST(endts); // 14
- INT_TO_LIST(findid); // 15
- STR_TO_LIST(hostname); // 16
- INT_TO_LIST(sourceid); // 17
- INT_TO_LIST(cardid); // 18
- INT_TO_LIST(inputid); // 19
- INT_TO_LIST(recpriority); // 20
- INT_TO_LIST(recstatus); // 21
- INT_TO_LIST(recordid); // 22
-
- INT_TO_LIST(rectype); // 23
- INT_TO_LIST(dupin); // 24
- INT_TO_LIST(dupmethod); // 25
- DATETIME_TO_LIST(recstartts);//26
- DATETIME_TO_LIST(recendts);// 27
- INT_TO_LIST(programflags); // 28
- STR_TO_LIST((!recgroup.isEmpty()) ? recgroup : "Default"); // 29
- STR_TO_LIST(chanplaybackfilters); // 30
- STR_TO_LIST(seriesid); // 31
- STR_TO_LIST(programid); // 32
- STR_TO_LIST(inetref); // 33
-
- DATETIME_TO_LIST(lastmodified); // 34
- FLOAT_TO_LIST(stars); // 35
- DATE_TO_LIST(originalAirDate); // 36
- STR_TO_LIST((!playgroup.isEmpty()) ? playgroup : "Default"); // 37
- INT_TO_LIST(recpriority2); // 38
- INT_TO_LIST(parentid); // 39
- STR_TO_LIST((!storagegroup.isEmpty()) ? storagegroup : "Default"); // 40
- INT_TO_LIST(GetAudioProperties()); // 41
- INT_TO_LIST(GetVideoProperties()); // 42
- INT_TO_LIST(GetSubtitleType()); // 43
-
- INT_TO_LIST(year); // 44
- INT_TO_LIST(partnumber); // 45
- INT_TO_LIST(parttotal); // 46
+ INT_TO_LIST(totalepisodes); // 5
+ STR_TO_LIST(syndicatedepisode); // 6
+ STR_TO_LIST(category); // 7
+ INT_TO_LIST(chanid); // 8
+ STR_TO_LIST(chanstr); // 9
+ STR_TO_LIST(chansign); // 10
+ STR_TO_LIST(channame); // 11
+ STR_TO_LIST(pathname); // 12
+ INT_TO_LIST(filesize); // 13
+
+ DATETIME_TO_LIST(startts); // 14
+ DATETIME_TO_LIST(endts); // 15
+ INT_TO_LIST(findid); // 16
+ STR_TO_LIST(hostname); // 17
+ INT_TO_LIST(sourceid); // 18
+ INT_TO_LIST(cardid); // 19
+ INT_TO_LIST(inputid); // 20
+ INT_TO_LIST(recpriority); // 21
+ INT_TO_LIST(recstatus); // 22
+ INT_TO_LIST(recordid); // 23
+
+ INT_TO_LIST(rectype); // 24
+ INT_TO_LIST(dupin); // 25
+ INT_TO_LIST(dupmethod); // 26
+ DATETIME_TO_LIST(recstartts);//27
+ DATETIME_TO_LIST(recendts);// 28
+ INT_TO_LIST(programflags); // 29
+ STR_TO_LIST((!recgroup.isEmpty()) ? recgroup : "Default"); // 30
+ STR_TO_LIST(chanplaybackfilters); // 31
+ STR_TO_LIST(seriesid); // 32
+ STR_TO_LIST(programid); // 33
+ STR_TO_LIST(inetref); // 34
+
+ DATETIME_TO_LIST(lastmodified); // 35
+ FLOAT_TO_LIST(stars); // 36
+ DATE_TO_LIST(originalAirDate); // 37
+ STR_TO_LIST((!playgroup.isEmpty()) ? playgroup : "Default"); // 38
+ INT_TO_LIST(recpriority2); // 39
+ INT_TO_LIST(parentid); // 40
+ STR_TO_LIST((!storagegroup.isEmpty()) ? storagegroup : "Default"); // 41
+ INT_TO_LIST(GetAudioProperties()); // 42
+ INT_TO_LIST(GetVideoProperties()); // 43
+ INT_TO_LIST(GetSubtitleType()); // 44
+
+ INT_TO_LIST(year); // 45
+ INT_TO_LIST(partnumber); // 46
+ INT_TO_LIST(parttotal); // 47
/* do not forget to update the NUMPROGRAMLINES defines! */
}
@@ -1355,56 +1368,57 @@ bool ProgramInfo::FromStringList(QStringList::const_iterator &it,
STR_FROM_LIST(description); // 2
INT_FROM_LIST(season); // 3
INT_FROM_LIST(episode); // 4
- STR_FROM_LIST(syndicatedepisode); // 5
- STR_FROM_LIST(category); // 6
- INT_FROM_LIST(chanid); // 7
- STR_FROM_LIST(chanstr); // 8
- STR_FROM_LIST(chansign); // 9
- STR_FROM_LIST(channame); // 10
- STR_FROM_LIST(pathname); // 11
- INT_FROM_LIST(filesize); // 12
-
- DATETIME_FROM_LIST(startts); // 13
- DATETIME_FROM_LIST(endts); // 14
- INT_FROM_LIST(findid); // 15
- STR_FROM_LIST(hostname); // 16
- INT_FROM_LIST(sourceid); // 17
- INT_FROM_LIST(cardid); // 18
- INT_FROM_LIST(inputid); // 19
- INT_FROM_LIST(recpriority); // 20
- ENUM_FROM_LIST(recstatus, RecStatusType); // 21
- INT_FROM_LIST(recordid); // 22
-
- ENUM_FROM_LIST(rectype, RecordingType); // 23
- ENUM_FROM_LIST(dupin, RecordingDupInType); // 24
- ENUM_FROM_LIST(dupmethod, RecordingDupMethodType); // 25
- DATETIME_FROM_LIST(recstartts); // 26
- DATETIME_FROM_LIST(recendts); // 27
- INT_FROM_LIST(programflags); // 28
- STR_FROM_LIST(recgroup); // 29
- STR_FROM_LIST(chanplaybackfilters);//30
- STR_FROM_LIST(seriesid); // 31
- STR_FROM_LIST(programid); // 32
- STR_FROM_LIST(inetref); // 33
-
- DATETIME_FROM_LIST(lastmodified); // 34
- FLOAT_FROM_LIST(stars); // 35
- DATE_FROM_LIST(originalAirDate);; // 36
- STR_FROM_LIST(playgroup); // 37
- INT_FROM_LIST(recpriority2); // 38
- INT_FROM_LIST(parentid); // 39
- STR_FROM_LIST(storagegroup); // 40
+ INT_FROM_LIST(totalepisodes); // 5
+ STR_FROM_LIST(syndicatedepisode); // 6
+ STR_FROM_LIST(category); // 7
+ INT_FROM_LIST(chanid); // 8
+ STR_FROM_LIST(chanstr); // 9
+ STR_FROM_LIST(chansign); // 10
+ STR_FROM_LIST(channame); // 11
+ STR_FROM_LIST(pathname); // 12
+ INT_FROM_LIST(filesize); // 13
+
+ DATETIME_FROM_LIST(startts); // 14
+ DATETIME_FROM_LIST(endts); // 15
+ INT_FROM_LIST(findid); // 16
+ STR_FROM_LIST(hostname); // 17
+ INT_FROM_LIST(sourceid); // 18
+ INT_FROM_LIST(cardid); // 19
+ INT_FROM_LIST(inputid); // 20
+ INT_FROM_LIST(recpriority); // 21
+ ENUM_FROM_LIST(recstatus, RecStatusType); // 22
+ INT_FROM_LIST(recordid); // 23
+
+ ENUM_FROM_LIST(rectype, RecordingType); // 24
+ ENUM_FROM_LIST(dupin, RecordingDupInType); // 25
+ ENUM_FROM_LIST(dupmethod, RecordingDupMethodType); // 26
+ DATETIME_FROM_LIST(recstartts); // 27
+ DATETIME_FROM_LIST(recendts); // 28
+ INT_FROM_LIST(programflags); // 29
+ STR_FROM_LIST(recgroup); // 30
+ STR_FROM_LIST(chanplaybackfilters);//31
+ STR_FROM_LIST(seriesid); // 32
+ STR_FROM_LIST(programid); // 33
+ STR_FROM_LIST(inetref); // 34
+
+ DATETIME_FROM_LIST(lastmodified); // 35
+ FLOAT_FROM_LIST(stars); // 36
+ DATE_FROM_LIST(originalAirDate);; // 37
+ STR_FROM_LIST(playgroup); // 38
+ INT_FROM_LIST(recpriority2); // 39
+ INT_FROM_LIST(parentid); // 40
+ STR_FROM_LIST(storagegroup); // 41
uint audioproperties, videoproperties, subtitleType;
- INT_FROM_LIST(audioproperties); // 41
- INT_FROM_LIST(videoproperties); // 42
- INT_FROM_LIST(subtitleType); // 43
+ INT_FROM_LIST(audioproperties); // 42
+ INT_FROM_LIST(videoproperties); // 43
+ INT_FROM_LIST(subtitleType); // 44
properties = ((subtitleType << kSubtitlePropertyOffset) |
(videoproperties << kVideoPropertyOffset) |
(audioproperties << kAudioPropertyOffset));
- INT_FROM_LIST(year); // 44
- INT_FROM_LIST(partnumber); // 45
- INT_FROM_LIST(parttotal); // 46
+ INT_FROM_LIST(year); // 45
+ INT_FROM_LIST(partnumber); // 46
+ INT_FROM_LIST(parttotal); // 47
if (!origChanid || !origRecstartts.isValid() ||
(origChanid != chanid) || (origRecstartts != recstartts))
@@ -1457,6 +1471,7 @@ void ProgramInfo::ToMap(InfoMap &progMap,
{
progMap["season"] = format_season_and_episode(season, 1);
progMap["episode"] = format_season_and_episode(episode, 1);
+ progMap["totalepisodes"] = format_season_and_episode(totalepisodes, 1);
progMap["s00e00"] = QString("s%1e%2")
.arg(format_season_and_episode(GetSeason(), 2))
.arg(format_season_and_episode(GetEpisode(), 2));
@@ -1467,6 +1482,7 @@ void ProgramInfo::ToMap(InfoMap &progMap,
else
{
progMap["season"] = progMap["episode"] = "";
+ progMap["totalepisodes"] = "";
progMap["s00e00"] = progMap["00x00"] = "";
}
progMap["syndicatedepisode"] = syndicatedepisode;
@@ -1883,6 +1899,7 @@ bool ProgramInfo::LoadProgramFromRecorded(
description = query.value(2).toString();
season = query.value(3).toUInt();
episode = query.value(4).toUInt();
+ totalepisodes = 0;
syndicatedepisode = query.value(48).toString();
category = query.value(5).toString();
@@ -4816,6 +4833,7 @@ void ProgramInfo::SubstituteMatches(QString &str)
str.replace(QString("%SUBTITLE%"), subtitle);
str.replace(QString("%SEASON%"), QString::number(season));
str.replace(QString("%EPISODE%"), QString::number(episode));
+ str.replace(QString("%TOTALEPISODES%"), QString::number(totalepisodes));
str.replace(QString("%SYNDICATEDEPISODE%"), syndicatedepisode);
str.replace(QString("%DESCRIPTION%"), description);
str.replace(QString("%HOSTNAME%"), hostname);
@@ -4959,7 +4977,8 @@ static bool FromProgramQuery(
" oldrecstatus.rectype, oldrecstatus.recstatus, "
" oldrecstatus.findid, program.videoprop+0, program.audioprop+0, "
" program.subtitletypes+0, program.syndicatedepisodenumber, "
- " program.partnumber, program.parttotal "
+ " program.partnumber, program.parttotal, "
+ " program.season, program.episode, program.totalepisodes "
"FROM program "
"LEFT JOIN channel ON program.chanid = channel.chanid "
"LEFT JOIN oldrecorded AS oldrecstatus ON "
@@ -5054,6 +5073,9 @@ bool LoadFromProgram(
query.value(23).toInt(), // videoprop
query.value(24).toInt(), // audioprop
query.value(25).toInt(), // subtitletypes
+ query.value(29).toUInt(), // season
+ query.value(30).toUInt(), // episode
+ query.value(31).toUInt(), // totalepisodes
schedList));
}
9 mythtv/libs/libmyth/programinfo.h
View
@@ -30,7 +30,7 @@
mythtv/bindings/python/MythTV/static.py (version number)
mythtv/bindings/python/MythTV/mythproto.py (layout)
*/
-#define NUMPROGRAMLINES 47
+#define NUMPROGRAMLINES 48
class ProgramInfo;
typedef AutoDeleteDeque<ProgramInfo*> ProgramList;
@@ -212,6 +212,10 @@ class MPUBLIC ProgramInfo
uint audioprops,
uint subtitletype,
+ uint season,
+ uint episode,
+ uint totalepisodes,
+
const ProgramList &schedList);
/// Constructs a basic ProgramInfo (used by RecordingInfo)
ProgramInfo(const QString &title,
@@ -219,6 +223,7 @@ class MPUBLIC ProgramInfo
const QString &description,
uint season,
uint episode,
+ uint totalepisodes,
const QString &category,
uint chanid,
@@ -335,6 +340,7 @@ class MPUBLIC ProgramInfo
QString GetDescription(void) const { return description; }
uint GetSeason(void) const { return season; }
uint GetEpisode(void) const { return episode; }
+ uint GetEpisodeTotal(void) const { return totalepisodes; }
QString GetCategory(void) const { return category; }
/// This is the unique key used in the database to locate tuning
/// information. [1..2^32] are valid keys, 0 is not.
@@ -673,6 +679,7 @@ class MPUBLIC ProgramInfo
QString description;
uint season;
uint episode;
+ uint totalepisodes;
QString syndicatedepisode;
QString category;
QString director;
4 mythtv/libs/libmythbase/mythversion.h
View
@@ -39,8 +39,8 @@
* http://www.mythtv.org/wiki/Category:Myth_Protocol_Commands
* http://www.mythtv.org/wiki/Category:Myth_Protocol
*/
-#define MYTH_PROTO_VERSION "77"
-#define MYTH_PROTO_TOKEN "WindMark"
+#define MYTH_PROTO_VERSION "78"
+#define MYTH_PROTO_TOKEN "IceBurns"
/** \brief Increment this whenever the MythTV core database schema changes.
*
30 mythtv/libs/libmythservicecontracts/datacontracts/programAndChannel.h
View
@@ -167,19 +167,20 @@ class SERVICE_PUBLIC Program : public QObject
Q_PROPERTY( int AudioProps READ AudioProps WRITE setAudioProps)
Q_PROPERTY( int SubProps READ SubProps WRITE setSubProps )
- Q_PROPERTY( QString SeriesId READ SeriesId WRITE setSeriesId DESIGNABLE SerializeDetails )
- Q_PROPERTY( QString ProgramId READ ProgramId WRITE setProgramId DESIGNABLE SerializeDetails )
- Q_PROPERTY( double Stars READ Stars WRITE setStars DESIGNABLE SerializeDetails )
- Q_PROPERTY( qlonglong FileSize READ FileSize WRITE setFileSize DESIGNABLE SerializeDetails )
- Q_PROPERTY( QDateTime LastModified READ LastModified WRITE setLastModified DESIGNABLE SerializeDetails )
- Q_PROPERTY( int ProgramFlags READ ProgramFlags WRITE setProgramFlags DESIGNABLE SerializeDetails )
- Q_PROPERTY( QString FileName READ FileName WRITE setFileName DESIGNABLE SerializeDetails )
- Q_PROPERTY( QString HostName READ HostName WRITE setHostName DESIGNABLE SerializeDetails )
- Q_PROPERTY( QDate Airdate READ Airdate WRITE setAirdate DESIGNABLE SerializeDetails )
- Q_PROPERTY( QString Description READ Description WRITE setDescription DESIGNABLE SerializeDetails )
- Q_PROPERTY( QString Inetref READ Inetref WRITE setInetref DESIGNABLE SerializeDetails )
- Q_PROPERTY( int Season READ Season WRITE setSeason DESIGNABLE SerializeDetails )
- Q_PROPERTY( int Episode READ Episode WRITE setEpisode DESIGNABLE SerializeDetails )
+ Q_PROPERTY( QString SeriesId READ SeriesId WRITE setSeriesId DESIGNABLE SerializeDetails )
+ Q_PROPERTY( QString ProgramId READ ProgramId WRITE setProgramId DESIGNABLE SerializeDetails )
+ Q_PROPERTY( double Stars READ Stars WRITE setStars DESIGNABLE SerializeDetails )
+ Q_PROPERTY( qlonglong FileSize READ FileSize WRITE setFileSize DESIGNABLE SerializeDetails )
+ Q_PROPERTY( QDateTime LastModified READ LastModified WRITE setLastModified DESIGNABLE SerializeDetails )
+ Q_PROPERTY( int ProgramFlags READ ProgramFlags WRITE setProgramFlags DESIGNABLE SerializeDetails )
+ Q_PROPERTY( QString FileName READ FileName WRITE setFileName DESIGNABLE SerializeDetails )
+ Q_PROPERTY( QString HostName READ HostName WRITE setHostName DESIGNABLE SerializeDetails )
+ Q_PROPERTY( QDate Airdate READ Airdate WRITE setAirdate DESIGNABLE SerializeDetails )
+ Q_PROPERTY( QString Description READ Description WRITE setDescription DESIGNABLE SerializeDetails )
+ Q_PROPERTY( QString Inetref READ Inetref WRITE setInetref DESIGNABLE SerializeDetails )
+ Q_PROPERTY( int Season READ Season WRITE setSeason DESIGNABLE SerializeDetails )
+ Q_PROPERTY( int Episode READ Episode WRITE setEpisode DESIGNABLE SerializeDetails )
+ Q_PROPERTY( int TotalEpisodes READ TotalEpisodes WRITE setTotalEpisodes DESIGNABLE SerializeDetails )
Q_PROPERTY( QObject* Channel READ Channel DESIGNABLE SerializeChannel )
Q_PROPERTY( QObject* Recording READ Recording DESIGNABLE SerializeRecording )
@@ -209,6 +210,7 @@ class SERVICE_PUBLIC Program : public QObject
PROPERTYIMP ( QString , Inetref )
PROPERTYIMP ( int , Season )
PROPERTYIMP ( int , Episode )
+ PROPERTYIMP ( int , TotalEpisodes)
PROPERTYIMP_PTR( ChannelInfo , Channel )
PROPERTYIMP_PTR( RecordingInfo , Recording )
@@ -237,6 +239,7 @@ class SERVICE_PUBLIC Program : public QObject
m_SubProps ( 0 ),
m_Season ( 0 ),
m_Episode ( 0 ),
+ m_TotalEpisodes ( 0 ),
m_Channel ( NULL ),
m_Recording ( NULL ),
m_Artwork ( NULL ),
@@ -277,6 +280,7 @@ class SERVICE_PUBLIC Program : public QObject
m_Inetref = src.m_Inetref;
m_Season = src.m_Season;
m_Episode = src.m_Episode;
+ m_TotalEpisodes = src.m_TotalEpisodes;
m_SerializeDetails = src.m_SerializeDetails;
m_SerializeChannel = src.m_SerializeChannel;
m_SerializeRecording= src.m_SerializeRecording;
5 mythtv/libs/libmythtv/recordinginfo.cpp
View
@@ -49,6 +49,7 @@ RecordingInfo::RecordingInfo(
const QString &_description,
uint _season,
uint _episode,
+ uint _totalepisodes,
const QString &_syndicatedepisode,
const QString &_category,
@@ -107,7 +108,7 @@ RecordingInfo::RecordingInfo(
int _schedorder,
uint _mplexid) :
ProgramInfo(
- _title, _subtitle, _description, _season, _episode,
+ _title, _subtitle, _description, _season, _episode, _totalepisodes,
_category, _chanid, _chanstr, _chansign, _channame,
QString(), _recgroup, _playgroup,
_startts, _endts, _recstartts, _recendts,
@@ -207,7 +208,7 @@ RecordingInfo::RecordingInfo(
bool _commfree) :
ProgramInfo(
- _title, _subtitle, _description, _season, _episode,
+ _title, _subtitle, _description, _season, _episode, 0,
_category, _chanid, _chanstr, _chansign, _channame,
QString(), _recgroup, _playgroup,
_startts, _endts, _recstartts, _recendts,
1  mythtv/libs/libmythtv/recordinginfo.h
View
@@ -90,6 +90,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
const QString &description,
uint season,
uint episode,
+ uint totalepisodes,
const QString &syndicatedepisode,
const QString &category,
1  mythtv/programs/mythbackend/scheduler.cpp
View
@@ -4056,6 +4056,7 @@ void Scheduler::AddNewRecords(void)
result.value(6).toString(),//description
0, // season
0, // episode
+ 0, // total episodes
result.value(48).toString(),//synidcatedepisode
result.value(11).toString(),//category
1  mythtv/programs/mythbackend/services/serviceUtil.cpp
View
@@ -78,6 +78,7 @@ void FillProgramInfo( DTC::Program *pProgram,
pProgram->setInetref ( pInfo->GetInetRef() );
pProgram->setSeason ( pInfo->GetSeason() );
pProgram->setEpisode ( pInfo->GetEpisode() );
+ pProgram->setTotalEpisodes( pInfo->GetEpisodeTotal() );
}
pProgram->setSerializeChannel( bIncChannel );
Please sign in to comment.
Something went wrong with that request. Please try again.