Commit b2b93741 authored by Victor Toso's avatar Victor Toso

thetvdb: Include The TVDB source

https://bugzilla.gnome.org/show_bug.cgi?id=672933
parent f7582948
......@@ -53,6 +53,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-apple-trailers \
--enable-optical-media \
--enable-pocket \
--enable-podcasts \
--enable-thetvdb \
--enable-tmdb \
--enable-tracker \
--enable-upnp \
......
......@@ -1272,6 +1272,55 @@ AC_SUBST(DEPS_DMAP_CFLAGS)
DEPS_DMAP_LIBS="$DEPS_LIBS $DMAP_LIBS $XML_LIBS"
AC_SUBST(DEPS_DMAP_LIBS)
# ----------------------------------------------------------
# BUILD THETVDB PLUGIN
# ----------------------------------------------------------
AC_ARG_ENABLE(thetvdb,
AC_HELP_STRING([--enable-thetvdb],
[enable thetvdb plugin (default: auto)]),
[
case "$enableval" in
yes)
if test "x$HAVE_GRLNET" = "xno"; then
AC_MSG_ERROR([grilo-net-0.2 >= 0.2.2 not found, install it or use --disable-thetvdb])
fi
if test "x$HAVE_XML" = "xno"; then
AC_MSG_ERROR([libxml-2.0 not found, install it or use --disable-thetvdb])
fi
if test "x$HAVE_ARCHIVE" = "xno"; then
AC_MSG_ERROR([libarchive not found, install it or use --disable-thetvdb])
fi
if test "x$HAVE_GOM" = "xno"; then
AC_MSG_ERROR([gom-1.0 not found, install it or use --disable-thetvdb])
fi
;;
esac
],
[
if test "x$HAVE_GRLNET" = "xyes" -a "x$HAVE_XML" = "xyes" -a "x$HAVE_ARCHIVE" = "xyes" -a "x$HAVE_GOM" = "xyes"; then
enable_thetvdb=yes
else
enable_thetvdb=no
fi
])
AM_CONDITIONAL([THETVDB_PLUGIN], [test "x$enable_thetvdb" = "xyes"])
GRL_PLUGINS_ALL="$GRL_PLUGINS_ALL thetvdb"
if test "x$enable_thetvdb" = "xyes"
then
GRL_PLUGINS_ENABLED="$GRL_PLUGINS_ENABLED thetvdb"
fi
THETVDB_PLUGIN_ID="grl-thetvdb"
AC_SUBST(THETVDB_PLUGIN_ID)
AC_DEFINE_UNQUOTED([THETVDB_PLUGIN_ID], ["$THETVDB_PLUGIN_ID"], [thetvdb plugin ID])
DEPS_THETVDB_CFLAGS="$DEPS_CFLAGS $ARCHIVE_CFLAGS $GRLNET_CFLAGS $XML_CFLAGS $GOM_CFLAGS"
AC_SUBST(DEPS_THETVDB_CFLAGS)
DEPS_THETVDB_LIBS="$DEPS_LIBS $ARCHIVE_LIBS $GRLNET_LIBS $XML_LIBS $GOM_LIBS"
AC_SUBST(DEPS_THETVDB_LIBS)
# ----------------------------------------------------------
# BUILD TMDB PLUGIN
# ----------------------------------------------------------
......@@ -1399,6 +1448,7 @@ AC_CONFIG_FILES([
src/lua-factory/Makefile
src/lua-factory/sources/Makefile
src/magnatune/Makefile
src/thetvdb/Makefile
src/metadata-store/Makefile
src/optical-media/Makefile
src/pocket/Makefile
......@@ -1416,6 +1466,7 @@ AC_CONFIG_FILES([
tests/dleyna/Makefile
tests/dleyna/dbusmock/dleyna-server-mock.service
tests/local-metadata/Makefile
tests/thetvdb/Makefile
tests/tmdb/Makefile
tests/vimeo/Makefile
])
......
......@@ -86,6 +86,10 @@ if SHOUTCAST_PLUGIN
SUBDIRS += shoutcast
endif
if THETVDB_PLUGIN
SUBDIRS += thetvdb
endif
if TMDB_PLUGIN
SUBDIRS += tmdb
endif
......@@ -113,7 +117,7 @@ endif
DIST_SUBDIRS = \
apple-trailers bliptv bookmarks dleyna dmap filesystem flickr freebox gravatar jamendo \
lastfm-albumart local-metadata lua-factory magnatune metadata-store optical-media \
pocket podcasts raitv shoutcast tmdb tracker upnp vimeo youtube
pocket podcasts raitv shoutcast thetvdb tmdb tracker upnp vimeo youtube
MAINTAINERCLEANFILES = \
*.in \
......
#
# Makefile.am
#
# Author: Victor Toso <me@victortoso.com>
#
# Copyright (C) 2014 Victor Toso. All rights reserved.
include $(top_srcdir)/gtester.mk
ext_LTLIBRARIES = libgrlthetvdb.la
libgrlthetvdb_la_CFLAGS = \
$(DEPS_THETVDB_CFLAGS) \
-DG_LOG_DOMAIN=\"GrlTheTVDB\" \
-DLOCALEDIR=\"$(localedir)\"
libgrlthetvdb_la_LIBADD = \
$(DEPS_THETVDB_LIBS)
libgrlthetvdb_la_LDFLAGS = \
-no-undefined \
-module \
-avoid-version
libgrlthetvdb_la_SOURCES = \
grl-thetvdb.c \
grl-thetvdb.h \
thetvdb-resources-series.c \
thetvdb-resources-episodes.c \
thetvdb-resources.h
extdir = $(GRL_PLUGINS_DIR)
thetvdbxmldir = $(GRL_PLUGINS_DIR)
thetvdbxml_DATA = $(THETVDB_PLUGIN_ID).xml
# Rules to enable tests
copy-xml-to-libs-dir: libgrlthetvdb.la
cp -f $(srcdir)/$(thetvdbxml_DATA) $(builddir)/.libs/
all-local: copy-xml-to-libs-dir
EXTRA_DIST = $(thetvdbxml_DATA)
MAINTAINERCLEANFILES = \
*.in \
*~
DISTCLEANFILES = $(MAINTAINERCLEANFILES)
This diff is collapsed.
/*
* Copyright (C) 2014 Victor Toso.
*
* Contact: Victor Toso <me@victortoso.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef _GRL_THETVDB_SOURCE_H_
#define _GRL_THETVDB_SOURCE_H_
#include <grilo.h>
#define GRL_THETVDB_SOURCE_TYPE \
(grl_thetvdb_source_get_type ())
#define GRL_THETVDB_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
GRL_THETVDB_SOURCE_TYPE, \
GrlTheTVDBSource))
#define GRL_THETVDB_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
GRL_THETVDB_SOURCE_TYPE, \
GrlTheTVDBSourceClass))
#define GRL_IS_THETVDB_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), \
GRL_THETVDB_SOURCE_TYPE))
#define GRL_THETVDB_SOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GRL_THETVDB_SOURCE_TYPE, \
GrlTheTVDBSourceClass))
typedef struct _GrlTheTVDBPrivate GrlTheTVDBPrivate;
typedef struct _GrlTheTVDBSource GrlTheTVDBSource;
struct _GrlTheTVDBSource {
GrlSource parent;
GrlTheTVDBPrivate *priv;
};
typedef struct _GrlTheTVDBSourceClass GrlTheTVDBSourceClass;
struct _GrlTheTVDBSourceClass {
GrlSourceClass parent_class;
};
GType grl_thetvdb_source_get_type (void);
#endif /* _GRL_THETVDB_SOURCE_H_ */
<plugin>
<info>
<name>The TVDB</name>
<module>libgrlthetvdb</module>
<description>A plugin for fetching metadata of television shows</description>
<author>Victor Toso</author>
<license>LGPL</license>
<site>http://victortoso.com</site>
</info>
</plugin>
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (C) 2014 Victor Toso.
*
* Contact: Victor Toso <me@victortoso.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef _GRL_THETVDB_RESOURCEs_H_
#define _GRL_THETVDB_RESOURCEs_H_
#include <gom/gom.h>
/*----- Series ----- */
#define SERIES_TYPE_RESOURCE \
(series_resource_get_type())
#define SERIES_TYPE_TYPE \
(series_type_get_type())
#define SERIES_RESOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
SERIES_TYPE_RESOURCE, \
SeriesResource))
#define SERIES_RESOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
SERIES_TYPE_RESOURCE, \
SeriesResourceClass))
#define SERIES_IS_RESOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
SERIES_TYPE_RESOURCE))
#define SERIES_IS_RESOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
SERIES_TYPE_RESOURCE))
#define SERIES_RESOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
SERIES_TYPE_RESOURCE, \
SeriesResourceClass))
#define SERIES_COLUMN_ID "id"
#define SERIES_COLUMN_LANGUAGE "language"
#define SERIES_COLUMN_SERIES_NAME "series-name"
#define SERIES_COLUMN_SERIES_ID "series-id"
#define SERIES_COLUMN_STATUS "status"
#define SERIES_COLUMN_OVERVIEW "overview"
#define SERIES_COLUMN_IMDB_ID "imdb-id"
#define SERIES_COLUMN_ZAP2IT_ID "zap2it-id"
#define SERIES_COLUMN_FIRST_AIRED "first-aired"
#define SERIES_COLUMN_RATING "rating"
#define SERIES_COLUMN_ACTOR_NAMES "actor-names"
#define SERIES_COLUMN_GENRES "genres"
#define SERIES_COLUMN_URL_BANNER "url-banner"
#define SERIES_COLUMN_URL_FANART "url-fanart"
#define SERIES_COLUMN_URL_POSTER "url-poster"
typedef struct _SeriesResource SeriesResource;
typedef struct _SeriesResourceClass SeriesResourceClass;
typedef struct _SeriesResourcePrivate SeriesResourcePrivate;
struct _SeriesResource
{
GomResource parent;
SeriesResourcePrivate *priv;
};
struct _SeriesResourceClass
{
GomResourceClass parent_class;
};
GType series_resource_get_type (void);
/*----- Episodes ----- */
#define EPISODE_TYPE_RESOURCE \
(episode_resource_get_type())
#define EPISODE_TYPE_TYPE \
(episode_type_get_type())
#define EPISODE_RESOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
EPISODE_TYPE_RESOURCE, \
EpisodeResource))
#define EPISODE_RESOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
EPISODE_TYPE_RESOURCE, \
EpisodeResourceClass))
#define EPISODE_IS_RESOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
EPISODE_TYPE_RESOURCE))
#define EPISODE_IS_RESOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
EPISODE_TYPE_RESOURCE))
#define EPISODE_RESOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
EPISODE_TYPE_RESOURCE, \
EpisodeResourceClass))
#define EPISODE_COLUMN_ID "id"
#define EPISODE_COLUMN_LANGUAGE "language"
#define EPISODE_COLUMN_SERIES_ID "series-id"
#define EPISODE_COLUMN_OVERVIEW "overview"
#define EPISODE_COLUMN_IMDB_ID "imdb-id"
#define EPISODE_COLUMN_FIRST_AIRED "first-aired"
#define EPISODE_COLUMN_RATING "rating"
#define EPISODE_COLUMN_SEASON_NUMBER "season-number"
#define EPISODE_COLUMN_EPISODE_NUMBER "episode-number"
#define EPISODE_COLUMN_ABSOLUTE_NUMBER "absolute-number"
#define EPISODE_COLUMN_SEASON_ID "season-id"
#define EPISODE_COLUMN_EPISODE_ID "episode-id"
#define EPISODE_COLUMN_EPISODE_NAME "episode-name"
#define EPISODE_COLUMN_URL_EPISODE_SCREEN "url-episode-screen"
#define EPISODE_COLUMN_DIRECTOR_NAMES "director-names"
#define EPISODE_COLUMN_GUEST_STARS_NAMES "guest-stars-names"
typedef struct _EpisodeResource EpisodeResource;
typedef struct _EpisodeResourceClass EpisodeResourceClass;
typedef struct _EpisodeResourcePrivate EpisodeResourcePrivate;
struct _EpisodeResource
{
GomResource parent;
EpisodeResourcePrivate *priv;
};
struct _EpisodeResourceClass
{
GomResourceClass parent_class;
};
GType episode_resource_get_type (void);
#endif /* _GRL_THETVDB_RESOURCES_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment