added local path information to series
This commit is contained in:
@@ -27,26 +27,26 @@ cEdit::cEdit(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::cEdit),
|
||||
m_bLoaded(false),
|
||||
m_lpButton1(0),
|
||||
m_lpButton2(0),
|
||||
m_lpButton3(0),
|
||||
m_lpInit(0),
|
||||
m_lpProgress(0),
|
||||
m_lpDone(0),
|
||||
m_lpGroupBox(0),
|
||||
m_lpGridLayout(0),
|
||||
m_lpGrid(0),
|
||||
m_lpLabel(0),
|
||||
m_lpLabel1(0),
|
||||
m_lpSpacer(0),
|
||||
m_lpGroup(0),
|
||||
m_lpAllInit(0),
|
||||
m_lpAllProgress(0),
|
||||
m_lpAllDone(0),
|
||||
m_lpVerticalSpacer(0),
|
||||
m_lpDetailsActorsModel(0),
|
||||
m_lpDetailsGenreModel(0),
|
||||
m_lpSerie(0)
|
||||
m_lpButton1(nullptr),
|
||||
m_lpButton2(nullptr),
|
||||
m_lpButton3(nullptr),
|
||||
m_lpInit(nullptr),
|
||||
m_lpProgress(nullptr),
|
||||
m_lpDone(nullptr),
|
||||
m_lpGroupBox(nullptr),
|
||||
m_lpGridLayout(nullptr),
|
||||
m_lpGrid(nullptr),
|
||||
m_lpLabel(nullptr),
|
||||
m_lpLabel1(nullptr),
|
||||
m_lpSpacer(nullptr),
|
||||
m_lpGroup(nullptr),
|
||||
m_lpAllInit(nullptr),
|
||||
m_lpAllProgress(nullptr),
|
||||
m_lpAllDone(nullptr),
|
||||
m_lpVerticalSpacer(nullptr),
|
||||
m_lpDetailsActorsModel(nullptr),
|
||||
m_lpDetailsGenreModel(nullptr),
|
||||
m_lpSerie(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -108,6 +108,7 @@ void cEdit::setSerie(cSerie* lpSerie)
|
||||
ui->m_lpFirstAired->setDate(lpSerie->firstAired());
|
||||
ui->m_lpCliffhanger->setChecked(lpSerie->cliffhanger());
|
||||
ui->m_lpDownloadLink->setText(lpSerie->download());
|
||||
ui->m_lpLocalPath->setText(lpSerie->localPath());
|
||||
|
||||
QString szBanner = lpSerie->fanartBanner();
|
||||
{
|
||||
@@ -264,6 +265,11 @@ QString cEdit::download()
|
||||
return(ui->m_lpDownloadLink->text());
|
||||
}
|
||||
|
||||
QString cEdit::localPath()
|
||||
{
|
||||
return(ui->m_lpLocalPath->text());
|
||||
}
|
||||
|
||||
void cEdit::on_m_lpTabWidget_tabBarClicked(int index)
|
||||
{
|
||||
if(index == 1)
|
||||
|
||||
@@ -50,6 +50,13 @@ public:
|
||||
\return QString
|
||||
*/
|
||||
QString download();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn localPath
|
||||
\return QString
|
||||
*/
|
||||
QString localPath();
|
||||
private slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="m_lpTabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="cPixmapWidget" name="m_lpProgressTab">
|
||||
<attribute name="title">
|
||||
@@ -77,6 +77,16 @@
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpDownloadLink"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Local Path:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpLocalPath"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -273,6 +273,7 @@ void cMainWindow::initDB()
|
||||
" tvrageid INTEGER,"
|
||||
" status STRING,"
|
||||
" download STRING,"
|
||||
" localPath STRING,"
|
||||
" cliffhanger BOOL);");
|
||||
}
|
||||
|
||||
@@ -467,6 +468,7 @@ void cMainWindow::loadSeriesDB()
|
||||
" serie.tvrageid tvrageid,"
|
||||
" serie.status status,"
|
||||
" serie.download download,"
|
||||
" serie.localPath localPath,"
|
||||
" serie.cliffhanger cliffhanger,"
|
||||
" season._id s__id,"
|
||||
" season.airDate s_airDate,"
|
||||
@@ -542,6 +544,7 @@ void cMainWindow::loadSeriesDB()
|
||||
lpSerie->setTVRageID(query.value("tvrageid").toInt());
|
||||
lpSerie->setStatus(query.value("status").toString());
|
||||
lpSerie->setDownload(query.value("download").toString());
|
||||
lpSerie->setLocalPath(query.value("localPath").toString());
|
||||
lpSerie->setCliffhanger(query.value("cliffhanger").toBool());
|
||||
}
|
||||
|
||||
@@ -1185,6 +1188,8 @@ bool cMainWindow::runEdit(cSerie* lpSerie, QString& szDownload)
|
||||
szDownload = lpEdit->download();
|
||||
|
||||
lpSerie->setDownload(szDownload);
|
||||
lpSerie->setLocalPath(lpEdit->localPath());
|
||||
|
||||
lpSerie->updateState();
|
||||
|
||||
delete lpEdit;
|
||||
|
||||
+14
-2
@@ -33,6 +33,7 @@ cSerie::cSerie() :
|
||||
m_iTVRageID(-1),
|
||||
m_szStatus(""),
|
||||
m_szDownload(""),
|
||||
m_szLocalPath(""),
|
||||
m_bCliffhanger(false)
|
||||
{
|
||||
}
|
||||
@@ -387,6 +388,16 @@ QString cSerie::download()
|
||||
return(m_szDownload);
|
||||
}
|
||||
|
||||
void cSerie::setLocalPath(const QString& szLocalPath)
|
||||
{
|
||||
m_szLocalPath = szLocalPath;
|
||||
}
|
||||
|
||||
QString cSerie::localPath()
|
||||
{
|
||||
return(m_szLocalPath);
|
||||
}
|
||||
|
||||
void cSerie::setCliffhanger(const bool& bCliffhanger)
|
||||
{
|
||||
m_bCliffhanger = bCliffhanger;
|
||||
@@ -529,8 +540,8 @@ bool cSerie::save(QSqlDatabase &db)
|
||||
QSqlQuery queryEpisode;
|
||||
QSqlQuery queryFanart;
|
||||
|
||||
querySerie.prepare("INSERT INTO serie (seriesID,seriesName,originalName,backdropPath,createdBy,homepage,lastAired,languages,networks,nrEpisodes,nrSeasons,originCountries,originalLanguage,popularity,posterPath,productionCompanies,type,voteAverage,voteCount,overview,firstAired,cast,crew,genre,imdbid,freebasemid,freebaseid,tvdbid,tvrageid,status,download,cliffhanger)"
|
||||
" VALUES (:seriesID,:seriesName,:originalName,:backdropPath,:createdBy,:homepage,:lastAired,:languages,:networks,:nrEpisodes,:nrSeasons,:originCountries,:originalLanguage,:popularity,:posterPath,:productionCompanies,:type,:voteAverage,:voteCount,:overview,:firstAired,:cast,:crew,:genre,:imdbid,:freebasemid,:freebaseid,:tvdbid,:tvrageid,:status,:download,:cliffhanger);");
|
||||
querySerie.prepare("INSERT INTO serie (seriesID,seriesName,originalName,backdropPath,createdBy,homepage,lastAired,languages,networks,nrEpisodes,nrSeasons,originCountries,originalLanguage,popularity,posterPath,productionCompanies,type,voteAverage,voteCount,overview,firstAired,cast,crew,genre,imdbid,freebasemid,freebaseid,tvdbid,tvrageid,status,download,localPath,cliffhanger)"
|
||||
" VALUES (:seriesID,:seriesName,:originalName,:backdropPath,:createdBy,:homepage,:lastAired,:languages,:networks,:nrEpisodes,:nrSeasons,:originCountries,:originalLanguage,:popularity,:posterPath,:productionCompanies,:type,:voteAverage,:voteCount,:overview,:firstAired,:cast,:crew,:genre,:imdbid,:freebasemid,:freebaseid,:tvdbid,:tvrageid,:status,:download,:localPath,:cliffhanger);");
|
||||
querySeason.prepare("INSERT INTO season (_id,airDate,name,overview,id,posterPath,seasonNumber,seriesID) VALUES (:_id,:airDate,:name,:overview,:id,:posterPath,:seasonNumber,:seriesID);");
|
||||
queryEpisode.prepare("INSERT INTO episode (id,name,episodeNumber,airDate,guestStars,overview,productioncode,seasonNumber,seasonID,seriesID,stillPath,voteAverage,voteCount,crew,state)"
|
||||
" VALUES (:id,:name,:episodeNumber,:airDate,:guestStars,:overview,:productioncode,:seasonNumber,:seasonID,:seriesID,:stillPath,:voteAverage,:voteCount,:crew,:state);");
|
||||
@@ -573,6 +584,7 @@ bool cSerie::save(QSqlDatabase &db)
|
||||
querySerie.bindValue("tvrageid", tvrageID());
|
||||
querySerie.bindValue(":status", status());
|
||||
querySerie.bindValue(":download", download());
|
||||
querySerie.bindValue(":localPath", localPath());
|
||||
querySerie.bindValue(":cliffhanger", cliffhanger());
|
||||
if(querySerie.exec())
|
||||
{
|
||||
|
||||
@@ -541,6 +541,21 @@ public:
|
||||
*/
|
||||
QString download();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setLocalPath
|
||||
\param szLocalPath
|
||||
*/
|
||||
void setLocalPath(const QString& szLocalPath);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn localPath
|
||||
\return QString
|
||||
*/
|
||||
QString localPath();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
@@ -774,6 +789,7 @@ private:
|
||||
qint32 m_iTVRageID; /*!< TODO: describe */
|
||||
QString m_szStatus; /*!< TODO: describe */
|
||||
QString m_szDownload; /*!< TODO: describe */
|
||||
QString m_szLocalPath; /*!< TODO: describe */
|
||||
bool m_bCliffhanger; /*!< TODO: describe */
|
||||
cFanartList m_fanartList; /*!< TODO: describe */
|
||||
QList<cSeason*> m_seasonList; /*!< TODO: describe */
|
||||
|
||||
Reference in New Issue
Block a user