Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

TMDB: Make real sure we insert something in DB if we say we do

Fixes #1306
  • Loading branch information...
commit 41ad6ff9d4bc42a49764181261982620e57fc4f7 1 parent 509ba2d
@andoma andoma authored
Showing with 20 additions and 7 deletions.
  1. +15 −0 glwskins/default/test.glsl
  2. +5 −7 src/api/tmdb.c
View
15 glwskins/default/test.glsl
@@ -0,0 +1,15 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+
+uniform sampler2D u_t0;
+
+varying vec4 f_col_mul;
+varying vec4 f_col_mul2;
+varying vec4 f_col_off;
+varying vec4 f_tex;
+
+void main()
+{
+ gl_FragColor = texture2D(u_t0, f_tex.xy).ggga;
+}
View
12 src/api/tmdb.c
@@ -434,15 +434,12 @@ tmdb_query_by_title_and_year(void *db, const char *item_url,
htsmsg_t *resultlist = htsmsg_get_list(doc, "results");
- if(resultlist == NULL || results == 0) {
- htsmsg_destroy(doc);
- return METADATA_PERMANENT_ERROR;
- }
+ int64_t rval = METADATA_PERMANENT_ERROR;
htsmsg_field_t *f;
- HTSMSG_FOREACH(f, resultlist) {
+ if(resultlist != NULL) HTSMSG_FOREACH(f, resultlist) {
htsmsg_t *res = htsmsg_get_map_by_field(f);
-
+
uint32_t id = htsmsg_get_u32_or_default(res, "id", 0);
if(id == 0)
continue;
@@ -474,9 +471,10 @@ tmdb_query_by_title_and_year(void *db, const char *item_url,
insert_videoart(db, itemid, METADATA_IMAGE_POSTER, s, "poster");
if((s = htsmsg_get_str(res, "backdrop_path")) != NULL)
insert_videoart(db, itemid, METADATA_IMAGE_BACKDROP, s, "backdrop");
+ rval = 0;
}
htsmsg_destroy(doc);
- return 0;
+ return rval;
}
Please sign in to comment.
Something went wrong with that request. Please try again.