aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-08-29 00:21:21 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-29 00:21:21 +0200
commit836eda9a772ae91a76adffaadfe098bcc82d4d3d (patch)
tree9ae50f642505cb8dbdc73aa2c42e8d44e7a1047a
parentd83f804b43241e261fe88564f238cd9d43b913df (diff)
Fix 'start after' when adding rss by torrent name
-rwxr-xr-xautomediabin116632 -> 116632 bytes
-rw-r--r--src/rss.c5
-rw-r--r--src/rss.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/automedia b/automedia
index 76e5785..fe816ec 100755
--- a/automedia
+++ b/automedia
Binary files differ
diff --git a/src/rss.c b/src/rss.c
index e81b44b..b3a747e 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -305,7 +305,7 @@ static int get_rss_url_from_episode_info(const char *episode_name, EpisodeInfo *
/* TODO: Fix the remove() calls. They wont work since they are not recursive and the directories has files in them */
/* Same for add_html */
-int add_rss(const char *name, const char *url, char *rss_config_dir, const char *start_after) {
+int add_rss(const char *name, char *url, char *rss_config_dir, const char *start_after) {
int result = 0;
char rss_url[4096];
@@ -328,6 +328,9 @@ int add_rss(const char *name, const char *url, char *rss_config_dir, const char
goto cleanup;
}
+ string_replace(url, '/', '_');
+ start_after = strip(url);
+
url = rss_url;
buffer_clear(&buffer);
diff --git a/src/rss.h b/src/rss.h
index 1233ba4..c2b6a49 100644
--- a/src/rss.h
+++ b/src/rss.h
@@ -10,7 +10,7 @@ typedef struct {
struct json_object_s *json_data;
} TrackedRss;
-int add_rss(const char *name, const char *url, char *rss_config_dir, const char *start_after);
+int add_rss(const char *name, char *url, char *rss_config_dir, const char *start_after);
int sync_rss(TrackedRss *tracked_rss, struct TransmissionSession *transmission_session, char *rss_config_dir);
#endif