.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "cedit.h"
|
||||
#include "ui_cedit.h"
|
||||
|
||||
#include "cimage.h"
|
||||
#include "cmovieimage.h"
|
||||
#include "cseasondetails.h"
|
||||
#include "cmessageanimatedialog.h"
|
||||
|
||||
@@ -236,26 +236,35 @@ void cEdit::on_m_lpTabWidget_tabBarClicked(int index)
|
||||
{
|
||||
if(!m_bLoaded)
|
||||
{
|
||||
/*
|
||||
cMessageAnimateDialog* lpDialog = new cMessageAnimateDialog(this);
|
||||
lpDialog->setTitle("Edit");
|
||||
lpDialog->setMessage("Loading");
|
||||
lpDialog->show();
|
||||
|
||||
cImage image;
|
||||
QPixmap banner = image.getImage(m_lpSerie->banner());
|
||||
ui->m_lpDetailsBanner->setPixmap(banner);
|
||||
cMovieImage image;
|
||||
QPixmap backdrop = image.getImage(m_lpSerie->backdropPath());
|
||||
//QPalette palette;
|
||||
//palette.setBrush(this->backgroundRole(), QBrush(backdrop.toImage()));
|
||||
//this->setPalette(palette);
|
||||
// ui->m_lpDetailsBackdrop->setPixmap(backdrop);
|
||||
|
||||
ui->m_lpDetailsOverview->setText(m_lpSerie->overview());
|
||||
ui->m_lpDetailsSeasonTab->clear();
|
||||
|
||||
QTreeWidgetItem* lpItem;
|
||||
for(int x = 0;x < m_lpSerie->actors().count();x++)
|
||||
for(int x = 0;x < m_lpSerie->cast().count();x++)
|
||||
{
|
||||
lpItem = new QTreeWidgetItem(ui->m_lpDetailsActors);
|
||||
lpItem->setText(0, m_lpSerie->actors().at(x));
|
||||
QStringList tmp = m_lpSerie->cast().at(x).split(",");
|
||||
lpItem = new QTreeWidgetItem(ui->m_lpDetailsActors);
|
||||
lpItem->setText(0, tmp.at(0));
|
||||
if(tmp.count() > 1)
|
||||
lpItem->setText(1, tmp.at(1));
|
||||
|
||||
ui->m_lpDetailsActors->addTopLevelItem(lpItem);
|
||||
}
|
||||
ui->m_lpDetailsActors->resizeColumnToContents(0);
|
||||
ui->m_lpDetailsActors->resizeColumnToContents(1);
|
||||
|
||||
for(int x = 0;x < m_lpSerie->genre().count();x++)
|
||||
{
|
||||
lpItem = new QTreeWidgetItem(ui->m_lpDetailsGenre);
|
||||
@@ -269,10 +278,10 @@ void cEdit::on_m_lpTabWidget_tabBarClicked(int index)
|
||||
ui->m_lpDetailsSeasonTab->addTab(lpSeasonDetails, QString("Season %1").arg(lpSeason->number()));
|
||||
lpSeasonDetails->setSeason(lpSeason);
|
||||
}
|
||||
|
||||
delete lpDialog;
|
||||
|
||||
m_bLoaded = true;
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="m_lpTabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@@ -129,7 +129,7 @@
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,1,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpDetailsBanner">
|
||||
<widget class="QLabel" name="m_lpDetailsBackdrop">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>758</width>
|
||||
@@ -184,6 +184,9 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="m_lpDetailsActors">
|
||||
<property name="columnCount">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
@@ -192,6 +195,11 @@
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">2</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -108,8 +108,6 @@ private:
|
||||
qint16 m_iVoteCount;
|
||||
QStringList m_szCrew;
|
||||
State m_state;
|
||||
// qint16 m_iThumbHeight;
|
||||
// qint16 m_iThumbWidth;
|
||||
QButtonGroup* m_lpGroup;
|
||||
QLabel* m_lpLabel;
|
||||
QRadioButton* m_lpButton1;
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
#include "cepisodedetails.h"
|
||||
#include "ui_cepisodedetails.h"
|
||||
|
||||
#include "cimage.h"
|
||||
#include "cmovieimage.h"
|
||||
#include "cmessageanimatedialog.h"
|
||||
|
||||
#include <QDebug>
|
||||
@@ -40,11 +40,11 @@ void cEpisodeDetails::loadImages()
|
||||
lpDialog->setTitle("Details");
|
||||
lpDialog->setMessage("Loading Images");
|
||||
lpDialog->show();
|
||||
/*
|
||||
cImage image;
|
||||
QPixmap pixmap = image.getImage(m_lpEpisode->fileName()).scaledToHeight(200);
|
||||
|
||||
cMovieImage image;
|
||||
QPixmap pixmap = image.getImage(m_lpEpisode->stillPath()).scaledToHeight(200);
|
||||
ui->m_lpEpisodeThumb->setPixmap(pixmap);
|
||||
*/
|
||||
|
||||
delete lpDialog;
|
||||
|
||||
m_bLoaded = true;
|
||||
|
||||
+18
-18
@@ -342,12 +342,12 @@ void cMainWindow::loadSeriesDB()
|
||||
cSeason* lpSeason;
|
||||
cEpisode* lpEpisode;
|
||||
|
||||
if(query.exec("SELECT serie.seriesID,serie.seriesName,serie.originalName,serie.backdropPath,serie.createdBy,serie.homepage,serie.lastAired,serie.languages,serie.networks,serie.nrEpisodes,serie.nrSeasons,serie.originCountries,serie.originalLanguage,serie.popularity,serie.posterPath,serie.productionCompanies,serie.type,serie.voteAverage,serie.voteCount,serie.overview,serie.firstAired,serie.cast,serie.crew,serie.genre,serie.status,serie.download,serie.cliffhanger,episode.id,episode.name,episode.episodeNumber,episode.airDate,episode.guestStars,episode.overview,episode.productioncode,episode.seasonNumber,episode.seasonID,episode.seriesID,episode.stillPath,episode.voteAverage,episode.voteCount,episode.crew,episode.state FROM serie LEFT JOIN episode ON serie.seriesID = episode.seriesID ORDER BY serie.seriesName, serie.firstAired, episode.seasonNumber, episode.episodeNumber;"))
|
||||
if(query.exec("SELECT serie.seriesID,serie.seriesName,serie.originalName,serie.backdropPath,serie.createdBy,serie.homepage,serie.lastAired,serie.languages,serie.networks,serie.nrEpisodes,serie.nrSeasons,serie.originCountries,serie.originalLanguage,serie.popularity,serie.posterPath,serie.productionCompanies,serie.type,serie.voteAverage,serie.voteCount,serie.overview,serie.firstAired,serie.cast,serie.crew,serie.genre,serie.status,serie.download,serie.cliffhanger,episode.id eid,episode.name ename,episode.episodeNumber eepisodeNumber,episode.airDate eairDate,episode.guestStars eguestStars,episode.overview eoverview,episode.productioncode eproductioncode,episode.seasonNumber eseasonNumber,episode.seasonID eseasonID,episode.seriesID eseriesID,episode.stillPath estillPath,episode.voteAverage evoteAverage,episode.voteCount evoteCount,episode.crew ecrew,episode.state estate FROM serie LEFT JOIN episode ON serie.seriesID = episode.seriesID ORDER BY serie.seriesName, serie.firstAired, episode.seasonNumber, episode.episodeNumber;"))
|
||||
{
|
||||
while(query.next())
|
||||
{
|
||||
iSeriesID = query.value("seriesID").toInt();
|
||||
iSeasonNumber = query.value("seasonNumber").toInt();
|
||||
iSeasonNumber = query.value("eseasonNumber").toInt();
|
||||
|
||||
if(iSeriesID != iOldSeriesID)
|
||||
{
|
||||
@@ -386,27 +386,27 @@ void cMainWindow::loadSeriesDB()
|
||||
|
||||
if(iSeasonNumber != iOldSeasonNumber)
|
||||
{
|
||||
lpSeason = lpSerie->addSeason(query.value("seasonNumber").toInt());
|
||||
lpSeason = lpSerie->addSeason(query.value("eseasonNumber").toInt());
|
||||
iOldSeasonNumber = iSeasonNumber;
|
||||
}
|
||||
|
||||
lpEpisode = lpSeason->addEpisode(iSeasonNumber);
|
||||
|
||||
lpEpisode->setID(query.value("id").toInt());
|
||||
lpEpisode->setName(query.value("name").toString());
|
||||
lpEpisode->setEpisodeNumber(query.value("episodeNumber").toInt());
|
||||
lpEpisode->setAirDate(query.value("airDate").toString());
|
||||
lpEpisode->setGuestStars(query.value("guestStars").toString());
|
||||
lpEpisode->setOverview(query.value("overview").toString());
|
||||
lpEpisode->setProductionCode(query.value("productioncode").toString());
|
||||
lpEpisode->setSeasonNumber(query.value("seasonNumber").toInt());
|
||||
lpEpisode->setSeasonID(query.value("seasonID").toInt());
|
||||
lpEpisode->setSeriesID(query.value("seriesID").toInt());
|
||||
lpEpisode->setStillPath(query.value("stillPath").toString());
|
||||
lpEpisode->setVoteAverage(query.value("voteAverage").toDouble());
|
||||
lpEpisode->setVoteCount(query.value("voteCount").toInt());
|
||||
lpEpisode->setCrew(query.value("crew").toString());
|
||||
lpEpisode->setState((cEpisode::State)query.value("state").toInt());
|
||||
lpEpisode->setID(query.value("eid").toInt());
|
||||
lpEpisode->setName(query.value("ename").toString());
|
||||
lpEpisode->setEpisodeNumber(query.value("eepisodeNumber").toInt());
|
||||
lpEpisode->setAirDate(query.value("eairDate").toString());
|
||||
lpEpisode->setGuestStars(query.value("eguestStars").toString());
|
||||
lpEpisode->setOverview(query.value("eoverview").toString());
|
||||
lpEpisode->setProductionCode(query.value("eproductioncode").toString());
|
||||
lpEpisode->setSeasonNumber(query.value("eseasonNumber").toInt());
|
||||
lpEpisode->setSeasonID(query.value("eseasonID").toInt());
|
||||
lpEpisode->setSeriesID(query.value("eseriesID").toInt());
|
||||
lpEpisode->setStillPath(query.value("estillPath").toString());
|
||||
lpEpisode->setVoteAverage(query.value("evoteAverage").toDouble());
|
||||
lpEpisode->setVoteCount(query.value("evoteCount").toInt());
|
||||
lpEpisode->setCrew(query.value("ecrew").toString());
|
||||
lpEpisode->setState((cEpisode::State)query.value("estate").toInt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -3,7 +3,7 @@
|
||||
#include "cseason.h"
|
||||
#include "cepisode.h"
|
||||
#include "cmessagedialog.h"
|
||||
#include "cimage.h"
|
||||
#include "cmovieimage.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@@ -23,7 +23,7 @@ void cPicturesThread::stop()
|
||||
void cPicturesThread::run()
|
||||
{
|
||||
qint16 iCurrent = 0;
|
||||
/*
|
||||
|
||||
for(int z = 0;z < m_items.count();z++)
|
||||
{
|
||||
cSerie* lpSerie = m_items.at(z);
|
||||
@@ -31,8 +31,9 @@ void cPicturesThread::run()
|
||||
{
|
||||
emit picturesMessage(lpSerie->seriesName(), iCurrent);
|
||||
|
||||
cImage image;
|
||||
image.getImage(lpSerie->banner());
|
||||
cMovieImage image;
|
||||
image.getImage(lpSerie->backdropPath());
|
||||
image.getImage(lpSerie->posterPath());
|
||||
|
||||
for(int y = 0;y < lpSerie->seasonList().count();y++)
|
||||
{
|
||||
@@ -44,7 +45,7 @@ void cPicturesThread::run()
|
||||
for(int x = 0;x < lpSeason->episodeList().count();x++)
|
||||
{
|
||||
cEpisode* lpEpisode = lpSeason->episodeList().at(x);
|
||||
image.getImage(lpEpisode->fileName());
|
||||
image.getImage(lpEpisode->stillPath());
|
||||
iCurrent++;
|
||||
|
||||
QMutexLocker locker(&m_mutex);
|
||||
@@ -55,7 +56,6 @@ void cPicturesThread::run()
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void cPicturesThread::setData(cMessageDialog* lpMessageDialog, const QList<cSerie *> &list)
|
||||
|
||||
@@ -404,7 +404,6 @@ cSerie* cTheMovieDBV3::loadSerie(const qint32 &iID, const QString& szLanguage)
|
||||
lpSerie->setVoteCount(jsonObj["vote_count"].toInt());
|
||||
|
||||
QJsonObject creditsObj = jsonObj["credits"].toObject();
|
||||
QJsonArray seasonsArray = jsonObj["seasons"].toArray();
|
||||
|
||||
if(!creditsObj.isEmpty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user