[grilo-plugins] thetvdb: call the callback with episode cache miss
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] thetvdb: call the callback with episode cache miss
- Date: Wed, 30 Jul 2014 16:27:46 +0000 (UTC)
commit a1cd1fe6fe0079f901ccc381303087d6d21dd615
Author: Victor Toso <me victortoso com>
Date: Wed Jul 16 23:05:20 2014 -0300
thetvdb: call the callback with episode cache miss
If the cache is up-to-date and we hit a cache miss, call the callback.
https://bugzilla.gnome.org/show_bug.cgi?id=733287
src/thetvdb/grl-thetvdb.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/thetvdb/grl-thetvdb.c b/src/thetvdb/grl-thetvdb.c
index a94f738..080bd4a 100644
--- a/src/thetvdb/grl-thetvdb.c
+++ b/src/thetvdb/grl-thetvdb.c
@@ -1313,16 +1313,20 @@ cache_find_episode_done (GObject *object,
if (os->fetched_web == FALSE) {
/* Fetch web API in order to update current cache */
thetvdb_execute_resolve_web (os);
+ return;
}
- return;
+ /* The cache is up-to-date and it doesn't have this episode */
+ goto episode_done_end;
}
thetvdb_update_media_from_resources (GRL_MEDIA_VIDEO (os->media),
os->keys,
os->serie_resource,
EPISODE_RESOURCE (resource));
- os->callback (os->source, os->operation_id, os->media, os->user_data, NULL);
g_object_unref (resource);
+
+episode_done_end:
+ os->callback (os->source, os->operation_id, os->media, os->user_data, NULL);
free_operation_spec (os);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]