From cfc9ef1cade470f6d2a7ba67c625eb8c11ff2743 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 16 Jul 2024 20:27:53 +0200 Subject: Add fallback urls for rss (right now, fallback nyaa.si to nyaa.land) --- src/rss_html_common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rss_html_common.h') diff --git a/src/rss_html_common.h b/src/rss_html_common.h index cc22b24..88b8c3e 100644 --- a/src/rss_html_common.h +++ b/src/rss_html_common.h @@ -6,6 +6,7 @@ #define MAX_UPDATE_ITEMS 10 typedef struct cJSON cJSON; +typedef struct fallback fallback; typedef struct { const char *title; @@ -14,11 +15,10 @@ typedef struct { typedef struct { const char *title; - const char *link; cJSON *json_data; } TrackedItem; -int write_plugin_json_to_file(const char *dir, const char *filename, const char *url, const char *updated, DownloadItemsData *prev_download_items, size_t num_prev_download_items, const char *plugin_name); +int write_plugin_json_to_file(const char *dir, const char *filename, const char *url, const char *updated, DownloadItemsData *prev_download_items, size_t num_prev_download_items, const char *plugin_name, fallback *fall); /* Note: tracked_item.json_data becomes invalid after this call. @@ -26,6 +26,6 @@ int write_plugin_json_to_file(const char *dir, const char *filename, const char @tracked_dir is also modified and then restored at the end. @download_items and @timestamps both need to be @num_download_items long. If @filenames is not NULL, then it also has to be @num_download_items long. */ -int tracked_item_update_latest(TrackedItem *tracked_item, char *tracked_dir, DownloadItemsData **download_items, char **filenames, long *timestamps, int num_download_items); +int tracked_item_update_latest(TrackedItem *tracked_item, char *tracked_dir, DownloadItemsData **download_items, char **filenames, long *timestamps, int num_download_items, fallback *fall); #endif \ No newline at end of file -- cgit v1.2.3