summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIago Toral Quiroga <itoral@igalia.com>2010-02-25 12:53:55 +0100
committerIago Toral Quiroga <itoral@igalia.com>2010-02-25 12:53:55 +0100
commit66be1adcd0d16251bc241be5530c6e61754b3e22 (patch)
treee05069dcdb5a4cd0b7afbd62269e6bb305eb6756
parentd4fb6e1d6947dfa9f5787358e6eb84d9f40b660c (diff)
downloadgrilo-plugins-66be1adcd0d16251bc241be5530c6e61754b3e22.tar.gz
[podcasts] Raise error if client attempts to store a new category.
-rw-r--r--src/podcasts/grl-podcasts.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/podcasts/grl-podcasts.c b/src/podcasts/grl-podcasts.c
index e475dde..bec5145 100644
--- a/src/podcasts/grl-podcasts.c
+++ b/src/podcasts/grl-podcasts.c
@@ -1503,9 +1503,15 @@ grl_podcasts_source_store (GrlMediaSource *source, GrlMediaSourceStoreSpec *ss)
{
g_debug ("grl_podcasts_source_store");
GError *error = NULL;
- store_podcast (GRL_PODCASTS_SOURCE (ss->source)->priv->db,
- ss->media,
- &error);
+ if (GRL_IS_CONTENT_BOX (ss->media)) {
+ error = g_error_new (GRL_ERROR,
+ GRL_ERROR_STORE_FAILED,
+ "Cannot create containers. Only feeds are accepted.");
+ } else {
+ store_podcast (GRL_PODCASTS_SOURCE (ss->source)->priv->db,
+ ss->media,
+ &error);
+ }
ss->callback (ss->source, ss->parent, ss->media, ss->user_data, error);
if (error) {
g_error_free (error);