Ticket #8777: dish_descriptors4.diff
File dish_descriptors4.diff, 7.0 KB (added by , 14 years ago) |
---|
-
libs/libmythtv/programdata.cpp
@@ -410,8 +482,17 @@ subtitle_type, audio_props, video_props, + stars, seriesId, programId); + if (!rating.isEmpty() && !rating_system.isEmpty()) + { + EventRating event_rating; + event_rating.system = rating_system; + event_rating.rating = rating; + event->ratings.append(event_rating); + } + db_events.enqueue(event); } } @@ -516,6 +597,7 @@ subtitle_type, audio_props, video_props, + 0.0, "", ""); db_events.enqueue(event);
177 177 seriesId = other.seriesId; 178 178 programId = other.programId; 179 179 previouslyshown = other.previouslyshown; 180 ratings = other.ratings; 180 181 181 182 Squeeze(); 182 183 … … 272 273 " partnumber, parttotal, " 273 274 " syndicatedepisodenumber, " 274 275 " airdate, originalairdate, " 275 " previouslyshown,listingsource " 276 " previouslyshown,listingsource, " 277 " stars+0 " 276 278 "FROM program " 277 279 "WHERE chanid = :CHANID AND " 278 280 " manualid = 0 AND " … … 305 307 query.value(7).toUInt(), 306 308 query.value(8).toUInt(), 307 309 query.value(9).toUInt(), 310 query.value(19).toDouble(), 308 311 query.value(10).toString(), 309 312 query.value(11).toString(), 310 313 query.value(18).toUInt()); … … 705 708 " starttime, endtime, " 706 709 " closecaptioned, stereo, hdtv, subtitled, " 707 710 " subtitletypes, audioprop, videoprop, " 708 " partnumber, parttotal, "711 " stars, partnumber, parttotal, " 709 712 " syndicatedepisodenumber, " 710 713 " airdate, originalairdate,listingsource, " 711 714 " seriesid, programid, previouslyshown ) " … … 715 718 " :STARTTIME, :ENDTIME, " 716 719 " :CC, :STEREO, :HDTV, :HASSUBTITLES, " 717 720 " :SUBTYPES, :AUDIOPROP, :VIDEOPROP, " 718 " : PARTNUMBER, :PARTTOTAL, "721 " :STARS, :PARTNUMBER, :PARTTOTAL, " 719 722 " :SYNDICATENO, " 720 723 " :AIRDATE, :ORIGAIRDATE, :LSOURCE, " 721 724 " :SERIESID, :PROGRAMID, :PREVSHOWN) "); … … 737 740 query.bindValue(":SUBTYPES", subtitleType); 738 741 query.bindValue(":AUDIOPROP", audioProps); 739 742 query.bindValue(":VIDEOPROP", videoProps); 743 query.bindValue(":STARS", stars); 740 744 query.bindValue(":PARTNUMBER", partnumber); 741 745 query.bindValue(":PARTTOTAL", parttotal); 742 746 query.bindValue(":SYNDICATENO", syndicatedepisodenumber); … … 784 788 colorcode = other.colorcode; 785 789 clumpidx = other.clumpidx; 786 790 clumpmax = other.clumpmax; 787 ratings = other.ratings;788 791 789 792 squeeze_str(channel); 790 793 squeeze_str(startts); … … 888 891 return 0; 889 892 } 890 893 891 QList< ProgRating>::const_iterator j = ratings.begin();894 QList<EventRating>::const_iterator j = ratings.begin(); 892 895 for (; j != ratings.end(); ++j) 893 896 { 894 897 query.prepare( -
libs/libmythtv/programdata.h
60 60 }; 61 61 typedef vector<DBPerson> DBCredits; 62 62 63 class MPUBLIC EventRating 64 { 65 public: 66 QString system; 67 QString rating; 68 }; 69 63 70 class MPUBLIC DBEvent 64 71 { 65 72 public: … … 77 84 subtitleType(0), 78 85 audioProps(0), 79 86 videoProps(0), 87 stars(0.0), 80 88 categoryType(0/*kCategoryNone*/), 81 89 seriesId(QString::null), 82 90 programId(QString::null), … … 90 98 unsigned char _subtitleType, 91 99 unsigned char _audioProps, 92 100 unsigned char _videoProps, 101 float _stars, 93 102 const QString &_seriesId, const QString &_programId, 94 103 uint32_t _listingsource) : 95 104 title(_title), subtitle(_subtitle), … … 102 111 syndicatedepisodenumber(QString("")), 103 112 subtitleType(_subtitleType), 104 113 audioProps(_audioProps), videoProps(_videoProps), 114 stars(_stars), 105 115 categoryType(_category_type), 106 116 seriesId(_seriesId), 107 117 programId(_programId), … … 152 162 unsigned char subtitleType; 153 163 unsigned char audioProps; 154 164 unsigned char videoProps; 165 float stars; 155 166 unsigned char categoryType; 156 167 QString seriesId; 157 168 QString programId; 158 169 bool previouslyshown; 159 170 uint32_t listingsource; 171 QList<EventRating> ratings; 160 172 }; 161 173 162 174 class MPUBLIC DBEventEIT : public DBEvent … … 171 183 unsigned char _subtitleType, 172 184 unsigned char _audioProps, 173 185 unsigned char _videoProps, 186 float _stars, 174 187 const QString &_seriesId, const QString &_programId) : 175 188 DBEvent(_title, _subtitle, _desc, _category, _category_type, 176 189 _start, _end, _subtitleType, _audioProps, _videoProps, 177 _s eriesId, _programId, kListingSourceEIT),190 _stars, _seriesId, _programId, kListingSourceEIT), 178 191 chanid(_chanid), fixup(_fixup) 179 192 { 180 193 } … … 188 201 unsigned char _videoProps) : 189 202 DBEvent(_title, QString(""), _desc, QString(""), 0/*kCategoryNone*/, 190 203 _start, _end, _subtitleType, _audioProps, _videoProps, 191 QString(""), QString(""), kListingSourceEIT),204 0.0, QString(""), QString(""), kListingSourceEIT), 192 205 chanid(_chanid), fixup(_fixup) 193 206 { 194 207 } … … 203 216 uint32_t fixup; 204 217 }; 205 218 206 class MPUBLIC ProgRating207 {208 public:209 QString system;210 QString rating;211 };212 213 219 class MPUBLIC ProgInfo : public DBEvent 214 220 { 215 221 public: … … 245 251 QString colorcode; 246 252 QString clumpidx; 247 253 QString clumpmax; 248 QList<ProgRating> ratings;249 254 }; 250 255 251 256 class MPUBLIC ProgramData -
programs/mythfilldatabase/xmltvparser.cpp
403 403 QDomElement item = values.item(0).toElement(); 404 404 if (item.isNull()) 405 405 continue; 406 ProgRating rating;406 EventRating rating; 407 407 rating.system = info.attribute("system", ""); 408 408 rating.rating = getFirstText(item); 409 409 pginfo->ratings.append(rating);