From 0a46ad7ba079ba401d9dc268dac6895d3d1fc8d0 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 9 Jan 2024 20:16:40 +0100 Subject: [PATCH] moviedb: outsource moviedb sources into own subdir --- configure.ac | 1 + src/Makefile.am | 1 + src/gui/Makefile.am | 4 +--- src/gui/epgview.h | 4 ++-- src/gui/moviebrowser/mb.cpp | 4 ++-- src/gui/moviedb/Makefile.am | 23 +++++++++++++++++++++++ src/gui/{ => moviedb}/mdb-imdb.cpp | 0 src/gui/{ => moviedb}/mdb-imdb.h | 0 src/gui/{ => moviedb}/mdb-tmdb.cpp | 11 ++++++----- src/gui/{ => moviedb}/mdb-tmdb.h | 3 +-- 10 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 src/gui/moviedb/Makefile.am rename src/gui/{ => moviedb}/mdb-imdb.cpp (100%) rename src/gui/{ => moviedb}/mdb-imdb.h (100%) rename src/gui/{ => moviedb}/mdb-tmdb.cpp (94%) rename src/gui/{ => moviedb}/mdb-tmdb.h (95%) diff --git a/configure.ac b/configure.ac index 61136c2ac..7a8e954c6 100644 --- a/configure.ac +++ b/configure.ac @@ -650,6 +650,7 @@ src/gui/Makefile src/gui/bedit/Makefile src/gui/components/Makefile src/gui/lua/Makefile +src/gui/moviedb/Makefile src/gui/moviebrowser/Makefile src/gui/widget/Makefile src/gui/widget/yaft/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 78d5caf0f..878979295 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,6 +82,7 @@ neutrino_LDADD = \ driver/movieinfo.o \ gui/moviebrowser/mb.o \ gui/libneutrino_gui2.a \ + gui/moviedb/libneutrino_gui_moviedb.a \ gui/components/libneutrino_gui_components.a \ $(LUALIBS) \ eitd/libsectionsd.a \ diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 0218b4a09..a4cafa832 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -13,7 +13,7 @@ version.h: noinst_HEADERS = version.h .PHONY: version.h -SUBDIRS = bedit components moviebrowser widget +SUBDIRS = bedit components moviebrowser moviedb widget if ENABLE_LUA SUBDIRS += lua @@ -65,8 +65,6 @@ libneutrino_gui_a_SOURCES = \ infoviewer.cpp \ infoviewer_bb.cpp \ keybind_setup.cpp \ - mdb-imdb.cpp \ - mdb-tmdb.cpp \ mediaplayer.cpp \ mediaplayer_setup.cpp \ miscsettings_menu.cpp \ diff --git a/src/gui/epgview.h b/src/gui/epgview.h index 11e20c102..49c90a02b 100644 --- a/src/gui/epgview.h +++ b/src/gui/epgview.h @@ -35,8 +35,8 @@ #include -#include "mdb-imdb.h" -#include "mdb-tmdb.h" +#include "moviedb/mdb-imdb.h" +#include "moviedb/mdb-tmdb.h" #include #include "widget/menue.h" #include "widget/navibar.h" diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 2aff85a6f..4b3d8009f 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -51,8 +51,8 @@ #include "mb_functions.h" #include "mb_help.h" #include -#include -#include +#include +#include #include #include #include diff --git a/src/gui/moviedb/Makefile.am b/src/gui/moviedb/Makefile.am new file mode 100644 index 000000000..e2ab0200c --- /dev/null +++ b/src/gui/moviedb/Makefile.am @@ -0,0 +1,23 @@ +AM_CPPFLAGS = -fno-rtti -fno-exceptions -D__STDC_FORMAT_MACROS + +AM_CPPFLAGS += \ + -I$(top_builddir) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/zapit/include \ + -I$(top_srcdir)/lib \ + -I$(top_srcdir)/lib/libeventserver \ + -I$(top_srcdir)/lib/libconfigfile \ + -I$(top_srcdir)/lib/xmltree \ + -I$(top_srcdir)/lib/jsoncpp \ + @SIGC_CFLAGS@ \ + @FREETYPE_CFLAGS@ \ + @LUA_CFLAGS@ \ + @HWLIB_CFLAGS@ + +noinst_LIBRARIES = libneutrino_gui_moviedb.a + + +libneutrino_gui_moviedb_a_SOURCES = \ + mdb-imdb.cpp \ + mdb-tmdb.cpp diff --git a/src/gui/mdb-imdb.cpp b/src/gui/moviedb/mdb-imdb.cpp similarity index 100% rename from src/gui/mdb-imdb.cpp rename to src/gui/moviedb/mdb-imdb.cpp diff --git a/src/gui/mdb-imdb.h b/src/gui/moviedb/mdb-imdb.h similarity index 100% rename from src/gui/mdb-imdb.h rename to src/gui/moviedb/mdb-imdb.h diff --git a/src/gui/mdb-tmdb.cpp b/src/gui/moviedb/mdb-tmdb.cpp similarity index 94% rename from src/gui/mdb-tmdb.cpp rename to src/gui/moviedb/mdb-tmdb.cpp index d27838daf..61024775e 100644 --- a/src/gui/mdb-tmdb.cpp +++ b/src/gui/moviedb/mdb-tmdb.cpp @@ -15,8 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ @@ -38,6 +37,7 @@ #include #include #include +#include #include #include #include "mdb-tmdb.h" @@ -183,14 +183,15 @@ bool CTMDB::getMovieDetails(std::string lang, bool second) for (unsigned int i = 0; i < elements.size() && i < 10; i++) { minfo.cast += " " + elements[i].get("character", "").asString() + " (" + elements[i].get("name", "").asString() + ")\n"; - //printf("test: %s (%s)\n",elements[i].get("character","").asString().c_str(),elements[i].get("name","").asString().c_str()); + // dprintf(DEBUG_NORMAL, "[TMDB]: %s (%s)\n", elements[i].get("character","").asString().c_str(), elements[i].get("name","").asString().c_str()); } unlink(posterfile.c_str()); if (hasPoster()) + { getBigPoster(posterfile.c_str()); - //printf("[TMDB]: %s (%s) %s\n %s\n %d\n",minfo.epgtitle.c_str(),minfo.original_title.c_str(),minfo.release_date.c_str(),minfo.overview.c_str(),minfo.found); - + // dprintf(DEBUG_NORMAL, "[TMDB]: %s (%s) %s\n %s\n %d\n", minfo.epgtitle.c_str(), minfo.original_title.c_str(), minfo.release_date.c_str(), minfo.overview.c_str(), minfo.found); + } return true; } } diff --git a/src/gui/mdb-tmdb.h b/src/gui/moviedb/mdb-tmdb.h similarity index 95% rename from src/gui/mdb-tmdb.h rename to src/gui/moviedb/mdb-tmdb.h index 685f1e337..86bca1cab 100644 --- a/src/gui/mdb-tmdb.h +++ b/src/gui/moviedb/mdb-tmdb.h @@ -15,8 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef __TMDB__