summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVictor Toso <me@victortoso.com>2015-08-27 10:46:15 +0200
committerJuan A. Suarez Romero <jasuarez@igalia.com>2015-09-06 16:13:53 +0200
commitb81f6ed74258ce75a141499e241a747f3e559d1d (patch)
treeab7bee8b27f5f7d0d3195618942697ffe3fe5caf /src
parentd664603a4c5d5664beee6dc18c0ed5b6aa1bcb4a (diff)
downloadgrilo-plugins-b81f6ed74258ce75a141499e241a747f3e559d1d.tar.gz
bliptv: Remove source
As stated in the blip.tv/shutdown/message.html "Dear Blip User, Blip was closed on Thursday, August 20, 2015. As you may know, Blip was acquired by Maker Studios in September 2013 and the acquisition has allowed for additional, more expansive direct-to-consumer tools and products for content creators across the network. If you are a creator and you have a YouTube channel, we encourage you to apply to the Maker Gen network to take advantage of Maker’s tools and services. Signup can be found here: https://max.makerstudios.com/. If you are a viewer, we encourage you to check out the great content from Maker talent at our new flagship site: http://maker.tv/ We thank you for being a great partner to Blip! Blip Support" This source does not work anymore. https://bugzilla.gnome.org/show_bug.cgi?id=725031
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am6
-rw-r--r--src/bliptv/Makefile.am55
-rw-r--r--src/bliptv/bliptv.gresource.xml6
-rw-r--r--src/bliptv/channel-bliptv.svg127
-rw-r--r--src/bliptv/grl-bliptv.c567
-rw-r--r--src/bliptv/grl-bliptv.h79
-rw-r--r--src/bliptv/grl-bliptv.xml10
7 files changed, 1 insertions, 849 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index cfc25bd..30e647c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,10 +10,6 @@ include $(top_srcdir)/gtester.mk
SUBDIRS =
-if BLIPTV_PLUGIN
-SUBDIRS += bliptv
-endif
-
if BOOKMARKS_PLUGIN
SUBDIRS += bookmarks
endif
@@ -107,7 +103,7 @@ SUBDIRS += opensubtitles
endif
DIST_SUBDIRS = \
- bliptv bookmarks dleyna dmap filesystem flickr freebox gravatar jamendo \
+ bookmarks dleyna dmap filesystem flickr freebox gravatar jamendo \
lastfm-albumart local-metadata lua-factory magnatune metadata-store opensubtitles \
optical-media podcasts raitv shoutcast thetvdb tmdb tracker vimeo youtube
diff --git a/src/bliptv/Makefile.am b/src/bliptv/Makefile.am
deleted file mode 100644
index b6b16da..0000000
--- a/src/bliptv/Makefile.am
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Makefile.am
-#
-# Author: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
-#
-# Copyright (C) 2011 Intel Corporation.
-# Copyright (C) 2011 Igalia S.L.
-
-include $(top_srcdir)/gtester.mk
-
-ext_LTLIBRARIES = libgrlbliptv.la
-
-libgrlbliptv_la_CFLAGS = \
- $(DEPS_BLIPTV_CFLAGS) \
- -DG_LOG_DOMAIN=\"GrlBlipTv\" \
- -DLOCALEDIR=\"$(localedir)\"
-
-libgrlbliptv_la_LIBADD = \
- $(DEPS_BLIPTV_LIBS)
-
-libgrlbliptv_la_LDFLAGS = \
- -no-undefined \
- -module \
- -avoid-version
-
-libgrlbliptv_la_SOURCES = \
- grl-bliptv.c \
- grl-bliptv.h \
- bliptvresources.h \
- bliptvresources.c
-
-extdir = $(GRL_PLUGINS_DIR)
-bliptvxmldir = $(GRL_PLUGINS_DIR)
-bliptvxml_DATA = $(BLIPTV_PLUGIN_ID).xml
-
-# This lets us test the plugin without installing it,
-# because grilo expects the .so and .xml files to be in
-# the same directory:
-copy-xml-to-libs-dir: libgrlbliptv.la
- cp -f $(srcdir)/$(bliptvxml_DATA) $(builddir)/.libs/
-
-all-local: copy-xml-to-libs-dir
-
-bliptvresources.h: bliptv.gresource.xml
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/bliptv.gresource.xml \
- --target=$@ --sourcedir=$(srcdir) --c-name _grl_bliptv --generate-header
-bliptvresources.c: bliptv.gresource.xml bliptvresources.h channel-bliptv.svg
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/bliptv.gresource.xml \
- --target=$@ --sourcedir=$(srcdir) --c-name _grl_bliptv --generate-source
-
-EXTRA_DIST += $(bliptvxml_DATA) channel-bliptv.svg bliptv.gresource.xml
-
-CLEANFILES = bliptvresources.h bliptvresources.c
-
--include $(top_srcdir)/git.mk
diff --git a/src/bliptv/bliptv.gresource.xml b/src/bliptv/bliptv.gresource.xml
deleted file mode 100644
index 8af7be4..0000000
--- a/src/bliptv/bliptv.gresource.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gresources>
- <gresource prefix="/org/gnome/grilo/plugins/bliptv">
- <file compressed="false">channel-bliptv.svg</file>
- </gresource>
-</gresources>
diff --git a/src/bliptv/channel-bliptv.svg b/src/bliptv/channel-bliptv.svg
deleted file mode 100644
index 99cd0fe..0000000
--- a/src/bliptv/channel-bliptv.svg
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="256"
- height="256"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.4 r9939"
- sodipodi:docname="channel-rai.svg">
- <defs
- id="defs4">
- <clipPath
- id="clipPath6193"
- clipPathUnits="userSpaceOnUse">
- <path
- id="path6195"
- d="m 1600,2252.8 5020,0 0,3650 -5020,0 0,-3650 z" />
- </clipPath>
- <linearGradient
- id="linearGradient6181"
- spreadMethod="pad"
- gradientTransform="matrix(-3.593e-5,822,822,3.593e-5,411,0)"
- gradientUnits="userSpaceOnUse"
- y2="0"
- x2="1"
- y1="0"
- x1="0">
- <stop
- id="stop6183"
- offset="0"
- style="stop-opacity:1;stop-color:#c01e25" />
- <stop
- id="stop6185"
- offset="1"
- style="stop-opacity:1;stop-color:#e62426" />
- </linearGradient>
- <clipPath
- id="clipPath6177"
- clipPathUnits="userSpaceOnUse">
- <path
- id="path6179"
- d="M 8220,0 0,0 l 0,8220 8220,0 0,-8220 m -6620,5902.8 0,-3650 5020,0 0,3650 -5020,0" />
- </clipPath>
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#505050"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="222.0001"
- inkscape:cy="70.020428"
- inkscape:document-units="px"
- inkscape:current-layer="g7288"
- showgrid="false"
- borderlayer="true"
- inkscape:showpageshadow="false"
- inkscape:window-width="2560"
- inkscape:window-height="1374"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-796.36218)">
- <g
- transform="matrix(630.025,0,0,-458.9,-77.5125,1218.8747)"
- id="g6197" />
- <g
- id="g7288"
- transform="translate(551.5,989.9982)">
- <g
- id="g7299"
- transform="matrix(0.89344262,0,0,0.89344262,-396.25,-32.797277)">
- <path
- transform="matrix(0.9172932,0,0,0.9172932,-479.97369,-175.98184)"
- d="m 623,153 c 0,73.45387 -59.54613,133 -133,133 -73.45387,0 -133,-59.54613 -133,-133 0,-73.453872 59.54613,-133 133,-133 73.45387,0 133,59.546128 133,133 z"
- sodipodi:ry="133"
- sodipodi:rx="133"
- sodipodi:cy="153"
- sodipodi:cx="490"
- id="path7297"
- style="color:#000000;fill:#e22a26;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:type="arc" />
- <g
- transform="matrix(2.4651519,0,0,2.4651519,-152.67447,-132)"
- id="g7271">
- <g
- id="Layer_2">
- <g
- id="g7276">
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- d="m 61.397,15.688 c -0.672,-2.514 -3.253,-4.007 -5.767,-3.336 -2.515,0.671 -4.008,3.253 -3.336,5.767 0.67,2.514 3.252,4.007 5.767,3.335 2.512,-0.67 4.006,-3.252 3.336,-5.766 l 0,0 z M 73.37,40.919 c -2.304,0.615 -4.668,-0.753 -5.283,-3.056 -0.615,-2.302 0.753,-4.667 3.057,-5.282 2.303,-0.615 4.668,0.753 5.282,3.056 0.614,2.303 -0.754,4.667 -3.056,5.282 l 0,0 z M 69.122,25.008 c -6.485,1.731 -10.339,8.392 -8.607,14.876 0.002,0.004 5.346,20.04 5.346,20.04 l 7.504,-2.004 -2.427,-9.091 c 1.452,0.159 2.957,0.061 4.454,-0.339 6.484,-1.73 10.337,-8.392 8.605,-14.876 C 82.266,27.13 75.606,23.277 69.122,25.008 l 0,0 z M 29.873,52.532 c -2.303,0.615 -4.668,-0.752 -5.283,-3.056 -0.614,-2.303 0.753,-4.667 3.056,-5.282 2.303,-0.615 4.667,0.754 5.282,3.057 0.616,2.302 -0.752,4.667 -3.055,5.281 l 0,0 z M 25.625,36.623 c -1.497,0.4 -2.851,1.064 -4.031,1.926 l -2.427,-9.09 -7.504,2.004 c 0,0 5.354,20.033 5.355,20.036 1.731,6.484 8.392,10.339 14.876,8.607 C 38.378,58.375 42.231,51.713 40.5,45.229 38.769,38.745 32.109,34.891 25.625,36.623 l 0,0 z m 28.703,16.993 7.504,-2.004 -6.021,-22.547 -7.504,2.004 6.021,22.547 0,0 z m -9.516,2.54 7.504,-2.004 -8.36,-31.312 -7.504,2.004 8.36,31.312 0,0 z"
- id="path7278" />
- </g>
- </g>
- </g>
- </g>
- </g>
- </g>
-</svg>
diff --git a/src/bliptv/grl-bliptv.c b/src/bliptv/grl-bliptv.c
deleted file mode 100644
index a9a19fb..0000000
--- a/src/bliptv/grl-bliptv.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
- * Copyright (C) 2011 Igalia S.L.
- * Copyright (C) 2011 Intel Corporation.
- *
- * Contact: Iago Toral Quiroga <itoral@igalia.com>
- *
- * Authors: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.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
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "grl-bliptv.h"
-
-#include <net/grl-net.h>
-
-#include <glib/gi18n-lib.h>
-#include <libxml/parser.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
-
-
-/* --------- Logging -------- */
-
-#define GRL_LOG_DOMAIN_DEFAULT bliptv_log_domain
-GRL_LOG_DOMAIN_STATIC(bliptv_log_domain);
-
-
-/* ----------- API ---------- */
-
-#define MAX_ELEMENTS 100
-
-#define BLIPTV_BACKEND "http://blip.tv"
-#define BLIPTV_BROWSE BLIPTV_BACKEND "/posts?skin=rss&page=%u"
-#define BLIPTV_SEARCH BLIPTV_BACKEND "/posts?search=%s&skin=rss&page=%%u"
-
-/* --- Plugin information --- */
-
-#define PLUGIN_ID BLIPTV_PLUGIN_ID
-
-#define SOURCE_ID "grl-bliptv"
-#define SOURCE_NAME "Blip.tv"
-#define SOURCE_DESC _("A source for browsing and searching Blip.tv videos")
-
-
-G_DEFINE_TYPE (GrlBliptvSource, grl_bliptv_source, GRL_TYPE_SOURCE)
-
-#define BLIPTV_SOURCE_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
- GRL_TYPE_BLIPTV_SOURCE, \
- GrlBliptvSourcePrivate))
-
-struct _GrlBliptvSourcePrivate
-{
- GrlNetWc *wc;
-};
-
-typedef struct
-{
- GrlSource *source;
- guint operation_id;
- guint count;
- guint skip;
- guint page;
- gchar *url;
-
- GrlSourceResultCb callback;
- gpointer user_data;
-
- GCancellable *cancellable;
-} BliptvOperation;
-
-typedef struct
-{
- GrlKeyID grl_key;
- const gchar *exp;
-} BliptvAssoc;
-
-/**/
-
-static GList *bliptv_mappings = NULL;
-
-static void bliptv_setup_mapping (void);
-
-static GrlBliptvSource *grl_bliptv_source_new (void);
-
-gboolean grl_bliptv_plugin_init (GrlRegistry *registry,
- GrlPlugin *plugin,
- GList *configs);
-
-static const GList *grl_bliptv_source_supported_keys (GrlSource *source);
-
-static void grl_bliptv_source_browse (GrlSource *source,
- GrlSourceBrowseSpec *bs);
-
-static void grl_bliptv_source_search (GrlSource *source,
- GrlSourceSearchSpec *ss);
-
-static void grl_bliptv_source_cancel (GrlSource *source,
- guint operation_id);
-
-/**/
-
-gboolean
-grl_bliptv_plugin_init (GrlRegistry *registry,
- GrlPlugin *plugin,
- GList *configs)
-{
- GRL_LOG_DOMAIN_INIT (bliptv_log_domain, "bliptv");
-
- /* Initialize i18n */
- bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-
- bliptv_setup_mapping ();
-
- GrlBliptvSource *source = grl_bliptv_source_new ();
- grl_registry_register_source (registry,
- plugin,
- GRL_SOURCE (source),
- NULL);
- return TRUE;
-}
-
-GRL_PLUGIN_REGISTER (grl_bliptv_plugin_init,
- NULL,
- PLUGIN_ID);
-
-
-/* ================== Blip.tv GObject ================ */
-
-static GrlBliptvSource *
-grl_bliptv_source_new (void)
-{
- GIcon *icon;
- GFile *file;
- GrlBliptvSource *source;
- const char *tags[] = {
- "net:internet",
- NULL
- };
-
- file = g_file_new_for_uri ("resource:///org/gnome/grilo/plugins/bliptv/channel-bliptv.svg");
- icon = g_file_icon_new (file);
- g_object_unref (file);
- source = g_object_new (GRL_TYPE_BLIPTV_SOURCE,
- "source-id", SOURCE_ID,
- "source-name", SOURCE_NAME,
- "source-desc", SOURCE_DESC,
- "supported-media", GRL_MEDIA_TYPE_VIDEO,
- "source-icon", icon,
- "source-tags", tags,
- NULL);
- g_object_unref (icon);
-
- return source;
-}
-
-static void
-grl_bliptv_source_dispose (GObject *object)
-{
- GrlBliptvSource *self;
-
- self= GRL_BLIPTV_SOURCE (object);
-
- g_clear_object (&self->priv->wc);
-
- G_OBJECT_CLASS (grl_bliptv_source_parent_class)->dispose (object);
-}
-
-static void
-grl_bliptv_source_finalize (GObject *object)
-{
- G_OBJECT_CLASS (grl_bliptv_source_parent_class)->finalize (object);
-}
-
-static void
-grl_bliptv_source_class_init (GrlBliptvSourceClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GrlSourceClass *source_class = GRL_SOURCE_CLASS (klass);
-
- g_type_class_add_private (klass, sizeof (GrlBliptvSourcePrivate));
-
- object_class->dispose = grl_bliptv_source_dispose;
- object_class->finalize = grl_bliptv_source_finalize;
-
- source_class->supported_keys = grl_bliptv_source_supported_keys;
- source_class->cancel = grl_bliptv_source_cancel;
- source_class->browse = grl_bliptv_source_browse;
- source_class->search = grl_bliptv_source_search;
-}
-
-static void
-grl_bliptv_source_init (GrlBliptvSource *self)
-{
- self->priv = BLIPTV_SOURCE_PRIVATE (self);
-
- self->priv->wc = grl_net_wc_new ();
-
- grl_source_set_auto_split_threshold (GRL_SOURCE (self), MAX_ELEMENTS);
-}
-
-/**/
-
-static void
-bliptv_insert_mapping (GrlKeyID grl_key, const gchar *exp)
-{
- BliptvAssoc *assoc = g_new (BliptvAssoc, 1);
-
- assoc->grl_key = grl_key;
- assoc->exp = exp;
-
- bliptv_mappings = g_list_append (bliptv_mappings, assoc);
-}
-
-static void
-bliptv_setup_mapping (void)
-{
- bliptv_insert_mapping (GRL_METADATA_KEY_ID,
- "blip:item_id");
-
- bliptv_insert_mapping (GRL_METADATA_KEY_PUBLICATION_DATE,
- "blip:datestamp");
-
- bliptv_insert_mapping (GRL_METADATA_KEY_TITLE,
- "title");
-
- bliptv_insert_mapping (GRL_METADATA_KEY_MIME,
- "enclosure/@type");
-
- bliptv_insert_mapping (GRL_METADATA_KEY_URL,
- "enclosure/@url");
-
- bliptv_insert_mapping (GRL_METADATA_KEY_THUMBNAIL,
- "media:thumbnail/@url");
-}
-
-static void
-bliptv_operation_free (BliptvOperation *op)
-{
- g_clear_object (&op->cancellable);
- g_clear_object (&op->source);
- g_clear_pointer (&op->url, (GDestroyNotify) g_free);
-
- g_slice_free (BliptvOperation, op);
-}
-
-static void
-call_raw_async_cb (GObject * source_object,
- GAsyncResult *res,
- gpointer data)
-{
- BliptvOperation *op = (BliptvOperation *) data;
- xmlDocPtr doc = NULL;
- xmlXPathContextPtr xpath = NULL;
- xmlXPathObjectPtr obj = NULL;
- gint i, nb_items = 0;
- gchar *content = NULL;
- gchar *url;
- gsize length;
-
- GRL_DEBUG ("Response id=%u", op->operation_id);
-
- if (g_cancellable_is_cancelled (op->cancellable)) {
- goto finalize_send_last;
- }
-
- if (!grl_net_wc_request_finish (GRL_NET_WC (source_object),
- res,
- &content,
- &length,
- NULL)) {
- goto finalize_send_last;
- }
-
- doc = xmlParseMemory (content, (gint) length);
-
- if (!doc)
- goto finalize_send_last;
-
- xpath = xmlXPathNewContext (doc);
- if (!xpath)
- goto finalize_send_last;
-
- xmlXPathRegisterNs (xpath,
- (xmlChar *) "blip",
- (xmlChar *) BLIPTV_BACKEND "/dtd/blip/1.0");
- xmlXPathRegisterNs (xpath,
- (xmlChar *) "media",
- (xmlChar *) "http://search.yahoo.com/mrss/");
-
- obj = xmlXPathEvalExpression ((xmlChar *) "/rss/channel/item", xpath);
- if (obj)
- {
- nb_items = xmlXPathNodeSetGetLength (obj->nodesetval);
- xmlXPathFreeObject (obj);
- }
-
- if (nb_items == 0) {
- goto finalize_send_last;
- }
-
- /* Special case: when there are no results in a search, Blip.tv returns an
- element telling precisely that, no results found; so we need to report no
- results too */
- if (nb_items == 1) {
- obj = xmlXPathEvalExpression ((xmlChar *) "string(/rss/channel/item[0]/blip:item_id)", xpath);
- if (!obj || !obj->stringval || obj->stringval[0] == '\0') {
- g_clear_pointer (&obj, (GDestroyNotify) xmlXPathFreeObject);
- nb_items = 0;
- goto finalize_send_last;
- } else {
- xmlXPathFreeObject (obj);
- }
- }
-
- for (i = op->skip; i < nb_items; i++)
- {
- GList *mapping = bliptv_mappings;
- GrlMedia *media = grl_media_video_new ();
-
- while (mapping)
- {
- BliptvAssoc *assoc = (BliptvAssoc *) mapping->data;
- gchar *str;
-
- str = g_strdup_printf ("string(/rss/channel/item[%i]/%s)",
- i + 1, assoc->exp);
-
- obj = xmlXPathEvalExpression ((xmlChar *) str, xpath);
- if (obj)
- {
- if (obj->stringval && obj->stringval[0] != '\0')
- {
- GType _type;
- GRL_DEBUG ("\t%s -> %s", str, obj->stringval);
- _type = grl_metadata_key_get_type (assoc->grl_key);
- switch (_type)
- {
- case G_TYPE_STRING:
- grl_data_set_string (GRL_DATA (media),
- assoc->grl_key,
- (gchar *) obj->stringval);
- break;
-
- case G_TYPE_INT:
- grl_data_set_int (GRL_DATA (media),
- assoc->grl_key,
- (gint) atoi ((gchar *) obj->stringval));
- break;
-
- case G_TYPE_FLOAT:
- grl_data_set_float (GRL_DATA (media),
- assoc->grl_key,
- (gfloat) atof ((gchar *) obj->stringval));
- break;
-
- default:
- /* G_TYPE_DATE_TIME is not a constant, so this has to be
- * in "default:" */
- if (_type == G_TYPE_DATE_TIME) {
- GDateTime *date =
- grl_date_time_from_iso8601 ((gchar *) obj->stringval);
- GRL_DEBUG ("Setting %s to %s",
- grl_metadata_key_get_name (assoc->grl_key),
- g_date_time_format (date, "%F %H:%M:%S"));
- grl_data_set_boxed (GRL_DATA (media),
- assoc->grl_key, date);
- g_date_time_unref (date);
- } else {
- GRL_DEBUG ("\tUnexpected data type: %s",
- g_type_name (_type));
- }
- break;
- }
- }
- xmlXPathFreeObject (obj);
- }
-
- g_free (str);
-
- mapping = mapping->next;
- }
-
- op->callback (op->source,
- op->operation_id,
- media,
- --op->count,
- op->user_data,
- NULL);
-
- if (op->count == 0)
- break;
- }
-
- if (op->count > 0) {
- /* Request next page */
- op->skip = 0;
- url = g_strdup_printf (op->url, ++op->page);
-
- GRL_DEBUG ("Operation %d: requesting page %d",
- op->operation_id,
- op->page);
-
- grl_net_wc_request_async (GRL_BLIPTV_SOURCE (op->source)->priv->wc,
- url,
- op->cancellable,
- call_raw_async_cb,
- op);
- g_free (url);
-
- goto finalize_free;
- }
-
- finalize_send_last:
- /* Signal the last element if it was not already signaled */
- if (nb_items == 0) {
- op->callback (op->source,
- op->operation_id,
- NULL,
- 0,
- op->user_data,
- NULL);
- }
-
- finalize_free:
- g_clear_pointer (&xpath, (GDestroyNotify) xmlXPathFreeContext);
- g_clear_pointer (&doc, (GDestroyNotify) xmlFreeDoc);
-}
-
-/* ================== API Implementation ================ */
-
-static const GList *
-grl_bliptv_source_supported_keys (GrlSource *source)
-{
- static GList *keys = NULL;
- if (!keys) {
- keys = grl_metadata_key_list_new (GRL_METADATA_KEY_ID,
- GRL_METADATA_KEY_PUBLICATION_DATE,
- GRL_METADATA_KEY_TITLE,
- GRL_METADATA_KEY_MIME,
- GRL_METADATA_KEY_URL,
- GRL_METADATA_KEY_THUMBNAIL,
- NULL);
- }
- return keys;
-}
-
-static void
-grl_bliptv_source_browse (GrlSource *source,
- GrlSourceBrowseSpec *bs)
-{
- BliptvOperation *op = g_slice_new0 (BliptvOperation);
- gchar *url;
- gint count = grl_operation_options_get_count (bs->options);
- guint page_number;
- guint page_offset;
-
- grl_paging_translate (grl_operation_options_get_skip (bs->options),
- count,
- MAX_ELEMENTS,
- NULL,
- &page_number,
- &page_offset);
-
- op->source = g_object_ref (source);
- op->cancellable = g_cancellable_new ();
- op->count = count;
- op->skip = page_offset;
- op->page = page_number;
- op->url = g_strdup (BLIPTV_BROWSE);
- op->operation_id = bs->operation_id;
- op->callback = bs->callback;
- op->user_data = bs->user_data;
-
- grl_operation_set_data_full (bs->operation_id, op, (GDestroyNotify) bliptv_operation_free);
-
- url = g_strdup_printf (op->url, page_number);
-
- GRL_DEBUG ("Starting browse request for id=%u", bs->operation_id);
-
- grl_net_wc_request_async (GRL_BLIPTV_SOURCE (source)->priv->wc,
- url,
- op->cancellable,
- call_raw_async_cb,
- op);
- g_free (url);
-}
-
-static void
-grl_bliptv_source_search (GrlSource *source,
- GrlSourceSearchSpec *ss)
-{
- BliptvOperation *op = g_slice_new0 (BliptvOperation);
- gchar *url;
- gint count = grl_operation_options_get_count (ss->options);
- guint page_number;
- guint page_offset;
-
- grl_paging_translate (grl_operation_options_get_skip (ss->options),
- count,
- MAX_ELEMENTS,
- NULL,
- &page_number,
- &page_offset);
-
- op->source = g_object_ref (source);
- op->cancellable = g_cancellable_new ();
- op->count = count;
- op->skip = page_offset;
- op->page = page_number;
- op->url = g_strdup_printf (BLIPTV_SEARCH, ss->text);
- op->operation_id = ss->operation_id;
- op->callback = ss->callback;
- op->user_data = ss->user_data;
-
-
- grl_operation_set_data_full (ss->operation_id, op, (GDestroyNotify) bliptv_operation_free);
-
- url = g_strdup_printf (op->url, page_number);
-
- GRL_DEBUG ("Starting search request for id=%u : '%s'",
- ss->operation_id, ss->text);
-
- grl_net_wc_request_async (GRL_BLIPTV_SOURCE (source)->priv->wc,
- url,
- op->cancellable,
- call_raw_async_cb,
- op);
- g_free (url);
-}
-
-static void
-grl_bliptv_source_cancel (GrlSource *source, guint operation_id)
-{
- BliptvOperation *op = grl_operation_get_data (operation_id);
-
- GRL_DEBUG ("Cancelling id=%u", operation_id);
-
- if (!op)
- {
- GRL_WARNING ("\tNo such operation id=%u", operation_id);
- return;
- }
-
- if (op->cancellable) {
- g_cancellable_cancel (op->cancellable);
- }
-}
diff --git a/src/bliptv/grl-bliptv.h b/src/bliptv/grl-bliptv.h
deleted file mode 100644
index f98c844..0000000
--- a/src/bliptv/grl-bliptv.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2011 Intel Corporation.
- *
- * Contact: Iago Toral Quiroga <itoral@igalia.com>
- *
- * Authors: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.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_BLIPTV_H
-#define _GRL_BLIPTV_H
-
-#include <glib-object.h>
-#include <grilo.h>
-
-G_BEGIN_DECLS
-
-#define GRL_TYPE_BLIPTV_SOURCE grl_bliptv_source_get_type()
-
-#define GRL_BLIPTV_SOURCE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- GRL_TYPE_BLIPTV_SOURCE, \
- GrlBliptvSource))
-
-#define GRL_BLIPTV_SOURCE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), \
- GRL_TYPE_BLIPTV_SOURCE, \
- GrlBliptvSourceClass))
-
-#define GRL_IS_BLIPTV_SOURCE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- GRL_TYPE_BLIPTV_SOURCE))
-
-#define GRL_IS_BLIPTV_SOURCE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), \
- GRL_TYPE_BLIPTV_SOURCE))
-
-#define GRL_BLIPTV_SOURCE_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), \
- GRL_TYPE_BLIPTV_SOURCE, \
- GrlBliptvSourceClass))
-
-typedef struct _GrlBliptvSource GrlBliptvSource;
-typedef struct _GrlBliptvSourceClass GrlBliptvSourceClass;
-typedef struct _GrlBliptvSourcePrivate GrlBliptvSourcePrivate;
-
-struct _GrlBliptvSource
-{
- GrlSource parent;
-
- /*< private >*/
- GrlBliptvSourcePrivate *priv;
-};
-
-struct _GrlBliptvSourceClass
-{
- GrlSourceClass parent_class;
-};
-
-GType grl_bliptv_source_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* _GRL_BLIPTV_H */
diff --git a/src/bliptv/grl-bliptv.xml b/src/bliptv/grl-bliptv.xml
deleted file mode 100644
index 05bff88..0000000
--- a/src/bliptv/grl-bliptv.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<plugin>
- <info>
- <name>Blip.tv</name>
- <module>libgrlbliptv</module>
- <description>A plugin for searching multimedia content using Blip.tv</description>
- <author>Lionel Landwerlin</author>
- <license>LGPL</license>
- <site>https://wiki.gnome.org/Projects/Grilo</site>
- </info>
-</plugin>