diff --git a/cdiscover.cpp b/cdiscover.cpp index d93b565..6f25e09 100644 --- a/cdiscover.cpp +++ b/cdiscover.cpp @@ -28,7 +28,7 @@ cDiscover::cDiscover(const cSerieList serieList, QWidget *parent) : m_lpSeriesModel = new QStandardItemModel(0, 1); ui->m_lpSeries->setModel(m_lpSeriesModel); - headerLabels = QStringList() << tr("Title") << tr("Year"); + headerLabels = QStringList() << tr("Title") << tr("Year") << tr("Voting"); m_lpSeriesModel->setHorizontalHeaderLabels(headerLabels); connect(ui->m_lpVoting, &QxtSpanSlider::spanChanged, this, &cDiscover::spanChanged); @@ -93,7 +93,7 @@ void cDiscover::on_m_lpDiscover_clicked() m_lpSeriesModel->clear(); - QStringList headerLabels = QStringList() << tr("Title") << tr("Year"); + QStringList headerLabels = QStringList() << tr("Title") << tr("Year") << tr("Voting"); m_lpSeriesModel->setHorizontalHeaderLabels(headerLabels); for(int x = 0; x < serieList.count();x++) @@ -106,8 +106,10 @@ void cDiscover::on_m_lpDiscover_clicked() items.append(new QStandardItem(lpSerie->seriesName())); items.append(new QStandardItem(QString::number(lpSerie->firstAired().year()))); + items.append(new QStandardItem(QString::number(lpSerie->voteAverage()))); items[0]->setData(QVariant::fromValue(lpSerie)); items[1]->setData(QVariant::fromValue(lpSerie)); + items[2]->setData(QVariant::fromValue(lpSerie)); items[0]->setCheckable(true); m_lpSeriesModel->appendRow(items); diff --git a/cmoviedetails.cpp b/cmoviedetails.cpp index 3b25614..bdc0d28 100644 --- a/cmoviedetails.cpp +++ b/cmoviedetails.cpp @@ -31,8 +31,9 @@ void cMovieDetails::setMovie(cMovie* lpMovie) { ui->m_lpName->setText(lpMovie->movieTitle()); ui->m_lpFirstAired->setDate(lpMovie->releaseDate()); + ui->m_lpVoting->setText(QString::number(lpMovie->voteAverage())); - ui->m_lpDetailsBanner->clear(); + ui->m_lpDetailsBanner->clear(); if(!lpMovie->backdropPath().isEmpty()) { cMovieImage image; diff --git a/cmoviedetails.ui b/cmoviedetails.ui index aaa627b..e55c78f 100644 --- a/cmoviedetails.ui +++ b/cmoviedetails.ui @@ -15,7 +15,7 @@ - + @@ -43,6 +43,37 @@ + + + + + + Voting: + + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + diff --git a/cmoviediscover.cpp b/cmoviediscover.cpp index e460236..d224df9 100644 --- a/cmoviediscover.cpp +++ b/cmoviediscover.cpp @@ -28,7 +28,7 @@ cMovieDiscover::cMovieDiscover(const cMovieList movieList, QWidget *parent) : m_lpMoviesModel = new QStandardItemModel(0, 1); ui->m_lpMovies->setModel(m_lpMoviesModel); - headerLabels = QStringList() << tr("Title") << tr("Year"); + headerLabels = QStringList() << tr("Title") << tr("Year") << tr("Voting"); m_lpMoviesModel->setHorizontalHeaderLabels(headerLabels); connect(ui->m_lpVoting, &QxtSpanSlider::spanChanged, this, &cMovieDiscover::spanChanged); @@ -94,7 +94,7 @@ void cMovieDiscover::on_m_lpDiscover_clicked() m_lpMoviesModel->clear(); - QStringList headerLabels = QStringList() << tr("Title") << tr("Year"); + QStringList headerLabels = QStringList() << tr("Title") << tr("Year") << tr("Voting"); m_lpMoviesModel->setHorizontalHeaderLabels(headerLabels); for(int x = 0; x < movieList.count();x++) @@ -107,8 +107,10 @@ void cMovieDiscover::on_m_lpDiscover_clicked() items.append(new QStandardItem(lpMovie->movieTitle())); items.append(new QStandardItem(QString::number(lpMovie->releaseDate().year()))); + items.append(new QStandardItem(QString::number(lpMovie->voteAverage()))); items[0]->setData(QVariant::fromValue(lpMovie)); items[1]->setData(QVariant::fromValue(lpMovie)); + items[2]->setData(QVariant::fromValue(lpMovie)); items[0]->setCheckable(true); m_lpMoviesModel->appendRow(items); diff --git a/cseriedetails.cpp b/cseriedetails.cpp index a9b9b96..ca8fe7b 100644 --- a/cseriedetails.cpp +++ b/cseriedetails.cpp @@ -15,7 +15,7 @@ cSerieDetails::cSerieDetails(QWidget *parent) : m_lpActorsModel = new QStandardItemModel(0, 0); ui->m_lpDetailsActors->setModel(m_lpActorsModel); - m_lpGenreModel = new QStandardItemModel(0, 9); + m_lpGenreModel = new QStandardItemModel(0, 0); ui->m_lpDetailsGenre->setModel(m_lpGenreModel); } @@ -31,6 +31,7 @@ void cSerieDetails::setSerie(cSerie* lpSerie) { ui->m_lpName->setText(lpSerie->seriesName()); ui->m_lpFirstAired->setDate(lpSerie->firstAired()); + ui->m_lpVoting->setText(QString::number(lpSerie->voteAverage())); ui->m_lpDetailsBanner->clear(); if(!lpSerie->backdropPath().isEmpty()) diff --git a/cseriedetails.ui b/cseriedetails.ui index 77e6b14..5b06335 100644 --- a/cseriedetails.ui +++ b/cseriedetails.ui @@ -15,7 +15,7 @@ - + @@ -43,6 +43,37 @@ + + + + + + Voting: + + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + diff --git a/ctheaudiodbv1.cpp b/ctheaudiodbv1.cpp index b1e7933..a8129e3 100644 --- a/ctheaudiodbv1.cpp +++ b/ctheaudiodbv1.cpp @@ -28,7 +28,7 @@ QList cTheAudioDBV1::searchArtist(const QString& szArtist) QNetworkAccessManager networkManager; // QString szRequest = QString("theaudiodb.com/api/v1/json/%1/search.php?s=%2").arg(m_szToken).arg(szArtist); - QNetworkRequest request(QUrl(QString("theaudiodb.com/api/v1/json/%1/search.php?s=%2").arg(m_szToken).arg(szArtist))); + QNetworkRequest request(QUrl(QString("https://www.theaudiodb.com/api/v1/json/%1/search.php?s=%2").arg(m_szToken).arg(szArtist))); QNetworkReply* reply = networkManager.get(request); QEventLoop loop;