X-Git-Url: https://git.wpitchoune.net/gitweb/?p=prss.git;a=blobdiff_plain;f=src%2Fttrss.c;h=9b762951a8cf618fe0e6e3993fd62a0a0b36c4a4;hp=d01aac4ccb0922ff8ac6aa88c3b7b4013ff3b004;hb=05d4d920a38f57f2afc0ef349d8f4c96a5852878;hpb=f93956db82f2d478b1a3dfd34d3fe024d4afd636 diff --git a/src/ttrss.c b/src/ttrss.c index d01aac4..9b76295 100644 --- a/src/ttrss.c +++ b/src/ttrss.c @@ -113,7 +113,7 @@ void ttrss_set_config(const char *url, const char *user, const char *pwd) { feeds_free(data); data = NULL; - ws_init(url, user, pwd); + ws_set_config(url, user, pwd); } struct feed *ttrss_get_feed(int id) @@ -125,3 +125,18 @@ struct headline *ttrss_get_headline(int id) { return feeds_get_headline(data, id); } + +void ttrs_download_headline_content(struct feed **feeds) +{ + struct feed **fcur; + struct headline **hcur; + + for (fcur = feeds; *fcur; fcur++) { + hcur = ttrss_feed_get_headlines(*fcur); + + while (hcur && *hcur) { + free(ttrss_get_headline_content(*hcur)); + hcur++; + } + } +}