2 Copyright 2014 Marten Richter
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "wseriesview.h"
26 WSeriesView::WSeriesView(SeriesInfo* series):
29 // portions from nopacity plugin by Louis Braun
32 std::stringstream info;
33 info << tr("TheTVDB Information") << ":\n\n";
35 if (!series->episode.name.empty()) {
36 info << tr("Episode") << ": " << series->episode.name << " (" << tr("Season") << " " << series->episode.season << ", " << tr("Episode") << " " << series->episode.number << ")\n\n";
38 if (!series->episode.overview.empty()) {
39 info << tr("Episode Overview") << ": " << series->episode.overview << "\n\n";
41 if (!series->episode.firstAired.empty()) {
42 info << tr("First aired") << ": " << series->episode.firstAired << "\n\n";
44 if (!series->episode.guestStars.empty()) {
45 info << tr("Guest Stars") << ": " << series->episode.guestStars << "\n\n";
47 if (series->episode.rating > 0) {
48 info << tr("TheMovieDB Rating") << ": " << series->episode.rating << "\n\n";
50 if (!series->overview.empty()) {
51 info << tr("Series Overview") << ": " << series->overview << "\n\n";
53 if (!series->firstAired.empty()) {
54 info << tr("First aired") << ": " << series->firstAired << "\n\n";
56 if (!series->genre.empty()) {
57 info << tr("Genre") << ": " << series->genre << "\n\n";
59 if (!series->network.empty()) {
60 info << tr("Network") << ": " << series->network << "\n\n";
62 if (series->rating > 0) {
63 info << tr("TheMovieDB Rating") << ": " << series->rating << "\n\n";
65 if (!series->status.empty()) {
66 info << tr("Status") << ": " << series->status << "\n\n";
68 setText(info.str().c_str());
70 setText("This is a bug!");