diff -urp ../../mythplugins-orig/mythvideo/mythvideo/dbcheck.cpp ./mythvideo/dbcheck.cpp
old
|
new
|
namespace |
12 | 12 | const QString lastMythDVDDBVersion = "1002"; |
13 | 13 | const QString lastMythVideoVersion = "1010"; |
14 | 14 | |
15 | | const QString currentDatabaseVersion = "1012"; |
| 15 | const QString currentDatabaseVersion = "1013"; |
16 | 16 | |
17 | 17 | const QString OldMythVideoVersionName = "VideoDBSchemaVer"; |
18 | 18 | const QString OldMythDVDVersionName = "DVDDBSchemaVer"; |
… |
… |
namespace |
594 | 594 | }; |
595 | 595 | performActualUpdate(updates, "1012", dbver, MythVideoVersionName); |
596 | 596 | } |
| 597 | |
| 598 | if (dbver == "1012") |
| 599 | { |
| 600 | const QString updates[] = { |
| 601 | "ALTER TABLE videometadata ADD cast TEXT;", |
| 602 | "" |
| 603 | }; |
| 604 | performActualUpdate(updates, "1013", dbver, MythVideoVersionName); |
| 605 | |
| 606 | } |
597 | 607 | } |
598 | 608 | } |
599 | 609 | |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/globals.cpp ./mythvideo/globals.cpp
old
|
new
|
const QString VIDEO_GENRE_UNKNOWN = QObj |
9 | 9 | const QString VIDEO_COUNTRY_UNKNOWN = QObject::tr("Unknown"); |
10 | 10 | const QString VIDEO_YEAR_UNKNOWN = QObject::tr("Unknown"); |
11 | 11 | const QString VIDEO_RUNTIME_UNKNOWN = QObject::tr("Unknown"); |
| 12 | const QString VIDEO_CAST_UNKNOWN = QObject::tr("Unknown"); |
12 | 13 | |
13 | 14 | const QString VIDEO_CATEGORY_DEFAULT = VIDEO_CATEGORY_UNKNOWN; |
14 | 15 | const QString VIDEO_DIRECTOR_DEFAULT = VIDEO_DIRECTOR_UNKNOWN; |
… |
… |
const QString VIDEO_INETREF_DEFAULT = "0 |
16 | 17 | const QString VIDEO_COVERFILE_DEFAULT = QObject::tr("No Cover"); |
17 | 18 | const QString VIDEO_RATING_DEFAULT = QObject::tr("NR"); |
18 | 19 | const QString VIDEO_PLOT_DEFAULT = QObject::tr("None"); |
| 20 | const QString VIDEO_CAST_DEFAULT = VIDEO_CAST_UNKNOWN; |
19 | 21 | |
20 | 22 | const QString JUMP_VIDEO_MANAGER = "Video Manager"; |
21 | 23 | const QString JUMP_VIDEO_BROWSER = "Video Browser"; |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/globals.h ./mythvideo/globals.h
old
|
new
|
extern const QString VIDEO_INETREF_DEFAU |
14 | 14 | extern const QString VIDEO_COVERFILE_DEFAULT; |
15 | 15 | extern const QString VIDEO_RATING_DEFAULT; |
16 | 16 | extern const QString VIDEO_PLOT_DEFAULT; |
| 17 | extern const QString VIDEO_CAST_DEFAULT; |
17 | 18 | |
18 | 19 | extern const QString JUMP_VIDEO_MANAGER; |
19 | 20 | extern const QString JUMP_VIDEO_BROWSER; |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/metadata.cpp ./mythvideo/metadata.cpp
old
|
new
|
class MetadataImp |
30 | 30 | int childID, bool browse, |
31 | 31 | const QString &playcommand, const QString &category, |
32 | 32 | const genre_list &genres, |
33 | | const country_list &countries) : |
| 33 | const country_list &countries, const QString &cast) : |
34 | 34 | m_title(title), |
35 | 35 | m_inetref(inetref), m_director(director), m_plot(plot), |
36 | 36 | m_rating(rating), m_playcommand(playcommand), m_category(category), |
37 | | m_genres(genres), m_countries(countries), |
| 37 | m_genres(genres), m_countries(countries), m_cast(cast), |
38 | 38 | m_filename(filename), m_coverfile(coverfile), |
39 | 39 | m_categoryID(categoryID), m_childID(childID), m_year(year), |
40 | 40 | m_length(length), m_showlevel(showlevel), m_browse(browse), m_id(id), |
… |
… |
class MetadataImp |
61 | 61 | m_title = rhs.m_title; |
62 | 62 | m_inetref = rhs.m_inetref; |
63 | 63 | m_director = rhs.m_director; |
| 64 | m_cast = rhs.m_cast; |
64 | 65 | m_plot = rhs.m_plot; |
65 | 66 | m_rating = rhs.m_rating; |
66 | 67 | m_playcommand = rhs.m_playcommand; |
… |
… |
class MetadataImp |
114 | 115 | const QString &getDirector() const { return m_director; } |
115 | 116 | void setDirector(const QString &director) { m_director = director; } |
116 | 117 | |
| 118 | const QString &getCast() const { return m_cast; } |
| 119 | void setCast(const QString &cast) { m_cast = cast; } |
| 120 | |
117 | 121 | const QString &getPlot() const { return m_plot; } |
118 | 122 | void setPlot(const QString &plot) { m_plot = plot; } |
119 | 123 | |
… |
… |
class MetadataImp |
213 | 217 | QString m_category; |
214 | 218 | genre_list m_genres; |
215 | 219 | country_list m_countries; |
| 220 | QString m_cast; |
216 | 221 | QString m_filename; |
217 | 222 | QString m_coverfile; |
218 | 223 | |
… |
… |
void MetadataImp::fromDBRow(MSqlQuery &q |
377 | 382 | m_browse = query.value(12).toBool(); |
378 | 383 | m_playcommand = query.value(13).toString(); |
379 | 384 | m_categoryID = query.value(14).toInt(); |
380 | | m_id = query.value(15).toInt(); |
| 385 | m_cast = QString::fromUtf8(query.value(15).toString()); |
| 386 | m_id = query.value(16).toInt(); |
381 | 387 | |
382 | 388 | VideoCategory::getCategory().get(m_categoryID, m_category); |
383 | 389 | |
… |
… |
void MetadataImp::saveToDatabase() |
394 | 400 | m_title = Metadata::FilenameToTitle(m_filename); |
395 | 401 | if (m_director == "") |
396 | 402 | m_director = VIDEO_DIRECTOR_UNKNOWN; |
| 403 | if (m_cast == "") |
| 404 | m_cast = VIDEO_CAST_DEFAULT; |
397 | 405 | if (m_plot == "") |
398 | 406 | m_plot = VIDEO_PLOT_DEFAULT; |
399 | 407 | if (m_rating == "") |
… |
… |
void MetadataImp::saveToDatabase() |
431 | 439 | "showlevel = :SHOWLEVEL, coverfile = :COVERFILE, " |
432 | 440 | "inetref = :INETREF, browse = :BROWSE, " |
433 | 441 | "playcommand = :PLAYCOMMAND, childid = :CHILDID, " |
434 | | "category = :CATEGORY WHERE intid = :INTID"); |
| 442 | "category = :CATEGORY, cast = :CAST WHERE intid = :INTID"); |
435 | 443 | |
436 | 444 | query.bindValue(":PLAYCOMMAND", m_playcommand.utf8()); |
437 | 445 | query.bindValue(":CHILDID", m_childID); |
… |
… |
void MetadataImp::saveToDatabase() |
441 | 449 | |
442 | 450 | query.bindValue(":TITLE", m_title.utf8()); |
443 | 451 | query.bindValue(":DIRECTOR", m_director.utf8()); |
| 452 | query.bindValue(":CAST", m_cast.utf8()); |
444 | 453 | query.bindValue(":PLOT", m_plot.utf8()); |
445 | 454 | query.bindValue(":RATING", m_rating.utf8()); |
446 | 455 | query.bindValue(":YEAR", m_year); |
… |
… |
Metadata::Metadata(const QString &filena |
768 | 777 | int childID, bool browse, |
769 | 778 | const QString &playcommand, const QString &category, |
770 | 779 | const genre_list &genres, |
771 | | const country_list &countries) |
| 780 | const country_list &countries, const QString &cast) |
772 | 781 | { |
773 | 782 | m_imp = new MetadataImp(filename, coverfile, title, year, inetref, director, |
774 | 783 | plot, userrating, rating, length, id, showlevel, |
775 | 784 | categoryID, childID, browse, playcommand, category, |
776 | | genres, countries); |
| 785 | genres, countries, cast); |
777 | 786 | } |
778 | 787 | |
779 | 788 | Metadata::~Metadata() |
… |
… |
void Metadata::setDirector(const QString |
877 | 886 | m_imp->setDirector(director); |
878 | 887 | } |
879 | 888 | |
| 889 | const QString &Metadata::Cast() const |
| 890 | { |
| 891 | return m_imp->getCast(); |
| 892 | } |
| 893 | |
| 894 | void Metadata::setCast(const QString &cast) |
| 895 | { |
| 896 | m_imp->setCast(cast); |
| 897 | } |
| 898 | |
880 | 899 | const QString &Metadata::Plot() const |
881 | 900 | { |
882 | 901 | return m_imp->getPlot(); |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/metadata.h ./mythvideo/metadata.h
old
|
new
|
class Metadata |
40 | 40 | int childID = -1, bool browse = true, |
41 | 41 | const QString &playcommand = "", const QString &category = "", |
42 | 42 | const genre_list &genres = genre_list(), |
43 | | const country_list &countries = country_list()); |
| 43 | const country_list &countries = country_list(), |
| 44 | const QString &cast = ""); |
44 | 45 | ~Metadata(); |
45 | 46 | Metadata(MSqlQuery &query); |
46 | 47 | Metadata(const Metadata &rhs); |
… |
… |
class Metadata |
117 | 118 | int getCategoryID() const; |
118 | 119 | void setCategoryID(int id); |
119 | 120 | |
| 121 | const QString &Cast() const; |
| 122 | void setCast(const QString &cast); |
| 123 | |
120 | 124 | void dumpToDatabase(); |
121 | 125 | void updateDatabase(); |
122 | 126 | // bool fillDataFromID(const MetadataListManager &cache); |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/metadatalistmanager.cpp ./mythvideo/metadatalistmanager.cpp
old
|
new
|
void MetadataListManager::loadAllFromDat |
116 | 116 | const QString BaseMetadataQuery( |
117 | 117 | "SELECT title, director, plot, rating, year, userrating," |
118 | 118 | "length, filename, showlevel, coverfile, inetref, childid," |
119 | | "browse, playcommand, category, intid FROM videometadata"); |
| 119 | "browse, playcommand, category, cast, intid FROM videometadata"); |
120 | 120 | |
121 | 121 | query.prepare(BaseMetadataQuery); |
122 | 122 | |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/scripts/imdb.pl ./mythvideo/scripts/imdb.pl
old
|
new
|
sub getMovieData { |
195 | 195 | "/table>"); |
196 | 196 | if ($data) { |
197 | 197 | $cast = join(',', ($data =~ m/$name_link_pat/g)); |
| 198 | $cast = trim($cast); |
198 | 199 | } |
199 | 200 | |
200 | 201 | |
… |
… |
sub getMovieData { |
220 | 221 | print "MovieRating:$movierating\n"; |
221 | 222 | print "Runtime:$runtime\n"; |
222 | 223 | print "Writers: $writer\n"; |
223 | | print "Cast: $cast\n"; |
| 224 | print "Cast:$cast\n"; |
224 | 225 | print "Genres: $lgenres\n"; |
225 | 226 | print "Countries: $lcountries\n"; |
226 | 227 | } |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/scripts/imdbpy.py ./mythvideo/scripts/imdbpy.py
old
|
new
|
class VideoMetadata: |
194 | 194 | year = None |
195 | 195 | directors = None |
196 | 196 | plot = None |
| 197 | cast = None |
197 | 198 | rating = None |
198 | 199 | mpaa_rating = None |
199 | 200 | genres = None |
… |
… |
class VideoMetadata: |
232 | 233 | if self.directors is not None and len(self.directors) > 0: |
233 | 234 | metadata += createMetadataLine("Director", unicode(self.directors[0])) |
234 | 235 | metadata += createMetadataLine("Plot", self.plot) |
| 236 | metadata += createMetadataLine("Cast", self.cast) |
235 | 237 | metadata += createMetadataLine('UserRating', self.rating) |
236 | 238 | metadata += createMetadataLine('MovieRating', self.mpaa_rating) |
237 | 239 | metadata += createMetadataLine('Genres', self.genres) |
… |
… |
def fetch_metadata(imdb_id): |
252 | 254 | |
253 | 255 | imdb_access = imdb.IMDb() |
254 | 256 | movie = imdb_access.get_movie(imdb_id) |
| 257 | |
255 | 258 | imdb_access.update(movie) |
256 | 259 | |
257 | 260 | def metadataFromField(key, default=None, m=movie): |
… |
… |
def fetch_metadata(imdb_id): |
325 | 328 | if shortest_found == None or len(text) < len(shortest_found): |
326 | 329 | shortest_found = text |
327 | 330 | metadata.plot = shortest_found |
| 331 | |
| 332 | cast = movie.get('cast') |
| 333 | cast_str = "" |
| 334 | if cast is not None: |
| 335 | i = 0 |
| 336 | for name in cast: |
| 337 | if i is not 10: |
| 338 | cast_str+=name['name']+"," |
| 339 | i+=1 |
328 | 340 | |
| 341 | cast_str = cast_str[0:-1] |
| 342 | |
| 343 | metadata.cast = cast_str |
329 | 344 | metadata.rating = metadataFromField('rating', metadata.rating) |
330 | 345 | metadata.mpaa_rating = metadataFromField('mpaa', metadata.mpaa_rating) |
331 | 346 | metadata.runtime = metadataFromFirst('runtimes', metadata.runtime) |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/scripts/MythTV.py ./mythvideo/scripts/MythTV.py
old
|
new
|
class MythDB: |
78 | 78 | if token == "DBHostName": |
79 | 79 | if config.get_token() == "=": |
80 | 80 | db_host = config.get_token() |
| 81 | |
| 82 | if config.get_token() == '.': |
| 83 | db_host += '.' + config.get_token() |
| 84 | if config.get_token() == '.': |
| 85 | db_host += '.' + config.get_token() |
| 86 | if config.get_token() == '.': |
| 87 | db_host += '.' + config.get_token() |
81 | 88 | elif token == "DBUserName": |
82 | 89 | if config.get_token() == "=": |
83 | 90 | db_user = config.get_token() |
… |
… |
class MythDB: |
92 | 99 | |
93 | 100 | if not found_config: |
94 | 101 | raise "Unable to find MythTV configuration file" |
| 102 | |
95 | 103 | self.db = MySQLdb.connect(user=db_user, host=db_host, passwd=db_password, db="mythconverg") |
96 | 104 | |
97 | 105 | def getSetting(self, value, hostname=None): |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/videobrowser.cpp ./mythvideo/videobrowser.cpp
old
|
new
|
void VideoBrowser::doMenu(bool info) |
121 | 121 | focusButton = popup->addButton(tr("Watch This Video"), this, |
122 | 122 | SLOT(slotWatchVideo())); |
123 | 123 | popup->addButton(tr("View Full Plot"), this, SLOT(slotViewPlot())); |
| 124 | popup->addButton(tr("View Cast"), this, SLOT(slotViewCast())); |
124 | 125 | } |
125 | 126 | else |
126 | 127 | { |
… |
… |
void VideoBrowser::updateInfo(QPainter * |
310 | 311 | curitem->Director()); |
311 | 312 | checkedSetText((UITextType *)container->GetType("plot"), |
312 | 313 | curitem->Plot()); |
| 314 | checkedSetText((UITextType *)container->GetType("cast"), |
| 315 | curitem->Cast()); |
313 | 316 | checkedSetText((UITextType *)container->GetType("rating"), |
314 | 317 | getDisplayRating(curitem->Rating())); |
315 | 318 | checkedSetText((UITextType *)container->GetType("inetref"), |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/videodlg.cpp ./mythvideo/videodlg.cpp
old
|
new
|
void VideoDialog::slotViewPlot() |
164 | 164 | } |
165 | 165 | } |
166 | 166 | |
| 167 | void VideoDialog::slotViewCast() |
| 168 | { |
| 169 | cancelPopup(); |
| 170 | |
| 171 | if (curitem) |
| 172 | { |
| 173 | QString actors = ""; |
| 174 | QStringList cast = QStringList::split(",", curitem->Cast()); |
| 175 | |
| 176 | if (cast.size() > 0) |
| 177 | { |
| 178 | |
| 179 | QStringList::Iterator it = cast.begin(); |
| 180 | |
| 181 | int num = cast.size(); |
| 182 | |
| 183 | if (num > 10) |
| 184 | num = 10; |
| 185 | |
| 186 | for (int i = 0; i < (num - 1); i++) |
| 187 | { |
| 188 | actors+=*it + "\n"; |
| 189 | |
| 190 | ++it; |
| 191 | } |
| 192 | |
| 193 | actors+=*it; |
| 194 | } |
| 195 | else |
| 196 | { |
| 197 | actors = "None defined"; |
| 198 | } |
| 199 | |
| 200 | allowPaint = false; |
| 201 | MythPopupBox * castbox = new MythPopupBox(gContext->GetMainWindow()); |
| 202 | |
| 203 | QLabel *castLabel = castbox->addLabel(actors, |
| 204 | MythPopupBox::Small,true); |
| 205 | castLabel->setAlignment(Qt::AlignJustify | Qt::WordBreak); |
| 206 | |
| 207 | QButton * okButton = castbox->addButton(tr("Ok")); |
| 208 | okButton->setFocus(); |
| 209 | |
| 210 | castbox->ExecPopup(); |
| 211 | delete castbox; |
| 212 | allowPaint = true; |
| 213 | |
| 214 | } |
| 215 | else |
| 216 | { |
| 217 | VERBOSE(VB_IMPORTANT, QString("no Item to view")); |
| 218 | slotDoCancel(); |
| 219 | } |
| 220 | } |
167 | 221 | |
168 | 222 | void VideoDialog::slotWatchVideo() |
169 | 223 | { |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/videodlg.h ./mythvideo/videodlg.h
old
|
new
|
class VideoDialog : public MythDialog |
38 | 38 | void slotVideoGallery(); |
39 | 39 | void slotVideoBrowser(); |
40 | 40 | void slotViewPlot(); |
| 41 | void slotViewCast(); |
41 | 42 | void slotDoFilter(); |
42 | 43 | void exitWin(); |
43 | 44 | virtual void slotParentalLevelChanged(); |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/videogallery.cpp ./mythvideo/videogallery.cpp
old
|
new
|
void VideoGallery::doMenu(bool info) |
497 | 497 | focusButton = popup->addButton(tr("Watch This Video"), this, |
498 | 498 | SLOT(slotWatchVideo())); |
499 | 499 | popup->addButton(tr("View Full Plot"), this, SLOT(slotViewPlot())); |
| 500 | popup->addButton(tr("View Cast"), this, SLOT(slotViewCast())); |
500 | 501 | popup->addButton(tr("View Details"), this, |
501 | 502 | SLOT(handleVideoSelect())); |
502 | 503 | |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/videomanager.cpp ./mythvideo/videomanager.cpp
old
|
new
|
void VideoManager::GetMovieData(const QS |
638 | 638 | curitem->setYear(data["Year"].toInt()); |
639 | 639 | curitem->setDirector(data["Director"]); |
640 | 640 | curitem->setPlot(data["Plot"]); |
| 641 | curitem->setCast(data["Cast"]); |
641 | 642 | curitem->setUserRating(data["UserRating"].toFloat()); |
642 | 643 | curitem->setRating(data["MovieRating"]); |
643 | 644 | curitem->setLength(data["Runtime"].toInt()); |
… |
… |
void VideoManager::ResetCurrentItem() |
1330 | 1331 | curitem->setYear(VIDEO_YEAR_DEFAULT); |
1331 | 1332 | curitem->setInetRef(VIDEO_INETREF_DEFAULT); |
1332 | 1333 | curitem->setDirector(VIDEO_DIRECTOR_DEFAULT); |
| 1334 | curitem->setCast(VIDEO_CAST_DEFAULT); |
1333 | 1335 | curitem->setPlot(VIDEO_PLOT_DEFAULT); |
1334 | 1336 | curitem->setUserRating(0.0); |
1335 | 1337 | curitem->setRating(VIDEO_RATING_DEFAULT); |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/videoselected.cpp ./mythvideo/videoselected.cpp
old
|
new
|
void VideoSelected::updateInfo(QPainter |
263 | 263 | m_item->Director()); |
264 | 264 | checkedSetText((UITextType *)container->GetType("plot"), |
265 | 265 | m_item->Plot()); |
| 266 | checkedSetText((UITextType *)container->GetType("cast"), |
| 267 | m_item->Cast()); |
266 | 268 | checkedSetText((UITextType *)container->GetType("rating"), |
267 | 269 | getDisplayRating(m_item->Rating())); |
268 | 270 | checkedSetText((UITextType *)container->GetType("inetref"), |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/videotree.cpp ./mythvideo/videotree.cpp
old
|
new
|
class VideoTreeImp |
20 | 20 | UITextType *video_title; |
21 | 21 | UITextType *video_file; |
22 | 22 | UITextType *video_plot; |
| 23 | UITextType *video_cast; |
23 | 24 | UITextType *video_player; |
24 | 25 | UITextType *pl_value; |
25 | 26 | UIImageType *video_poster; |
… |
… |
class VideoTreeImp |
42 | 43 | public: |
43 | 44 | VideoTreeImp() : |
44 | 45 | video_tree_list(NULL), video_title(NULL), |
45 | | video_file(NULL), video_plot(NULL), video_player(NULL), |
| 46 | video_file(NULL), video_plot(NULL), video_cast(NULL), video_player(NULL), |
46 | 47 | pl_value(NULL), video_poster(NULL), m_director(NULL), m_rating(NULL), |
47 | 48 | m_inetref(NULL), m_year(NULL), m_userrating(NULL), m_length(NULL), |
48 | 49 | m_coverfile(NULL), m_child_id(NULL), m_browseable(NULL), |
… |
… |
class VideoTreeImp |
87 | 88 | // Optional |
88 | 89 | assign(vt, m_director, "director", false); |
89 | 90 | assign(vt, video_plot, "plot", false); |
| 91 | assign(vt, video_cast, "cast", false); |
90 | 92 | assign(vt, m_rating, "rating", false); |
91 | 93 | assign(vt, m_inetref, "inetref", false); |
92 | 94 | assign(vt, m_year, "year", false); |
… |
… |
class VideoTreeImp |
111 | 113 | |
112 | 114 | checkedSetText(m_director, ""); |
113 | 115 | checkedSetText(video_plot, ""); |
| 116 | checkedSetText(video_cast, ""); |
114 | 117 | checkedSetText(m_rating, ""); |
115 | 118 | checkedSetText(m_inetref, ""); |
116 | 119 | checkedSetText(m_year, ""); |
… |
… |
class VideoTreeImp |
128 | 131 | checkedSetText(video_title, item->Title()); |
129 | 132 | checkedSetText(video_file, item->Filename().section("/", -1)); |
130 | 133 | checkedSetText(video_plot, item->Plot()); |
| 134 | checkedSetText(video_cast, item->Cast()); |
131 | 135 | checkedSetText(video_player, Metadata::getPlayer(item)); |
132 | 136 | |
133 | 137 | if (!isDefaultCoverFile(item->CoverFile())) |
… |
… |
void VideoTree::doMenu(bool info) |
451 | 455 | focusButton = popup->addButton(tr("Watch This Video"), this, |
452 | 456 | SLOT(slotWatchVideo())); |
453 | 457 | popup->addButton(tr("View Full Plot"), this, SLOT(slotViewPlot())); |
| 458 | popup->addButton(tr("View Cast"), this, SLOT(slotViewCast())); |
454 | 459 | } |
455 | 460 | else |
456 | 461 | { |
… |
… |
void VideoTree::slotViewPlot() |
539 | 544 | } |
540 | 545 | } |
541 | 546 | |
| 547 | void VideoTree::slotViewCast() |
| 548 | { |
| 549 | cancelPopup(); |
| 550 | |
| 551 | if (curitem) |
| 552 | { |
| 553 | QString actors = ""; |
| 554 | QStringList cast = QStringList::split(",", curitem->Cast()); |
| 555 | |
| 556 | if (cast.size() > 0) |
| 557 | { |
| 558 | |
| 559 | QStringList::Iterator it = cast.begin(); |
| 560 | |
| 561 | int num = cast.size(); |
| 562 | |
| 563 | if (num > 10) |
| 564 | num = 10; |
| 565 | |
| 566 | for (int i = 0; i < (num - 1); i++) |
| 567 | { |
| 568 | actors+=*it + "\n"; |
| 569 | |
| 570 | ++it; |
| 571 | } |
| 572 | |
| 573 | actors+=*it; |
| 574 | } |
| 575 | else |
| 576 | { |
| 577 | actors = "None defined"; |
| 578 | } |
| 579 | |
| 580 | // allowPaint = false; |
| 581 | MythPopupBox * castbox = new MythPopupBox(gContext->GetMainWindow()); |
| 582 | |
| 583 | QLabel *castLabel = castbox->addLabel(actors, |
| 584 | MythPopupBox::Small,true); |
| 585 | castLabel->setAlignment(Qt::AlignJustify | Qt::WordBreak); |
| 586 | |
| 587 | QButton * okButton = castbox->addButton(tr("Ok")); |
| 588 | okButton->setFocus(); |
| 589 | |
| 590 | castbox->ExecPopup(); |
| 591 | delete castbox; |
| 592 | // allowPaint = true; |
| 593 | |
| 594 | } |
| 595 | else |
| 596 | { |
| 597 | VERBOSE(VB_IMPORTANT, QString("no Item to view")); |
| 598 | slotDoCancel(); |
| 599 | } |
| 600 | } |
| 601 | |
542 | 602 | void VideoTree::slotWatchVideo() |
543 | 603 | { |
544 | 604 | cancelPopup(); |
diff -urp ../../mythplugins-orig/mythvideo/mythvideo/videotree.h ./mythvideo/videotree.h
old
|
new
|
class VideoTree : public MythThemedDialo |
29 | 29 | void slotVideoGallery(); |
30 | 30 | void slotVideoBrowser(); |
31 | 31 | void slotViewPlot(); |
| 32 | void slotViewCast(); |
32 | 33 | void slotDoFilter(); |
33 | 34 | void slotWatchVideo(); |
34 | 35 | |