-
From d03a0ca1bb100a35017bc11f3ce4b9d353bf9a39 Mon Sep 17 00:00:00 2001
From: George Nassas <gnassas@gmail.com>
Date: Mon, 18 Nov 2013 21:41:36 -0500
Subject: [PATCH] MythTV changes
---
mythtv/bindings/perl/MythTV.pm | 4 +-
mythtv/bindings/perl/MythTV/Program.pm | 4 ++
mythtv/bindings/php/MythBackend.php | 4 +-
mythtv/bindings/php/MythTVProgram.php | 1 +
mythtv/bindings/php/MythTVRecording.php | 1 +
mythtv/bindings/python/MythTV/mythproto.py | 10 +--
mythtv/bindings/python/MythTV/static.py | 4 +-
mythtv/libs/libmyth/programinfo.cpp | 73 ++++++++++++----------
mythtv/libs/libmyth/programinfo.h | 11 +++-
mythtv/libs/libmythbase/mythversion.h | 4 +-
.../datacontracts/recording.h | 3 +
mythtv/libs/libmythtv/recordinginfo.cpp | 18 +++++-
mythtv/libs/libmythtv/recordinginfo.h | 2 +
mythtv/libs/libmythtv/videosource.cpp | 8 +--
.../programs/mythbackend/services/serviceUtil.cpp | 1 +
mythtv/programs/mythfrontend/progdetails.cpp | 3 +
.../MythCenter-wide/htmls/progdetails_page2.html | 1 +
.../themes/MythCenter/htmls/progdetails_page2.html | 1 +
mythtv/themes/Terra/htmls/progdetails_page2.html | 1 +
mythtv/themes/default/htmls/progdetails_page2.html | 1 +
20 files changed, 102 insertions(+), 53 deletions(-)
diff --git a/mythtv/bindings/perl/MythTV.pm b/mythtv/bindings/perl/MythTV.pm
index b3e3763..dbdef12 100644
a
|
b
|
package MythTV; |
107 | 107 | # Note: as of July 21, 2010, this is actually a string, to account for proto |
108 | 108 | # versions of the form "58a". This will get used if protocol versions are |
109 | 109 | # changed on a fixes branch ongoing. |
110 | | our $PROTO_VERSION = "79"; |
111 | | our $PROTO_TOKEN = "BasaltGiant"; |
| 110 | our $PROTO_VERSION = "80"; |
| 111 | our $PROTO_TOKEN = "SeaBird"; |
112 | 112 | |
113 | 113 | # currentDatabaseVersion is defined in libmythtv in |
114 | 114 | # mythtv/libs/libmythtv/dbcheck.cpp and should be the current MythTV core |
-
diff --git a/mythtv/bindings/perl/MythTV/Program.pm b/mythtv/bindings/perl/MythTV/Program.pm
index eb70a2d..c74f00e 100644
a
|
b
|
package MythTV::Program; |
94 | 94 | $self->{'parttotal'} = $_[47]; # part total |
95 | 95 | $self->{'categorytype'} = $_[48]; # category type (enum) |
96 | 96 | |
| 97 | $self->{'recinput'} = $_[49]; # recording input |
| 98 | |
97 | 99 | # Load the channel data |
98 | 100 | if ($self->{'chanid'}) { |
99 | 101 | $self->{'channel'} = $self->{'_mythtv'}->channel($self->{'chanid'}); |
… |
… |
package MythTV::Program; |
190 | 192 | $self->{'year'} , # 44 production year |
191 | 193 | $self->{'partnumber'} , # 45 part number |
192 | 194 | $self->{'parttotal'} , # 46 part total |
| 195 | |
| 196 | $self->{'recinput'} , # 47 rec input |
193 | 197 | '' # trailing separator |
194 | 198 | ); |
195 | 199 | } |
-
diff --git a/mythtv/bindings/php/MythBackend.php b/mythtv/bindings/php/MythBackend.php
index 0866afd..41d2111 100644
a
|
b
|
class MythBackend { |
11 | 11 | |
12 | 12 | // MYTH_PROTO_VERSION is defined in libmyth in mythtv/libs/libmyth/mythcontext.h |
13 | 13 | // and should be the current MythTV protocol version. |
14 | | static $protocol_version = '79'; |
15 | | static $protocol_token = 'BasaltGiant'; |
| 14 | static $protocol_version = '80'; |
| 15 | static $protocol_token = 'SeaBird'; |
16 | 16 | |
17 | 17 | // The character string used by the backend to separate records |
18 | 18 | static $backend_separator = '[]:[]'; |
-
diff --git a/mythtv/bindings/php/MythTVProgram.php b/mythtv/bindings/php/MythTVProgram.php
index a99741e..70c6677 100644
a
|
b
|
class MythTVProgram { |
45 | 45 | public $airdate; |
46 | 46 | public $playgroup; |
47 | 47 | public $recpriority2; |
| 48 | public $recinput; |
48 | 49 | public $parentid; |
49 | 50 | public $storagegroup; |
50 | 51 | public $audioprop; |
-
diff --git a/mythtv/bindings/php/MythTVRecording.php b/mythtv/bindings/php/MythTVRecording.php
index 933b54f..6929126 100644
a
|
b
|
class MythTVRecording { |
34 | 34 | public $transcoder; |
35 | 35 | public $timestretch; |
36 | 36 | public $recpriority; |
| 37 | public $recinput; |
37 | 38 | public $basename; |
38 | 39 | public $progstart; |
39 | 40 | public $progend; |
-
diff --git a/mythtv/bindings/python/MythTV/mythproto.py b/mythtv/bindings/python/MythTV/mythproto.py
index ce6c738..6ae583e 100644
a
|
b
|
class Program( CMPRecord, DictData, RECSTATUS, AUDIO_PROPS, \ |
841 | 841 | 'airdate', 'playgroup', 'recpriority2', |
842 | 842 | 'parentid', 'storagegroup', 'audio_props', |
843 | 843 | 'video_props', 'subtitle_type','year', |
844 | | 'part_number', 'part_total', 'categorytype'] |
| 844 | 'part_number', 'part_total', 'categorytype', |
| 845 | 'recinput'] |
845 | 846 | _field_type = [ 3, 3, 3, |
846 | 847 | 0, 0, 0, |
847 | 848 | 3, |
… |
… |
class Program( CMPRecord, DictData, RECSTATUS, AUDIO_PROPS, \ |
858 | 859 | 5, 3, 0, |
859 | 860 | 3, 3, 0, |
860 | 861 | 0, 0, 0, |
861 | | 0, 0, 0] |
| 862 | 0, 0, 0, |
| 863 | 3] |
862 | 864 | def __str__(self): |
863 | 865 | return u"<Program '%s','%s' at %s>" % (self.title, |
864 | 866 | self.starttime.isoformat(' '), hex(id(self))) |
… |
… |
class Program( CMPRecord, DictData, RECSTATUS, AUDIO_PROPS, \ |
886 | 888 | for key in ('title','subTitle','seriesId','programId','airdate', |
887 | 889 | 'category','hostname','chanNum','callSign','playGroup', |
888 | 890 | 'recGroup','rectype','programFlags','chanId','recStatus', |
889 | | 'commFree','stars','filesize'): |
| 891 | 'commFree','stars','filesize','recinput'): |
890 | 892 | if key in xmldat: |
891 | 893 | dat[key.lower()] = xmldat[key] |
892 | 894 | for key in ('startTime','endTime','lastModified', |
… |
… |
class Program( CMPRecord, DictData, RECSTATUS, AUDIO_PROPS, \ |
914 | 916 | ('ChanId', 'CallSign', 'ChanNum', 'InputId', 'SourceId'), True) |
915 | 917 | CopyData2(prog['Channel'], dat, (('ChannelName', 'channame'),)) |
916 | 918 | CopyData(prog['Recording'], dat, |
917 | | ('DupMethod', 'PlayGroup', 'RecType', 'RecordId'), True) |
| 919 | ('DupMethod', 'PlayGroup', 'RecType', 'RecordId', 'RecInput'), True) |
918 | 920 | CopyData2(prog['Recording'], dat, (('DupInType', 'dupin'), |
919 | 921 | ('Status', 'recstatus'))) |
920 | 922 | |
-
diff --git a/mythtv/bindings/python/MythTV/static.py b/mythtv/bindings/python/MythTV/static.py
index 08e72f9..c486c3f 100644
a
|
b
|
OWN_VERSION = (0,28,-1,0) |
8 | 8 | SCHEMA_VERSION = 1321 |
9 | 9 | NVSCHEMA_VERSION = 1007 |
10 | 10 | MUSICSCHEMA_VERSION = 1018 |
11 | | PROTO_VERSION = '79' |
12 | | PROTO_TOKEN = 'BasaltGiant' |
| 11 | PROTO_VERSION = '80' |
| 12 | PROTO_TOKEN = 'SeaBird' |
13 | 13 | BACKEND_SEP = '[]:[]' |
14 | 14 | INSTALL_PREFIX = '/usr/local' |
15 | 15 | |
-
diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
index 0642b4d..5139412 100644
a
|
b
|
const QString ProgramInfo::kFromRecordedQuery = |
66 | 66 | " r.findid, rec.dupin, rec.dupmethod, "//45-47 |
67 | 67 | " p.syndicatedepisodenumber, p.partnumber, p.parttotal, "//48-50 |
68 | 68 | " p.season, p.episode, p.totalepisodes, "//51-53 |
69 | | " p.category_type "//54 |
| 69 | " p.category_type, r.recinput "//54-55 |
70 | 70 | "FROM recorded AS r " |
71 | 71 | "LEFT JOIN channel AS c " |
72 | 72 | "ON (r.chanid = c.chanid) " |
… |
… |
ProgramInfo::ProgramInfo(void) : |
123 | 123 | director(), |
124 | 124 | |
125 | 125 | recpriority(0), |
| 126 | recinput(), |
126 | 127 | |
127 | 128 | chanid(0), |
128 | 129 | chanstr(), |
… |
… |
ProgramInfo::ProgramInfo(const ProgramInfo &other) : |
207 | 208 | director(other.director), |
208 | 209 | |
209 | 210 | recpriority(other.recpriority), |
| 211 | recinput(other.recinput), |
210 | 212 | |
211 | 213 | chanid(other.chanid), |
212 | 214 | chanstr(other.chanstr), |
… |
… |
ProgramInfo::ProgramInfo( |
317 | 319 | CategoryType _catType, |
318 | 320 | |
319 | 321 | int _recpriority, |
| 322 | const QString &_recinput, |
320 | 323 | |
321 | 324 | uint64_t _filesize, |
322 | 325 | |
… |
… |
ProgramInfo::ProgramInfo( |
357 | 360 | director(), |
358 | 361 | |
359 | 362 | recpriority(_recpriority), |
| 363 | recinput(_recinput), |
360 | 364 | |
361 | 365 | chanid(_chanid), |
362 | 366 | chanstr(_channum), |
… |
… |
ProgramInfo::ProgramInfo( |
475 | 479 | director(), |
476 | 480 | |
477 | 481 | recpriority(0), |
| 482 | recinput(), |
478 | 483 | |
479 | 484 | chanid(_chanid), |
480 | 485 | chanstr(_channum), |
… |
… |
ProgramInfo::ProgramInfo( |
602 | 607 | director(), |
603 | 608 | |
604 | 609 | recpriority(0), |
| 610 | recinput(), |
605 | 611 | |
606 | 612 | chanid(_chanid), |
607 | 613 | chanstr(_channum), |
… |
… |
ProgramInfo::ProgramInfo( |
746 | 752 | director(), |
747 | 753 | |
748 | 754 | recpriority(0), |
| 755 | recinput(), |
749 | 756 | |
750 | 757 | chanid(_chanid), |
751 | 758 | chanstr(_channum), |
… |
… |
void ProgramInfo::clone(const ProgramInfo &other, |
1010 | 1017 | catType = other.catType; |
1011 | 1018 | |
1012 | 1019 | recpriority = other.recpriority; |
| 1020 | recinput = other.recinput; |
1013 | 1021 | |
1014 | 1022 | filesize = other.filesize; |
1015 | 1023 | |
… |
… |
void ProgramInfo::clone(const ProgramInfo &other, |
1079 | 1087 | programid.detach(); |
1080 | 1088 | inetref.detach(); |
1081 | 1089 | |
| 1090 | recinput.detach(); |
| 1091 | |
1082 | 1092 | sortTitle.detach(); |
1083 | 1093 | inUseForWhat.detach(); |
1084 | 1094 | } |
… |
… |
void ProgramInfo::clear(void) |
1116 | 1126 | seriesid.clear(); |
1117 | 1127 | programid.clear(); |
1118 | 1128 | inetref.clear(); |
| 1129 | recinput.clear(); |
1119 | 1130 | catType = kCategoryNone; |
1120 | 1131 | |
1121 | 1132 | sortTitle.clear(); |
… |
… |
void ProgramInfo::ToStringList(QStringList &list) const |
1311 | 1322 | INT_TO_LIST(partnumber); // 46 |
1312 | 1323 | INT_TO_LIST(parttotal); // 47 |
1313 | 1324 | INT_TO_LIST(catType); // 48 |
| 1325 | STR_TO_LIST(recinput); // 49 |
1314 | 1326 | /* do not forget to update the NUMPROGRAMLINES defines! */ |
1315 | 1327 | } |
1316 | 1328 | |
… |
… |
bool ProgramInfo::FromStringList(QStringList::const_iterator &it, |
1415 | 1427 | INT_FROM_LIST(partnumber); // 46 |
1416 | 1428 | INT_FROM_LIST(parttotal); // 47 |
1417 | 1429 | ENUM_FROM_LIST(catType, CategoryType); // 48 |
| 1430 | STR_FROM_LIST(recinput); // 49 |
1418 | 1431 | |
1419 | 1432 | if (!origChanid || !origRecstartts.isValid() || |
1420 | 1433 | (origChanid != chanid) || (origRecstartts != recstartts)) |
… |
… |
void ProgramInfo::ToMap(InfoMap &progMap, |
1533 | 1546 | if (timeNow.toLocalTime().date().year() != |
1534 | 1547 | endts.toLocalTime().date().year()) |
1535 | 1548 | progMap["endyear"] = endts.toLocalTime().toString("yyyy"); |
| 1549 | progMap["inputname"] = recinput; |
1536 | 1550 | } |
1537 | 1551 | |
1538 | 1552 | using namespace MythDate; |
… |
… |
void ProgramInfo::ToMap(InfoMap &progMap, |
1620 | 1634 | |
1621 | 1635 | progMap["card"] = ::toString(GetRecordingStatus(), cardid); |
1622 | 1636 | progMap["input"] = ::toString(GetRecordingStatus(), inputid); |
1623 | | progMap["inputname"] = QueryInputDisplayName(); |
1624 | 1637 | |
1625 | 1638 | progMap["recpriority"] = recpriority; |
1626 | 1639 | progMap["recpriority2"] = recpriority2; |
… |
… |
bool ProgramInfo::LoadProgramFromRecorded( |
1943 | 1956 | catType = string_to_myth_category_type(query.value(54).toString()); |
1944 | 1957 | |
1945 | 1958 | recpriority = query.value(16).toInt(); |
| 1959 | recinput = query.value(55).toString(); |
1946 | 1960 | |
1947 | 1961 | filesize = query.value(20).toULongLong(); |
1948 | 1962 | |
… |
… |
void ProgramInfo::SaveInetRef(const QString &inet) |
4333 | 4347 | SendUpdateEvent(); |
4334 | 4348 | } |
4335 | 4349 | |
| 4350 | /** \fn ProgramInfo::SaveRecInput(const QString) |
| 4351 | * \brief Sets recording input display name in database, |
| 4352 | * and sets "recinput" field. |
| 4353 | */ |
| 4354 | void ProgramInfo::SaveRecInput(const QString &inputName) |
| 4355 | { |
| 4356 | recinput = inputName; |
| 4357 | |
| 4358 | MSqlQuery query(MSqlQuery::InitCon()); |
| 4359 | |
| 4360 | query.prepare( |
| 4361 | "UPDATE recorded " |
| 4362 | "SET recinput = :RECINPUT " |
| 4363 | "WHERE chanid = :CHANID AND starttime = :STARTTIME " |
| 4364 | "AND recordid = :RECORDID"); |
| 4365 | |
| 4366 | query.bindValue(":RECINPUT", inputName); |
| 4367 | query.bindValue(":CHANID", chanid); |
| 4368 | query.bindValue(":STARTTIME", recstartts); |
| 4369 | query.bindValue(":RECORDID", recordid); |
| 4370 | query.exec(); |
| 4371 | } |
| 4372 | |
4336 | 4373 | /** \brief Attempts to ascertain if the main file for this ProgramInfo |
4337 | 4374 | * is readable. |
4338 | 4375 | * \note This method often initiates a QUERY_CHECKFILE MythProto |
… |
… |
bool ProgramInfo::QueryTuningInfo(QString &channum, QString &input) const |
4688 | 4725 | } |
4689 | 4726 | } |
4690 | 4727 | |
4691 | | /** \brief Returns the display name of the card input for this program. |
4692 | | * \note Ideally this would call CardUtil::GetDisplayName(), but |
4693 | | * that's in libmythtv. Dupliacte code for now until a better |
4694 | | * solution can be found. |
4695 | | */ |
4696 | | QString ProgramInfo::QueryInputDisplayName(void) const |
4697 | | { |
4698 | | if (!inputid) |
4699 | | return QString::null; |
4700 | | |
4701 | | MSqlQuery query(MSqlQuery::InitCon()); |
4702 | | query.prepare("SELECT displayname, cardid, inputname " |
4703 | | "FROM cardinput " |
4704 | | "WHERE cardinputid = :INPUTID"); |
4705 | | query.bindValue(":INPUTID", inputid); |
4706 | | |
4707 | | if (!query.exec()) |
4708 | | MythDB::DBError("ProgramInfo::GetInputDisplayName(uint)", query); |
4709 | | else if (query.next()) |
4710 | | { |
4711 | | QString result = query.value(0).toString(); |
4712 | | if (result.isEmpty()) |
4713 | | result = QString("%1: %2").arg(query.value(1).toInt()) |
4714 | | .arg(query.value(2).toString()); |
4715 | | return result; |
4716 | | } |
4717 | | |
4718 | | return QString::null; |
4719 | | } |
4720 | | |
4721 | 4728 | static int init_tr(void) |
4722 | 4729 | { |
4723 | 4730 | static bool done = false; |
… |
… |
void ProgramInfo::SubstituteMatches(QString &str) |
4842 | 4849 | str.replace(QString("%PLAYGROUP%"), playgroup); |
4843 | 4850 | str.replace(QString("%CHANID%"), QString::number(chanid)); |
4844 | 4851 | str.replace(QString("%INETREF%"), inetref); |
| 4852 | str.replace(QString("%RECINPUT%"), recinput); |
4845 | 4853 | str.replace(QString("%PARTNUMBER%"), QString::number(partnumber)); |
4846 | 4854 | str.replace(QString("%PARTTOTAL%"), QString::number(parttotal)); |
4847 | 4855 | str.replace(QString("%ORIGINALAIRDATE%"), |
… |
… |
bool LoadFromRecorded( |
5342 | 5350 | string_to_myth_category_type(query.value(54).toString()), // category_type |
5343 | 5351 | |
5344 | 5352 | query.value(16).toInt(), // recpriority |
| 5353 | query.value(55).toString(), // recinput |
5345 | 5354 | |
5346 | 5355 | query.value(20).toULongLong(), // filesize |
5347 | 5356 | |
-
diff --git a/mythtv/libs/libmyth/programinfo.h b/mythtv/libs/libmyth/programinfo.h
index 660c777..66d9cd5 100644
a
|
b
|
|
30 | 30 | mythtv/bindings/python/MythTV/static.py (version number) |
31 | 31 | mythtv/bindings/python/MythTV/mythproto.py (layout) |
32 | 32 | */ |
33 | | #define NUMPROGRAMLINES 49 |
| 33 | #define NUMPROGRAMLINES 50 |
34 | 34 | |
35 | 35 | class ProgramInfo; |
36 | 36 | typedef AutoDeleteDeque<ProgramInfo*> ProgramList; |
… |
… |
class MPUBLIC ProgramInfo |
112 | 112 | CategoryType catType, |
113 | 113 | |
114 | 114 | int recpriority, |
| 115 | const QString &recinput, |
115 | 116 | |
116 | 117 | uint64_t filesize, |
117 | 118 | |
… |
… |
class MPUBLIC ProgramInfo |
416 | 417 | QString GetCategoryTypeString(void) const; |
417 | 418 | int GetRecordingPriority(void) const { return recpriority; } |
418 | 419 | int GetRecordingPriority2(void) const { return recpriority2; } |
| 420 | QString GetRecInput(void) const { return recinput; } |
419 | 421 | float GetStars(void) const { return stars; } |
420 | 422 | uint GetStars(uint range_max) const |
421 | 423 | { return (int)(stars * range_max + 0.5f); } |
… |
… |
class MPUBLIC ProgramInfo |
503 | 505 | void SetRecordingPriority2(int priority) { recpriority2 = priority; } |
504 | 506 | void SetRecordingRuleID(uint id) { recordid = id; } |
505 | 507 | void SetSourceID(uint id) { sourceid = id; } |
506 | | void SetInputID( uint id) { inputid = id; } |
| 508 | virtual void |
| 509 | SetInputID( uint id) { inputid = id; } |
507 | 510 | void SetCardID( uint id) { cardid = id; } |
| 511 | void SetRecInput( const QString &inpName) { recinput = inpName; } |
508 | 512 | void SetReactivated(bool reactivate) |
509 | 513 | { |
510 | 514 | programflags &= ~FL_REACTIVATE; |
… |
… |
class MPUBLIC ProgramInfo |
547 | 551 | AutoExpireType QueryAutoExpire(void) const; |
548 | 552 | TranscodingStatus QueryTranscodeStatus(void) const; |
549 | 553 | bool QueryTuningInfo(QString &channum, QString &input) const; |
550 | | QString QueryInputDisplayName(void) const; |
551 | 554 | uint QueryAverageWidth(void) const; |
552 | 555 | uint QueryAverageHeight(void) const; |
553 | 556 | uint QueryAverageFrameRate(void) const; |
… |
… |
class MPUBLIC ProgramInfo |
585 | 588 | void UpdateInUseMark(bool force = false); |
586 | 589 | void SaveSeasonEpisode(uint seas, uint ep); |
587 | 590 | void SaveInetRef(const QString &inet); |
| 591 | void SaveRecInput(const QString &inputName); |
588 | 592 | |
589 | 593 | // Extremely slow functions that cannot be called from the UI thread. |
590 | 594 | QString DiscoverRecordingDirectory(void) const; |
… |
… |
class MPUBLIC ProgramInfo |
687 | 691 | QString director; |
688 | 692 | |
689 | 693 | int32_t recpriority; |
| 694 | QString recinput; |
690 | 695 | |
691 | 696 | uint32_t chanid; |
692 | 697 | QString chanstr; // Channum |
-
diff --git a/mythtv/libs/libmythbase/mythversion.h b/mythtv/libs/libmythbase/mythversion.h
index 1cb0b1b..0eaa230 100644
a
|
b
|
|
39 | 39 | * http://www.mythtv.org/wiki/Category:Myth_Protocol_Commands |
40 | 40 | * http://www.mythtv.org/wiki/Category:Myth_Protocol |
41 | 41 | */ |
42 | | #define MYTH_PROTO_VERSION "79" |
43 | | #define MYTH_PROTO_TOKEN "BasaltGiant" |
| 42 | #define MYTH_PROTO_VERSION "80" |
| 43 | #define MYTH_PROTO_TOKEN "SeaBird" |
44 | 44 | |
45 | 45 | /** \brief Increment this whenever the MythTV core database schema changes. |
46 | 46 | * |
-
diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/recording.h b/mythtv/libs/libmythservicecontracts/datacontracts/recording.h
index d2870eb..e247803 100644
a
|
b
|
class SERVICE_PUBLIC RecordingInfo : public QObject |
41 | 41 | Q_PROPERTY( int EncoderId READ EncoderId WRITE setEncoderId DESIGNABLE SerializeDetails ) |
42 | 42 | Q_PROPERTY( QString EncoderName READ EncoderName WRITE setEncoderName DESIGNABLE SerializeDetails ) |
43 | 43 | Q_PROPERTY( QString Profile READ Profile WRITE setProfile DESIGNABLE SerializeDetails ) |
| 44 | Q_PROPERTY( QString InputName READ InputName WRITE setInputName DESIGNABLE SerializeDetails ) |
44 | 45 | |
45 | 46 | /* |
46 | 47 | Not using since Q_ENUMS seem to require the enum be defined in this class |
… |
… |
class SERVICE_PUBLIC RecordingInfo : public QObject |
66 | 67 | PROPERTYIMP ( int , EncoderId ) |
67 | 68 | PROPERTYIMP ( QString , EncoderName ) |
68 | 69 | PROPERTYIMP ( QString , Profile ) |
| 70 | PROPERTYIMP ( QString , InputName ) |
69 | 71 | |
70 | 72 | // Used only by Serializer |
71 | 73 | PROPERTYIMP( bool, SerializeDetails ) |
… |
… |
class SERVICE_PUBLIC RecordingInfo : public QObject |
109 | 111 | m_DupMethod = src.m_DupMethod ; |
110 | 112 | m_EncoderId = src.m_EncoderId ; |
111 | 113 | m_Profile = src.m_Profile ; |
| 114 | m_InputName = src.m_InputName ; |
112 | 115 | m_SerializeDetails= src.m_SerializeDetails ; |
113 | 116 | } |
114 | 117 | }; |
-
diff --git a/mythtv/libs/libmythtv/recordinginfo.cpp b/mythtv/libs/libmythtv/recordinginfo.cpp
index ec675a2..80b4122 100644
a
|
b
|
using namespace std; |
30 | 30 | #include "mythdb.h" |
31 | 31 | #include "mythlogging.h" |
32 | 32 | #include "previewgenerator.h" |
| 33 | #include "cardutil.h" |
33 | 34 | #include "channelutil.h" |
34 | 35 | |
35 | 36 | #define LOC QString("RecordingInfo(%1): ").arg(GetBasename()) |
… |
… |
RecordingInfo::RecordingInfo( |
156 | 157 | inputid = _inputid; |
157 | 158 | cardid = _cardid; |
158 | 159 | |
| 160 | SetRecInput(CardUtil::GetDisplayName(inputid)); |
| 161 | |
159 | 162 | findid = _findid; |
160 | 163 | |
161 | 164 | properties = ((_subtitleType << 11) | |
… |
… |
void RecordingInfo::ApplyNeverRecord(void) |
793 | 796 | AddHistory(true, true); |
794 | 797 | } |
795 | 798 | |
| 799 | /** \fn RecordingInfo::SetInputID(uint id) |
| 800 | * \brief Extend ProgramInfo's method to set the recording input |
| 801 | & name as a side effect. |
| 802 | */ |
| 803 | void RecordingInfo::SetInputID(uint id) |
| 804 | { |
| 805 | ProgramInfo::SetInputID(id); |
| 806 | SaveRecInput(CardUtil::GetDisplayName(id)); |
| 807 | } |
| 808 | |
796 | 809 | /** \fn RecordingInfo::QuickRecord(void) |
797 | 810 | * \brief Create a kSingleRecord if not already scheduled. |
798 | 811 | */ |
… |
… |
bool RecordingInfo::InsertProgram(const RecordingInfo *pg, |
961 | 974 | " stars, previouslyshown, originalairdate, " |
962 | 975 | " findid, transcoder, playgroup, recpriority, " |
963 | 976 | " basename, progstart, progend, profile, " |
964 | | " duplicate, storagegroup) " |
| 977 | " duplicate, storagegroup,recinput) " |
965 | 978 | "VALUES" |
966 | 979 | " (:CHANID, :STARTS, :ENDS, :TITLE, " |
967 | 980 | " :SUBTITLE, :DESC, :SEASON, :EPISODE, " |
… |
… |
bool RecordingInfo::InsertProgram(const RecordingInfo *pg, |
970 | 983 | " :STARS, :REPEAT, :ORIGAIRDATE, " |
971 | 984 | " :FINDID, :TRANSCODER, :PLAYGROUP, :RECPRIORITY, " |
972 | 985 | " :BASENAME, :PROGSTART, :PROGEND, :PROFILE, " |
973 | | " 0, :STORGROUP) " |
| 986 | " 0, :STORGROUP, :RECINPUT)" |
974 | 987 | ); |
975 | 988 | |
976 | 989 | if (pg->rectype == kOverrideRecord) |
… |
… |
bool RecordingInfo::InsertProgram(const RecordingInfo *pg, |
1004 | 1017 | query.bindValue(":TRANSCODER", rule->m_transcoder); |
1005 | 1018 | query.bindValue(":PLAYGROUP", pg->playgroup); |
1006 | 1019 | query.bindValue(":RECPRIORITY", rule->m_recPriority); |
| 1020 | query.bindValue(":RECINPUT", null_to_empty(pg->recinput)); |
1007 | 1021 | query.bindValue(":BASENAME", pg->pathname); |
1008 | 1022 | query.bindValue(":STORGROUP", null_to_empty(pg->storagegroup)); |
1009 | 1023 | query.bindValue(":PROGSTART", pg->startts); |
-
diff --git a/mythtv/libs/libmythtv/recordinginfo.h b/mythtv/libs/libmythtv/recordinginfo.h
index 2cc8cd4..6c19705 100644
a
|
b
|
class MTV_PUBLIC RecordingInfo : public ProgramInfo |
272 | 272 | QDateTime desiredrecstartts; |
273 | 273 | QDateTime desiredrecendts; |
274 | 274 | |
| 275 | void SetInputID(uint id); |
| 276 | |
275 | 277 | private: |
276 | 278 | mutable class RecordingRule *record; |
277 | 279 | |
-
diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp
index 2c943c6..e5bfdf3 100644
a
|
b
|
class InputDisplayName : public LineEditSetting, public CardInputDBStorage |
2561 | 2561 | { |
2562 | 2562 | setLabel(QObject::tr("Display name (optional)")); |
2563 | 2563 | setHelpText(QObject::tr( |
2564 | | "This name is displayed on screen when Live TV begins " |
2565 | | "and when changing the selected input or card. If you " |
2566 | | "use this, make sure the information is unique for " |
2567 | | "each input.")); |
| 2564 | "This name is displayed on screen when Live TV begins, " |
| 2565 | "when changing the selected input or card, and on a " |
| 2566 | "recording's info dialog. If you use this, make sure " |
| 2567 | "the information is unique for each input.")); |
2568 | 2568 | }; |
2569 | 2569 | }; |
2570 | 2570 | |
-
diff --git a/mythtv/programs/mythbackend/services/serviceUtil.cpp b/mythtv/programs/mythbackend/services/serviceUtil.cpp
index 0c5e0c8..74890cf 100644
a
|
b
|
void FillProgramInfo( DTC::Program *pProgram, |
133 | 133 | pProgram->Channel()->SourceId()); |
134 | 134 | pRecording->setEncoderName( encoderName ); |
135 | 135 | } |
| 136 | pRecording->setInputName ( pInfo->GetRecInput() ); |
136 | 137 | |
137 | 138 | const RecordingInfo ri(*pInfo); |
138 | 139 | pRecording->setProfile( ri.GetProgramRecordingProfile() ); |
-
diff --git a/mythtv/programs/mythfrontend/progdetails.cpp b/mythtv/programs/mythfrontend/progdetails.cpp
index fcff565..a1f72ad 100644
a
|
b
|
void ProgDetails::loadPage(void) |
664 | 664 | addItem("FINDID", tr("Find ID"), s); |
665 | 665 | |
666 | 666 | QString recordingHost; |
| 667 | QString recordingInput; |
667 | 668 | QString recordedFilename; |
668 | 669 | QString recordedFileSize; |
669 | 670 | QString recordingGroup; |
… |
… |
void ProgDetails::loadPage(void) |
674 | 675 | if (recorded) |
675 | 676 | { |
676 | 677 | recordingHost = m_progInfo.GetHostname(); |
| 678 | recordingInput = m_progInfo.GetRecInput(); |
677 | 679 | recordedFilename = m_progInfo.GetBasename(); |
678 | 680 | recordedFileSize = QString("%1 ") |
679 | 681 | .arg(m_progInfo.GetFilesize()/((double)(1<<30)),0,'f',2); |
… |
… |
void ProgDetails::loadPage(void) |
698 | 700 | recordingProfile = record->m_recProfile; |
699 | 701 | } |
700 | 702 | addItem("RECORDING_HOST", tr("Recording Host"), recordingHost); |
| 703 | addItem("RECORDING_INPUT", tr("Recording Input"), recordingInput); |
701 | 704 | addItem("RECORDED_FILE_NAME", tr("Recorded File Name"), recordedFilename); |
702 | 705 | addItem("RECORDED_FILE_SIZE", tr("Recorded File Size"), recordedFileSize); |
703 | 706 | addItem("RECORDING_PROFILE", tr("Recording Profile"), recordingProfile); |
-
diff --git a/mythtv/themes/MythCenter-wide/htmls/progdetails_page2.html b/mythtv/themes/MythCenter-wide/htmls/progdetails_page2.html
index 499bfb5..fdb9cf9 100644
a
|
b
|
|
36 | 36 | <h1>%SEARCH_PHRASE_LABEL%</h1> <p>%SEARCH_PHRASE%</p> |
37 | 37 | <h1>%FINDID_LABEL%</h1> <p>%FINDID%</p> |
38 | 38 | <h1>%RECORDING_HOST_LABEL%</h1> <p>%RECORDING_HOST%</p> |
| 39 | <h1>%RECORDING_INPUT_LABEL%</h1> <p>%RECORDING_INPUT%</p> |
39 | 40 | <h1>%RECORDED_FILE_NAME_LABEL%</h1> <p>%RECORDED_FILE_NAME%</p> |
40 | 41 | <h1>%RECORDED_FILE_SIZE_LABEL%</h1> <p>%RECORDED_FILE_SIZE%</p> |
41 | 42 | <h1>%RECORDING_PROFILE_LABEL%</h1> <p>%RECORDING_PROFILE%</p> |
-
diff --git a/mythtv/themes/MythCenter/htmls/progdetails_page2.html b/mythtv/themes/MythCenter/htmls/progdetails_page2.html
index 3619729..cf36332 100644
a
|
b
|
|
38 | 38 | <h1>%SEARCH_PHRASE_LABEL%</h1> <p>%SEARCH_PHRASE%</p> |
39 | 39 | <h1>%FINDID_LABEL%</h1> <p>%FINDID%</p> |
40 | 40 | <h1>%RECORDING_HOST_LABEL%</h1> <p>%RECORDING_HOST%</p> |
| 41 | <h1>%RECORDING_INPUT_LABEL%</h1> <p>%RECORDING_INPUT%</p> |
41 | 42 | <h1>%RECORDED_FILE_NAME_LABEL%</h1> <p>%RECORDED_FILE_NAME%</p> |
42 | 43 | <h1>%RECORDED_FILE_SIZE_LABEL%</h1> <p>%RECORDED_FILE_SIZE%</p> |
43 | 44 | <h1>%RECORDING_PROFILE_LABEL%</h1> <p>%RECORDING_PROFILE%</p> |
-
diff --git a/mythtv/themes/Terra/htmls/progdetails_page2.html b/mythtv/themes/Terra/htmls/progdetails_page2.html
index 243d041..a1426d6 100644
a
|
b
|
|
41 | 41 | <h1>%SEARCH_PHRASE_LABEL%</h1> <p>%SEARCH_PHRASE%</p> |
42 | 42 | <h1>%FINDID_LABEL%</h1> <p>%FINDID%</p> |
43 | 43 | <h1>%RECORDING_HOST_LABEL%</h1> <p>%RECORDING_HOST%</p> |
| 44 | <h1>%RECORDING_INPUT_LABEL%</h1> <p>%RECORDING_INPUT%</p> |
44 | 45 | <h1>%RECORDED_FILE_NAME_LABEL%</h1> <p>%RECORDED_FILE_NAME%</p> |
45 | 46 | <h1>%RECORDED_FILE_SIZE_LABEL%</h1> <p>%RECORDED_FILE_SIZE%</p> |
46 | 47 | <h1>%RECORDING_PROFILE_LABEL%</h1> <p>%RECORDING_PROFILE%</p> |
-
diff --git a/mythtv/themes/default/htmls/progdetails_page2.html b/mythtv/themes/default/htmls/progdetails_page2.html
index 900fd31..40fb94b 100644
a
|
b
|
|
38 | 38 | <h1>%SEARCH_PHRASE_LABEL%</h1> <p>%SEARCH_PHRASE%</p> |
39 | 39 | <h1>%FINDID_LABEL%</h1> <p>%FINDID%</p> |
40 | 40 | <h1>%RECORDING_HOST_LABEL%</h1> <p>%RECORDING_HOST%</p> |
| 41 | <h1>%RECORDING_INPUT_LABEL%</h1> <p>%RECORDING_INPUT%</p> |
41 | 42 | <h1>%RECORDED_FILE_NAME_LABEL%</h1> <p>%RECORDED_FILE_NAME%</p> |
42 | 43 | <h1>%RECORDED_FILE_SIZE_LABEL%</h1> <p>%RECORDED_FILE_SIZE%</p> |
43 | 44 | <h1>%RECORDING_PROFILE_LABEL%</h1> <p>%RECORDING_PROFILE%</p> |