summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY5
-rw-r--r--imageserver.c81
-rw-r--r--imageserver.h15
-rw-r--r--services.h199
-rw-r--r--tools/curlfuncs.cpp2
-rw-r--r--tools/splitstring.c2
-rw-r--r--tvscraper.c165
-rw-r--r--tvscraperdb.c24
8 files changed, 357 insertions, 136 deletions
diff --git a/HISTORY b/HISTORY
index 09d9fd4..b97e1cd 100644
--- a/HISTORY
+++ b/HISTORY
@@ -43,3 +43,8 @@ Version 0.0.5
Version 0.1.0
- Fixed a crash if a configured channel to scrap does not
exist anymore
+
+Version 0.2.0
+- Removed old tvscraper service interface
+- Add scraper2vdr service interface
+- Fixed some compiler warnings
diff --git a/imageserver.c b/imageserver.c
index b6d8414..8d16a08 100644
--- a/imageserver.c
+++ b/imageserver.c
@@ -35,8 +35,8 @@ int cImageServer::GetID(int eventID, scrapType type, bool isRecording) {
return id;
}
-tvMedia cImageServer::GetPosterOrBanner(int id, scrapType type) {
- tvMedia media;
+cTvMedia cImageServer::GetPosterOrBanner(int id, scrapType type) {
+ cTvMedia media;
media.path = "";
media.width = 0;
media.height = 0;
@@ -56,8 +56,8 @@ tvMedia cImageServer::GetPosterOrBanner(int id, scrapType type) {
return media;
}
-tvMedia cImageServer::GetPoster(int id, scrapType type) {
- tvMedia media;
+cTvMedia cImageServer::GetPoster(int id, scrapType type) {
+ cTvMedia media;
media.path = "";
media.width = 0;
media.height = 0;
@@ -83,8 +83,8 @@ tvMedia cImageServer::GetPoster(int id, scrapType type) {
return media;
}
-tvMedia cImageServer::GetBanner(int id) {
- tvMedia media;
+cTvMedia cImageServer::GetBanner(int id) {
+ cTvMedia media;
media.path = "";
media.width = 0;
media.height = 0;
@@ -99,15 +99,15 @@ tvMedia cImageServer::GetBanner(int id) {
return media;
}
-vector<tvMedia> cImageServer::GetPosters(int id, scrapType type) {
- vector<tvMedia> posters;
+vector<cTvMedia> cImageServer::GetPosters(int id, scrapType type) {
+ vector<cTvMedia> posters;
if (type == scrapSeries) {
for (int i=0; i<3; i++) {
stringstream path;
path << config.GetBaseDir() << "/series/" << id << "/poster_" << i << ".jpg";
string filePoster = path.str();
if (FileExists(filePoster)) {
- tvMedia media;
+ cTvMedia media;
media.path = filePoster;
media.width = 680;
media.height = 1000;
@@ -120,7 +120,7 @@ vector<tvMedia> cImageServer::GetPosters(int id, scrapType type) {
path << config.GetBaseDir() << "/movies/" << id << "_poster.jpg";
string filePoster = path.str();
if (FileExists(filePoster)) {
- tvMedia media;
+ cTvMedia media;
media.path = path.str();
media.width = 500;
media.height = 750;
@@ -130,55 +130,56 @@ vector<tvMedia> cImageServer::GetPosters(int id, scrapType type) {
return posters;
}
-vector<tvMedia> cImageServer::GetFanart(int id, scrapType type) {
- vector<tvMedia> fanart;
- if (type == scrapSeries) {
- for (int i=0; i<3; i++) {
- stringstream path;
- path << config.GetBaseDir() << "/series/" << id << "/fanart_" << i << ".jpg";
- string fileFanart = path.str();
- if (FileExists(fileFanart)) {
- tvMedia media;
- media.path = fileFanart;
- media.width = 1920;
- media.height = 1080;
- fanart.push_back(media);
- } else
- break;
- }
- } else if (type == scrapMovie) {
+vector<cTvMedia> cImageServer::GetSeriesFanarts(int id) {
+ vector<cTvMedia> fanart;
+ for (int i=0; i<3; i++) {
stringstream path;
- path << config.GetBaseDir() << "/movies/" << id << "_backdrop.jpg";
+ path << config.GetBaseDir() << "/series/" << id << "/fanart_" << i << ".jpg";
string fileFanart = path.str();
if (FileExists(fileFanart)) {
- tvMedia media;
+ cTvMedia media;
media.path = fileFanart;
- media.width = 1280;
- media.height = 720;
+ media.width = 1920;
+ media.height = 1080;
fanart.push_back(media);
- }
+ } else
+ break;
}
return fanart;
}
-vector<tvActor> cImageServer::GetActors(int id, scrapType type) {
- vector<tvActor> actors;
+cTvMedia cImageServer::GetMovieFanart(int id) {
+ cTvMedia fanart;
+ stringstream path;
+ path << config.GetBaseDir() << "/movies/" << id << "_backdrop.jpg";
+ string fileFanart = path.str();
+ if (FileExists(fileFanart)) {
+ fanart.path = fileFanart;
+ fanart.width = 1280;
+ fanart.height = 720;
+ }
+ return fanart;
+}
+
+
+vector<cActor> cImageServer::GetActors(int id, scrapType type) {
+ vector<cActor> actors;
if (type == scrapSeries) {
vector<vector<string> > actorsDB = db->GetActorsSeries(id);
int numActors = actorsDB.size();
for (int i=0; i < numActors; i++) {
vector<string> row = actorsDB[i];
if (row.size() == 3) {
- tvActor actor;
+ cActor actor;
actor.name = row[0];
actor.role = row[1];
- tvMedia thumb;
+ cTvMedia thumb;
stringstream thumbPath;
thumbPath << config.GetBaseDir() << "/series/" << id << "/" << row[2];
thumb.path = thumbPath.str();
thumb.width = 300;
thumb.height = 450;
- actor.thumb = thumb;
+ actor.actorThumb = thumb;
actors.push_back(actor);
}
}
@@ -188,16 +189,16 @@ vector<tvActor> cImageServer::GetActors(int id, scrapType type) {
for (int i=0; i < numActors; i++) {
vector<string> row = actorsDB[i];
if (row.size() == 3) {
- tvActor actor;
+ cActor actor;
actor.name = row[1];
actor.role = row[2];
stringstream thumbPath;
thumbPath << config.GetBaseDir() << "/movies/actors/actor_" << row[0] << ".jpg";
- tvMedia thumb;
+ cTvMedia thumb;
thumb.path = thumbPath.str();
thumb.width = 421;
thumb.height = 632;
- actor.thumb = thumb;
+ actor.actorThumb = thumb;
actors.push_back(actor);
}
}
diff --git a/imageserver.h b/imageserver.h
index 6661684..aa8f4cf 100644
--- a/imageserver.h
+++ b/imageserver.h
@@ -11,11 +11,12 @@ public:
virtual ~cImageServer(void);
scrapType GetScrapType(const cEvent *event);
int GetID(int eventID, scrapType type, bool isRecording);
- tvMedia GetPosterOrBanner(int id, scrapType type);
- tvMedia GetPoster(int id, scrapType type);
- tvMedia GetBanner(int id);
- vector<tvMedia> GetPosters(int id, scrapType type);
- vector<tvMedia> GetFanart(int id, scrapType type);
- vector<tvActor> GetActors(int id, scrapType type);
+ cTvMedia GetPosterOrBanner(int id, scrapType type);
+ cTvMedia GetPoster(int id, scrapType type);
+ cTvMedia GetBanner(int id);
+ vector<cTvMedia> GetPosters(int id, scrapType type);
+ vector<cTvMedia> GetSeriesFanarts(int id);
+ cTvMedia GetMovieFanart(int id);
+ vector<cActor> GetActors(int id, scrapType type);
string GetDescription(int id, scrapType type);
-}; \ No newline at end of file
+};
diff --git a/services.h b/services.h
index fc278ad..0e72056 100644
--- a/services.h
+++ b/services.h
@@ -1,56 +1,187 @@
-enum tvMediaType {
- typeSeries,
- typeMovie,
- typeNone,
+enum tvType {
+ tSeries,
+ tMovie,
+ tNone,
};
-struct tvMedia {
+
+/*********************************************************************
+* Helper Structures
+*********************************************************************/
+class cTvMedia {
+public:
+ cTvMedia(void) {
+ path = "";
+ width = height = 0;
+ };
std::string path;
int width;
int height;
};
-struct tvActor {
+class cEpisode {
+public:
+ cEpisode(void) {
+ number = 0;
+ season = 0;
+ name = "";
+ firstAired = "";
+ guestStars = "";
+ overview = "";
+ rating = 0.0;
+ };
+ int number;
+ int season;
+ std::string name;
+ std::string firstAired;
+ std::string guestStars;
+ std::string overview;
+ float rating;
+ cTvMedia episodeImage;
+};
+
+class cActor {
+public:
+ cActor(void) {
+ name = "";
+ role = "";
+ };
std::string name;
std::string role;
- tvMedia thumb;
+ cTvMedia actorThumb;
};
-// Data structure for service "TVScraper-GetPosterOrBanner"
-struct TVScraperGetPosterOrBanner
-{
+/*********************************************************************
+* Data Structures for Service Calls
+*********************************************************************/
+
+// Data structure for service "GetEventType"
+class ScraperGetEventType {
+public:
+ ScraperGetEventType(void) {
+ event = NULL;
+ recording = NULL;
+ type = tNone;
+ movieId = 0;
+ seriesId = 0;
+ episodeId = 0;
+ };
// in
- const cEvent *event; // search image for this event
+ const cEvent *event; // check type for this event
+ const cRecording *recording; // or for this recording
//out
- tvMediaType type; //typeSeries or typeMovie
- tvMedia media; //banner or poster
+ tvType type; //typeSeries or typeMovie
+ int movieId;
+ int seriesId;
+ int episodeId;
+};
+
+//Data structure for full series and episode information
+class cMovie {
+public:
+ cMovie(void) {
+ title = "";
+ originalTitle = "";
+ tagline = "";
+ overview = "";
+ adult = false;
+ collectionName = "";
+ budget = 0;
+ revenue = 0;
+ genres = "";
+ homepage = "";
+ releaseDate = "";
+ runtime = 0;
+ popularity = 0.0;
+ voteAverage = 0.0;
+ };
+//IN
+ int movieId; // movieId fetched from ScraperGetEventType
+//OUT
+ std::string title;
+ std::string originalTitle;
+ std::string tagline;
+ std::string overview;
+ bool adult;
+ std::string collectionName;
+ int budget;
+ int revenue;
+ std::string genres;
+ std::string homepage;
+ std::string releaseDate;
+ int runtime;
+ float popularity;
+ float voteAverage;
+ cTvMedia poster;
+ cTvMedia fanart;
+ cTvMedia collectionPoster;
+ cTvMedia collectionFanart;
+ std::vector<cActor> actors;
};
-// Data structure for service "TVScraper-GetPoster"
-struct TVScraperGetPoster
-{
+//Data structure for full series and episode information
+class cSeries {
+public:
+ cSeries(void) {
+ seriesId = 0;
+ episodeId = 0;
+ name = "";
+ overview = "";
+ firstAired = "";
+ network = "";
+ genre = "";
+ rating = 0.0;
+ status = "";
+ };
+//IN
+ int seriesId; // seriesId fetched from ScraperGetEventType
+ int episodeId; // episodeId fetched from ScraperGetEventType
+//OUT
+ std::string name;
+ std::string overview;
+ std::string firstAired;
+ std::string network;
+ std::string genre;
+ float rating;
+ std::string status;
+ cEpisode episode;
+ std::vector<cActor> actors;
+ std::vector<cTvMedia> posters;
+ std::vector<cTvMedia> banners;
+ std::vector<cTvMedia> fanarts;
+ cTvMedia seasonPoster;
+};
+
+// Data structure for service "GetPosterBanner"
+class ScraperGetPosterBanner {
+public:
+ ScraperGetPosterBanner(void) {
+ type = tNone;
+ };
// in
- const cEvent *event; // search image for this event
- bool isRecording; // search in current EPG or recordings
+ const cEvent *event; // check type for this event
//out
- tvMedia media; //poster
+ tvType type; //typeSeries or typeMovie
+ cTvMedia poster;
+ cTvMedia banner;
};
+// Data structure for service "GetPoster"
+class ScraperGetPoster {
+public:
+// in
+ const cEvent *event; // check type for this event
+ const cRecording *recording; // or for this recording
+//out
+ cTvMedia poster;
+};
-/* Data structure for service "TVScraper-GetFullEPGInformation"
-if type == typeMovie a poster and a fanart image is delivered
-if type == typeSeries a banner and up to three posters and fanarts are delivered
-*/
-struct TVScraperGetFullInformation
-{
+// Data structure for service "GetPosterThumb"
+class ScraperGetPosterThumb {
+public:
// in
- const cEvent *event; // search all media for this event
- bool isRecording; // search in current EPG or recordings
+ const cEvent *event; // check type for this event
+ const cRecording *recording; // or for this recording
//out
- tvMediaType type;
- tvMedia banner;
- std::vector<tvMedia> posters;
- std::vector<tvMedia> fanart;
- std::vector<tvActor> actors;
- std::string description;
-}; \ No newline at end of file
+ cTvMedia poster;
+};
diff --git a/tools/curlfuncs.cpp b/tools/curlfuncs.cpp
index de4c72f..0018904 100644
--- a/tools/curlfuncs.cpp
+++ b/tools/curlfuncs.cpp
@@ -67,7 +67,7 @@ size_t collect_data(void *ptr, size_t size, size_t nmemb, void *stream)
curlfuncs::sBuf += sTmp;
}
else {
- size_t xxx = fwrite(ptr, size, nmemb, (FILE *)stream);
+ fwrite(ptr, size, nmemb, (FILE *)stream);
}
return actualsize;
}
diff --git a/tools/splitstring.c b/tools/splitstring.c
index 14af577..8435185 100644
--- a/tools/splitstring.c
+++ b/tools/splitstring.c
@@ -13,7 +13,7 @@ vector<string>& splitstring::split(char delim, int rep) {
if (!flds.empty()) flds.clear(); // empty vector if necessary
string work = data();
string buf = "";
- int i = 0;
+ unsigned int i = 0;
while (i < work.length()) {
if (work[i] != delim)
buf += work[i];
diff --git a/tvscraper.c b/tvscraper.c
index 2406f4f..1480f63 100644
--- a/tvscraper.c
+++ b/tvscraper.c
@@ -29,9 +29,10 @@ cTVScraperConfig config;
#include "imageserver.c"
#include "setup.c"
-static const char *VERSION = "0.1.0";
+static const char *VERSION = "0.2.0";
static const char *DESCRIPTION = "Scraping movie and series info";
-static const char *MAINMENUENTRY = "TV Scraper";
+// static const char *MAINMENUENTRY = "TV Scraper";
+
class cPluginTvscraper : public cPlugin {
private:
@@ -40,6 +41,7 @@ private:
cTVScraperWorker *workerThread;
cImageServer *imageServer;
cOverRides *overrides;
+ int lastEventId;
public:
cPluginTvscraper(void);
virtual ~cPluginTvscraper();
@@ -120,7 +122,7 @@ bool cPluginTvscraper::Start(void) {
void cPluginTvscraper::Stop(void) {
while (workerThread->Active()) {
workerThread->Stop();
- }
+ }
delete workerThread;
delete imageServer;
delete db;
@@ -154,66 +156,147 @@ bool cPluginTvscraper::SetupParse(const char *Name, const char *Value) {
}
bool cPluginTvscraper::Service(const char *Id, void *Data) {
- if (strcmp(Id, "TVScraperGetPosterOrBanner") == 0) {
- if (Data == NULL)
+ if (Data == NULL)
+ return false;
+
+ if (strcmp(Id, "GetEventType") == 0) {
+ ScraperGetEventType* call = (ScraperGetEventType*) Data;
+ if (!call->event && !call->recording)
+ {
+ lastEventId = 0;
+ return false;
+ }
+
+ const cEvent *event = NULL;
+ bool isRecording = false;
+ if( call->event ) {
+ event = call->event;
+ isRecording = false;
+ } else if( call->recording ) {
+ event = call->recording->Info()->GetEvent();
+ isRecording = true;
+ }
+
+ scrapType type = imageServer->GetScrapType(event);
+ lastEventId = imageServer->GetID(event->EventID(), type, isRecording);
+
+ if( lastEventId == 0 ) {
+ call->type = tNone;
+ return false;
+ }
+
+ if (type == scrapSeries) {
+ call->type = tSeries;
+ call->seriesId = 1234;
+ } else if (type == scrapMovie) {
+ call->type = tMovie;
+ call->movieId = 1234;
+ } else {
+ call->type = tNone;
+ }
+
+ return true;
+ }
+
+ if (strcmp(Id, "GetSeries") == 0) {
+ cSeries* call = (cSeries*) Data;
+ if( call->seriesId == 0 || lastEventId == 0 )
return false;
- TVScraperGetPosterOrBanner* call = (TVScraperGetPosterOrBanner*) Data;
+
+ call->banners.push_back(imageServer->GetBanner(lastEventId));
+ call->posters = imageServer->GetPosters(lastEventId, scrapSeries);
+ call->fanarts = imageServer->GetSeriesFanarts(lastEventId);
+ call->actors = imageServer->GetActors(lastEventId, scrapSeries);
+ call->overview = imageServer->GetDescription(lastEventId, scrapSeries);
+
+ return true;
+ }
+
+ if (strcmp(Id, "GetMovie") == 0) {
+ cMovie* call = (cMovie*) Data;
+ if (call->movieId == 0 || lastEventId == 0)
+ return false;
+
+ call->poster = imageServer->GetPoster(lastEventId, scrapMovie);
+ call->fanart = imageServer->GetMovieFanart(lastEventId);
+ call->actors = imageServer->GetActors(lastEventId, scrapMovie);
+ call->overview = imageServer->GetDescription(lastEventId, scrapMovie);
+
+ return true;
+ }
+
+ if (strcmp(Id, "GetPosterBanner") == 0) {
+ ScraperGetPosterBanner* call = (ScraperGetPosterBanner*) Data;
if (!call->event)
return false;
scrapType type = imageServer->GetScrapType(call->event);
if (type == scrapSeries)
- call->type = typeSeries;
+ call->type = tSeries;
else if (type == scrapMovie)
- call->type = typeMovie;
+ call->type = tMovie;
else
- call->type = typeNone;
+ call->type = tNone;
int id = imageServer->GetID(call->event->EventID(), type, false);
if (id > 0) {
- call->media = imageServer->GetPosterOrBanner(id, type);
+ cTvMedia media = imageServer->GetPosterOrBanner(id, type);
+ if( type == scrapMovie ) {
+ call->poster = media;
+ } else if( type == scrapSeries ) {
+ call->banner = media;
+ }
return true;
}
return false;
}
- if (strcmp(Id, "TVScraperGetPoster") == 0) {
- if (Data == NULL)
- return false;
- TVScraperGetPoster* call = (TVScraperGetPoster*) Data;
- if (!call->event)
+
+ if (strcmp(Id, "GetPoster") == 0) {
+ ScraperGetPoster* call = (ScraperGetPoster*) Data;
+
+ const cEvent *event = NULL;
+ bool isRecording = false;
+
+ if (!call->event && !call->recording)
return false;
- scrapType type = imageServer->GetScrapType(call->event);
- int id = imageServer->GetID(call->event->EventID(), type, call->isRecording);
+ if( call->event ) {
+ event = call->event;
+ isRecording = false;
+ } else if( call->recording ) {
+ event = call->recording->Info()->GetEvent();
+ isRecording = true;
+ }
+
+ scrapType type = imageServer->GetScrapType(event);
+ int id = imageServer->GetID(event->EventID(), type, isRecording);
if (id > 0) {
- call->media = imageServer->GetPoster(id, type);
+ call->poster = imageServer->GetPoster(id, type);
return true;
}
return false;
}
- if (strcmp(Id, "TVScraperGetFullInformation") == 0) {
- if (Data == NULL)
- return false;
- TVScraperGetFullInformation* call = (TVScraperGetFullInformation*) Data;
- if (!call->event)
- return false;
-
- scrapType type = imageServer->GetScrapType(call->event);
- int id = imageServer->GetID(call->event->EventID(), type, call->isRecording);
- if (id == 0)
+ if (strcmp(Id, "GetPosterThumb") == 0) {
+ ScraperGetPosterThumb* call = (ScraperGetPosterThumb*) Data;
+
+ const cEvent *event = NULL;
+ bool isRecording = false;
+
+ if (!call->event && !call->recording)
return false;
-
- if (type == scrapSeries) {
- call->type = typeSeries;
- call->banner = imageServer->GetBanner(id);
- } else if (type == scrapMovie) {
- call->type = typeMovie;
- } else {
- call->type = typeNone;
+ if( call->event ) {
+ event = call->event;
+ isRecording = false;
+ } else if( call->recording ) {
+ event = call->recording->Info()->GetEvent();
+ isRecording = true;
}
- call->posters = imageServer->GetPosters(id, type);
- call->fanart = imageServer->GetFanart(id, type);
- call->actors = imageServer->GetActors(id, type);
- call->description = imageServer->GetDescription(id, type);
- return true;
+
+ scrapType type = imageServer->GetScrapType(event);
+ int id = imageServer->GetID(event->EventID(), type, isRecording);
+ if (id > 0) {
+ call->poster = imageServer->GetPoster(id, type);
+ return true;
+ }
+ return false;
}
return false;
}
diff --git a/tvscraperdb.c b/tvscraperdb.c
index 86f9fec..b2c6925 100644
--- a/tvscraperdb.c
+++ b/tvscraperdb.c
@@ -238,13 +238,13 @@ void cTVScraperDB::ClearOutdated(string movieDir) {
sql2 << "delete from event_movie where valid_till < " << now;
sqlite3_stmt *stmt;
sqlite3_prepare_v2(db, sql2.str().c_str(), -1, &stmt, NULL);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
//delete all invalid events pointing to series, series will all be kept for later use
stringstream sql3;
sql3 << "delete from event_series where valid_till < " << now;
sqlite3_stmt *stmt2;
sqlite3_prepare_v2(db, sql3.str().c_str(), -1, &stmt2, NULL);
- int ret2 = sqlite3_step(stmt2);
+ sqlite3_step(stmt2);
esyslog("tvscraper: Cleanup Done");
}
@@ -261,7 +261,7 @@ void cTVScraperDB::DeleteMovie(int movieID, string movieDir) {
sql << "DELETE FROM actor_movie WHERE movie_id = " << movieID;
sqlite3_stmt *stmt;
sqlite3_prepare_v2(db, sql.str().c_str(), -1, &stmt, NULL);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
}
bool cTVScraperDB::CheckMovieOutdatedEvents(int movieID) {
@@ -310,7 +310,7 @@ void cTVScraperDB::InsertSeries(int seriesID, string name, string overview) {
sqlite3_prepare_v2(db, sql.str().c_str(), -1, &stmt, NULL);
sqlite3_bind_text(stmt, 1, name.c_str(), -1, SQLITE_TRANSIENT);
sqlite3_bind_text(stmt, 2, overview.c_str(), -1, SQLITE_TRANSIENT);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
}
void cTVScraperDB::InsertEventSeries(int eventID, time_t validTill, int seriesID) {
@@ -321,7 +321,7 @@ void cTVScraperDB::InsertEventSeries(int eventID, time_t validTill, int seriesID
sql << ");";
sqlite3_stmt *stmt;
sqlite3_prepare_v2(db, sql.str().c_str(), -1, &stmt, NULL);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
}
void cTVScraperDB::InsertActor(int seriesID, string name, string role, string thumb) {
@@ -336,7 +336,7 @@ void cTVScraperDB::InsertActor(int seriesID, string name, string role, string th
sqlite3_prepare_v2(db, sql.str().c_str(), -1, &stmt, NULL);
sqlite3_bind_text(stmt, 1, name.c_str(), -1, SQLITE_TRANSIENT);
sqlite3_bind_text(stmt, 2, role.c_str(), -1, SQLITE_TRANSIENT);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
}
void cTVScraperDB::InsertMovie(int movieID, string title, string originalTitle, string overview) {
@@ -351,7 +351,7 @@ void cTVScraperDB::InsertMovie(int movieID, string title, string originalTitle,
sqlite3_bind_text(stmt, 1, title.c_str(), -1, SQLITE_TRANSIENT);
sqlite3_bind_text(stmt, 2, originalTitle.c_str(), -1, SQLITE_TRANSIENT);
sqlite3_bind_text(stmt, 3, overview.c_str(), -1, SQLITE_TRANSIENT);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
}
void cTVScraperDB::InsertEventMovie(int eventID, time_t validTill, int movieID) {
@@ -362,7 +362,7 @@ void cTVScraperDB::InsertEventMovie(int eventID, time_t validTill, int movieID)
sql << ");";
sqlite3_stmt *stmt;
sqlite3_prepare_v2(db, sql.str().c_str(), -1, &stmt, NULL);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
}
@@ -375,7 +375,7 @@ void cTVScraperDB::InsertMovieActor(int movieID, int actorID, string name, strin
sqlite3_stmt *stmt;
sqlite3_prepare_v2(db, sql.str().c_str(), -1, &stmt, NULL);
sqlite3_bind_text(stmt, 1, name.c_str(), -1, SQLITE_TRANSIENT);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
stringstream sql2;
sql2 << "INSERT INTO actor_movie (actor_id, movie_id, actor_role) ";
@@ -385,7 +385,7 @@ void cTVScraperDB::InsertMovieActor(int movieID, int actorID, string name, strin
sqlite3_stmt *stmt2;
sqlite3_prepare_v2(db, sql2.str().c_str(), -1, &stmt2, NULL);
sqlite3_bind_text(stmt2, 1, role.c_str(), -1, SQLITE_TRANSIENT);
- ret = sqlite3_step(stmt2);
+ sqlite3_step(stmt2);
}
bool cTVScraperDB::MovieExists(int movieID) {
@@ -458,7 +458,7 @@ void cTVScraperDB::InsertRecording(int recEventID, int seriesID, int movieID) {
sql << ");";
sqlite3_stmt *stmt;
sqlite3_prepare_v2(db, sql.str().c_str(), -1, &stmt, NULL);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
}
bool cTVScraperDB::SetRecordingSeries(int eventID) {
@@ -498,7 +498,7 @@ void cTVScraperDB::ClearRecordings(void) {
sql << "DELETE FROM recordings where 0 = 0";
sqlite3_stmt *stmt;
sqlite3_prepare_v2(db, sql.str().c_str(), -1, &stmt, NULL);
- int ret = sqlite3_step(stmt);
+ sqlite3_step(stmt);
}
bool cTVScraperDB::CheckScrap(time_t timeStamp, string channelID) {