From 9fe482a34cfe924fe66403ad6f8051d405f4639a Mon Sep 17 00:00:00 2001 From: deuce <> Date: Wed, 6 May 2015 09:41:26 +0000 Subject: [PATCH] Add links from ecWeb integration (not yet checked in, but working, honest!) --- exec/podcast.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/exec/podcast.js b/exec/podcast.js index b1b2165cfa..096b531020 100644 --- a/exec/podcast.js +++ b/exec/podcast.js @@ -83,6 +83,11 @@ if (opts.To == undefined) { exit(1); } +if (opts.EpisodeLink == undefined) { + log("EpisodeLink undefined in modopts.ini."); + exit(1); +} + base = new MsgBase(opts.Sub); if (base == null) { log('Unable to create "'+opts.Sub+'" MsgBase object.'); @@ -155,12 +160,11 @@ for (i=hdrs.length - 1; i >= 0; i--) { item_type = item_headers['Content-Type'][0].replace(/^\s*(.*?)\s*/, "$1"); item = '\t\t<item>\n'; item += '\t\t\t<title>'+encode_xml(item_info.title)+'</title>\n'; - // TODO: HTML integration required here for link - item += '\t\t\t<link>'+encode_xml(opts.Link)+'</link>\n'; + item += '\t\t\t<link>'+encode_xml(opts.EpisodeLink+parseInt(i+1))+'</link>\n'; item += '\t\t\t<description>'+encode_xml(item_info.description)+'</description>\n'; // TODO: author? // TODO: category? - // TODO: HTML integration required here for <comments> tag. + item += '\t\t\t<comments>'+encode_xml(opts.EpisodeLink+parseInt(i+1))+'</comments>\n'; item += '\t\t\t<enclosure url="'+encode_xml(item_info.enclosure)+'" length="'+item_length+'" type="'+item_type+'" />\n'; item += '\t\t\t<guid isPermaLink="false">'+encode_xml(item_info.guid)+'</guid>\n'; item += '\t\t\t<pubDate>'+encode_xml(item_info.pubDate)+'</pubDate>\n'; -- GitLab