diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index ba40c50a9..64ebc6ac9 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -62,11 +62,12 @@ libneutrino_gui_a_SOURCES = \ filebrowser.cpp \ followscreenings.cpp \ imageinfo_ni.cpp \ - imdb.cpp \ info_menue.cpp \ infoviewer.cpp \ infoviewer_bb.cpp \ keybind_setup.cpp \ + mdb-imdb.cpp \ + mdb-tmdb.cpp \ mediaplayer.cpp \ mediaplayer_setup.cpp \ miscsettings_menu.cpp \ @@ -102,7 +103,6 @@ libneutrino_gui_a_SOURCES = \ subchannel_select.cpp \ themes.cpp \ timeosd.cpp \ - tmdb.cpp \ update.cpp \ update_check.cpp \ update_menue.cpp \ diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 2ef05c228..3ef195aff 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -133,7 +133,7 @@ CEpgData::CEpgData() imdb = CIMDB::getInstance(); imdb_active = false; - tmdb = cTmdb::getInstance(); + tmdb = CTMDB::getInstance(); tmdb_active = false; movie_filename.clear(); } diff --git a/src/gui/epgview.h b/src/gui/epgview.h index 80645cf11..64daf0da2 100644 --- a/src/gui/epgview.h +++ b/src/gui/epgview.h @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include "widget/menue.h" #include "widget/navibar.h" @@ -54,7 +54,7 @@ class CEpgData CChannelEventList followlist; CEPGData epgData; CIMDB *imdb; - cTmdb *tmdb; + CTMDB *tmdb; CComponentsHeader *header; CNaviBar *Bottombox; diff --git a/src/gui/imdb.cpp b/src/gui/mdb-imdb.cpp similarity index 99% rename from src/gui/imdb.cpp rename to src/gui/mdb-imdb.cpp index a38602214..998419433 100644 --- a/src/gui/imdb.cpp +++ b/src/gui/mdb-imdb.cpp @@ -1,5 +1,5 @@ /* - imdb + Movie Database - OMDb/IMDb (C) 2009-2016 NG-Team (C) 2016 NI-Team @@ -37,7 +37,7 @@ #include #include -#include "imdb.h" +#include "mdb-imdb.h" CIMDB::CIMDB() diff --git a/src/gui/imdb.h b/src/gui/mdb-imdb.h similarity index 98% rename from src/gui/imdb.h rename to src/gui/mdb-imdb.h index 9c421f882..db51a123c 100644 --- a/src/gui/imdb.h +++ b/src/gui/mdb-imdb.h @@ -1,5 +1,5 @@ /* - imdb + Movie Database - OMDb/IMDb (C) 2009-2016 NG-Team (C) 2016 NI-Team diff --git a/src/gui/tmdb.cpp b/src/gui/mdb-tmdb.cpp similarity index 93% rename from src/gui/tmdb.cpp rename to src/gui/mdb-tmdb.cpp index 5620c4f40..296527d79 100644 --- a/src/gui/tmdb.cpp +++ b/src/gui/mdb-tmdb.cpp @@ -1,4 +1,6 @@ /* + Movie Database - TMDb + Copyright (C) 2015-2020 TangoCash License: GPLv2 @@ -42,17 +44,17 @@ #include -#include "tmdb.h" +#include "mdb-tmdb.h" -cTmdb* cTmdb::getInstance() +CTMDB* CTMDB::getInstance() { - static cTmdb* tmdb = NULL; + static CTMDB* tmdb = NULL; if(!tmdb) - tmdb = new cTmdb(); + tmdb = new CTMDB(); return tmdb; } -cTmdb::cTmdb() +CTMDB::CTMDB() { #ifdef TMDB_API_KEY key = TMDB_API_KEY; @@ -62,12 +64,12 @@ cTmdb::cTmdb() hintbox = NULL; } -cTmdb::~cTmdb() +CTMDB::~CTMDB() { cleanup(); } -void cTmdb::setTitle(std::string epgtitle) +void CTMDB::setTitle(std::string epgtitle) { minfo.epgtitle = epgtitle; @@ -86,7 +88,7 @@ void cTmdb::setTitle(std::string epgtitle) } } -bool cTmdb::GetData(std::string url, Json::Value *root) +bool CTMDB::GetData(std::string url, Json::Value *root) { std::string answer; if (!getUrl(url, answer)) @@ -102,7 +104,7 @@ bool cTmdb::GetData(std::string url, Json::Value *root) return true; } -bool cTmdb::GetMovieDetails(std::string lang, bool second) +bool CTMDB::GetMovieDetails(std::string lang, bool second) { printf("[TMDB]: %s\n",__func__); Json::Value root; @@ -189,7 +191,7 @@ bool cTmdb::GetMovieDetails(std::string lang, bool second) return false; } -std::string cTmdb::CreateEPGText() +std::string CTMDB::CreateEPGText() { std::string epgtext(""); @@ -212,7 +214,7 @@ std::string cTmdb::CreateEPGText() return epgtext; } -std::string cTmdb::CreateMovieText() +std::string CTMDB::CreateMovieText() { std::string movietext(""); @@ -230,13 +232,13 @@ std::string cTmdb::CreateMovieText() return movietext; } -void cTmdb::cleanup() +void CTMDB::cleanup() { if (access(TMDB_COVER, F_OK) == 0) unlink(TMDB_COVER); } -void cTmdb::selectResult(Json::Value elements, int results, int &use_result) +void CTMDB::selectResult(Json::Value elements, int results, int &use_result) { if(hintbox){ hintbox->hide(); diff --git a/src/gui/tmdb.h b/src/gui/mdb-tmdb.h similarity index 95% rename from src/gui/tmdb.h rename to src/gui/mdb-tmdb.h index fc7199357..90482b1b9 100644 --- a/src/gui/tmdb.h +++ b/src/gui/mdb-tmdb.h @@ -1,4 +1,6 @@ /* + Movie Database - TMDb + Copyright (C) 2015-2020 TangoCash License: GPLv2 @@ -17,8 +19,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __TMDB__ -#define __TMDB__ +#ifndef __tmdb__ +#define __tmdb__ #include #include "system/helpers.h" @@ -46,7 +48,7 @@ typedef struct { std::string cast; }tmdbinfo; -class cTmdb +class CTMDB { private: tmdbinfo minfo; @@ -57,9 +59,9 @@ class cTmdb void selectResult(Json::Value elements, int results, int &used_result); public: - cTmdb(); - ~cTmdb(); - static cTmdb* getInstance(); + CTMDB(); + ~CTMDB(); + static CTMDB* getInstance(); void setTitle(std::string epgtitle); std::string CreateEPGText(); std::string CreateMovieText(); diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 2b4048d3f..d6892b509 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -51,7 +51,7 @@ #include "mb_functions.h" #include "mb_help.h" #include -#include +#include #include #include #include @@ -2170,7 +2170,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) extension = "." + extension; str_replace(extension, ".jpg", cover_file); printf("TMDB: %s : %s\n",m_movieSelectionHandler->file.Name.c_str(),cover_file.c_str()); - cTmdb* tmdb = cTmdb::getInstance(); + CTMDB* tmdb = CTMDB::getInstance(); if (tmdb) { tmdb->setTitle(m_movieSelectionHandler->epgTitle); diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index 7cf213de5..829066def 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -61,7 +61,7 @@ #include #include #include -#include +#include #define MAX_NUMBER_OF_BOOKMARK_ITEMS MI_MOVIE_BOOK_USER_MAX // we just use the same size as used in Movie info (MAX_NUMBER_OF_BOOKMARK_ITEMS is used for the number of menu items) #define MOVIEBROWSER_SETTINGS_FILE CONFIGDIR "/moviebrowser.conf"