[grilo-plugins/0.2.x] tmdb: Fix "format not a string literal" error
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/0.2.x] tmdb: Fix "format not a string literal" error
- Date: Mon, 27 Jun 2016 12:23:35 +0000 (UTC)
commit f0935871c3a787e17e174800117f1ee45fad2609
Author: Bastien Nocera <hadess hadess net>
Date: Tue Mar 22 17:15:55 2016 +0100
tmdb: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764486
src/tmdb/grl-tmdb-request.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/tmdb/grl-tmdb-request.c b/src/tmdb/grl-tmdb-request.c
index 0f59158..14a687b 100644
--- a/src/tmdb/grl-tmdb-request.c
+++ b/src/tmdb/grl-tmdb-request.c
@@ -382,30 +382,28 @@ grl_tmdb_request_new_details (const char *api_key,
{
GrlTmdbRequest *result;
char *uri;
- const char *template;
switch (detail) {
case GRL_TMDB_REQUEST_DETAIL_MOVIE:
- template = TMDB_API_CALL_MOVIE_INFO;
+ uri = g_strdup_printf (TMDB_API_CALL_MOVIE_INFO, id);
break;
case GRL_TMDB_REQUEST_DETAIL_MOVIE_CAST:
- template = TMDB_API_CALL_MOVIE_CAST;
+ uri = g_strdup_printf (TMDB_API_CALL_MOVIE_CAST, id);
break;
case GRL_TMDB_REQUEST_DETAIL_MOVIE_IMAGES:
- template = TMDB_API_CALL_MOVIE_IMAGES;
+ uri = g_strdup_printf (TMDB_API_CALL_MOVIE_IMAGES, id);
break;
case GRL_TMDB_REQUEST_DETAIL_MOVIE_KEYWORDS:
- template = TMDB_API_CALL_MOVIE_KEYWORDS;
+ uri = g_strdup_printf (TMDB_API_CALL_MOVIE_KEYWORDS, id);
break;
case GRL_TMDB_REQUEST_DETAIL_MOVIE_RELEASE_INFO:
- template = TMDB_API_CALL_MOVIE_RELEASE_INFO;
+ uri = g_strdup_printf (TMDB_API_CALL_MOVIE_RELEASE_INFO, id);
break;
default:
g_assert_not_reached ();
break;
}
- uri = g_strdup_printf (template, id);
result = g_object_new (GRL_TMDB_REQUEST_TYPE,
"api-key", api_key,
"uri", uri,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]