mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
- imdb/tmdb: more unifications
Origin commit data
------------------
Branch: ni/coolstream
Commit: a4c9df53a5
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-04-08 (Thu, 08 Apr 2021)
Origin message was:
------------------
- - imdb/tmdb: more unifications
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -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 \
|
||||
|
@@ -133,7 +133,7 @@ CEpgData::CEpgData()
|
||||
|
||||
imdb = CIMDB::getInstance();
|
||||
imdb_active = false;
|
||||
tmdb = cTmdb::getInstance();
|
||||
tmdb = CTMDB::getInstance();
|
||||
tmdb_active = false;
|
||||
movie_filename.clear();
|
||||
}
|
||||
|
@@ -35,8 +35,8 @@
|
||||
|
||||
#include <system/settings.h>
|
||||
|
||||
#include <gui/imdb.h>
|
||||
#include <gui/tmdb.h>
|
||||
#include <gui/mdb-imdb.h>
|
||||
#include <gui/mdb-tmdb.h>
|
||||
#include <driver/movieinfo.h>
|
||||
#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;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
imdb
|
||||
Movie Database - OMDb/IMDb
|
||||
|
||||
(C) 2009-2016 NG-Team
|
||||
(C) 2016 NI-Team
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <unistd.h>
|
||||
#include <json/json.h>
|
||||
|
||||
#include "imdb.h"
|
||||
#include "mdb-imdb.h"
|
||||
|
||||
|
||||
CIMDB::CIMDB()
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
imdb
|
||||
Movie Database - OMDb/IMDb
|
||||
|
||||
(C) 2009-2016 NG-Team
|
||||
(C) 2016 NI-Team
|
@@ -1,4 +1,6 @@
|
||||
/*
|
||||
Movie Database - TMDb
|
||||
|
||||
Copyright (C) 2015-2020 TangoCash
|
||||
|
||||
License: GPLv2
|
||||
@@ -42,17 +44,17 @@
|
||||
|
||||
#include <global.h>
|
||||
|
||||
#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();
|
@@ -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 <string>
|
||||
#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();
|
@@ -51,7 +51,7 @@
|
||||
#include "mb_functions.h"
|
||||
#include "mb_help.h"
|
||||
#include <gui/filebrowser.h>
|
||||
#include <gui/tmdb.h>
|
||||
#include <gui/mdb-tmdb.h>
|
||||
#include <gui/epgview.h>
|
||||
#include <gui/widget/hintbox.h>
|
||||
#include <gui/widget/icons.h>
|
||||
@@ -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);
|
||||
|
@@ -61,7 +61,7 @@
|
||||
#include <gui/widget/progresswindow.h>
|
||||
#include <gui/widget/stringinput_ext.h>
|
||||
#include <gui/widget/keyboard_input.h>
|
||||
#include <gui/imdb.h>
|
||||
#include <gui/mdb-imdb.h>
|
||||
|
||||
#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"
|
||||
|
Reference in New Issue
Block a user