rq = ws_request_new("getArticle");
ws_request_add_att_int(rq, "article_id", id);
rq = ws_request_new("getArticle");
ws_request_add_att_int(rq, "article_id", id);
j = json_object_object_get(jheadline, "id");
hid = json_object_get_int(j);
h = feed_get_headline(feed, hid);
j = json_object_object_get(jheadline, "id");
hid = json_object_get_int(j);
h = feed_get_headline(feed, hid);
- j = json_object_object_get(jheadline, "title");
- h->title = strdup(json_object_get_string(j));
+ if (!h->title) {
+ j = json_object_object_get(jheadline, "title");
+ h->title = strdup(json_object_get_string(j));
+ }
- j = json_object_object_get(jheadline, "link");
- h->url = strdup(json_object_get_string(j));
+ if (!h->url) {
+ j = json_object_object_get(jheadline, "link");
+ h->url = strdup(json_object_get_string(j));
+ }
j = json_object_object_get(jheadline, "unread");
h->unread = json_object_get_boolean(j);
j = json_object_object_get(jheadline, "unread");
h->unread = json_object_get_boolean(j);
struct feed **ttrss_get_feeds()
{
struct json_object *rp, *rq, *content, *jfeed, *j;
struct feed **ttrss_get_feeds()
{
struct json_object *rp, *rq, *content, *jfeed, *j;
json_object_object_add(rq, "mode", json_object_new_int(unread));
rp = http_json_get(session_url, rq);
json_object_object_add(rq, "mode", json_object_new_int(unread));
rp = http_json_get(session_url, rq);