(no commit message)
[prss.git] / src / ttrss.c
index 4dbde65..d83db4f 100644 (file)
@@ -100,6 +100,8 @@ struct feed **ttrss_get_feeds()
        int i, n;
        struct feed **feeds, *feed;
 
        int i, n;
        struct feed **feeds, *feed;
 
+       printf("ttrss_get_feeds\n");
+
        rq = create_op("getFeeds");
 
        rp = post_json_object(session_url, rq);
        rq = create_op("getFeeds");
 
        rp = post_json_object(session_url, rq);
@@ -125,6 +127,9 @@ struct feed **ttrss_get_feeds()
                        j = json_object_object_get(jfeed, "id");
                        feed->id = json_object_get_int(j);
 
                        j = json_object_object_get(jfeed, "id");
                        feed->id = json_object_get_int(j);
 
+                       j = json_object_object_get(jfeed, "unread");
+                       feed->unread = json_object_get_int(j);
+
                        feed->headlines = ttrss_get_headlines(feed->id);
 
                        feeds[i] = feed;
                        feed->headlines = ttrss_get_headlines(feed->id);
 
                        feeds[i] = feed;
@@ -136,6 +141,8 @@ struct feed **ttrss_get_feeds()
 
        json_object_put(rp);
 
 
        json_object_put(rp);
 
+       printf("ttrss_get_feeds ended\n");
+
        return feeds;
 }
 
        return feeds;
 }
 
@@ -145,6 +152,8 @@ struct headline **ttrss_get_headlines(int feed_id)
        int i, n;
        struct headline **headlines, *h;
 
        int i, n;
        struct headline **headlines, *h;
 
+       printf("ttrss_get_headlines %d\n", feed_id);
+
        rq = create_op("getHeadlines");
        json_object_object_add(rq, "feed_id", json_object_new_int(feed_id));
        json_object_object_add(rq, "show_excerpt", json_object_new_boolean(1));
        rq = create_op("getHeadlines");
        json_object_object_add(rq, "feed_id", json_object_new_int(feed_id));
        json_object_object_add(rq, "show_excerpt", json_object_new_boolean(1));
@@ -185,5 +194,7 @@ struct headline **ttrss_get_headlines(int feed_id)
 
        json_object_put(rp);
 
 
        json_object_put(rp);
 
+       printf("ttrss_get_headlines %d end\n", feed_id);
+
        return headlines;
 }
        return headlines;
 }