Skip to content
Snippets Groups Projects
Commit 7c50757d authored by deuce's avatar deuce
Browse files

Add add_channel_opt_attribute_rename() and support for ITExplicit for the

itunes:explicit tag.
parent 36193322
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,11 @@ function add_channel_opt_attribute(name) { ...@@ -30,6 +30,11 @@ function add_channel_opt_attribute(name) {
} }
} }
function add_channel_opt_attribute_rename(name, newName) {
if (opts[name] !== undefined)
out.write('\t\t<'+newName+'>'+encode_xml(opts[name])+'</'+newName+'>\n');
}
function create_item_xml(base, hdr) { function create_item_xml(base, hdr) {
var info; var info;
var item; var item;
...@@ -140,8 +145,7 @@ add_channel_opt_attribute('Category'); ...@@ -140,8 +145,7 @@ add_channel_opt_attribute('Category');
out.write('\t\t<generator>Synchronet Podcast Script '+("$Revision$".split(' ')[1])+'</generator>\n'); out.write('\t\t<generator>Synchronet Podcast Script '+("$Revision$".split(' ')[1])+'</generator>\n');
add_channel_opt_attribute('Docs'); add_channel_opt_attribute('Docs');
// TODO: cloud (fancy!) // TODO: cloud (fancy!)
if (opts.TTL != undefined) add_channel_opt_attribute_rename('TTL', 'ttl');
out.write('\t\t<ttl>'+encode_xml(opts.TTL)+'</ttl>\n');
if (opts.ImageURL != undefined) { if (opts.ImageURL != undefined) {
img_title = opts.ImageTitle == undefined ? opts.Title : opts.ImageTitle; img_title = opts.ImageTitle == undefined ? opts.Title : opts.ImageTitle;
img_link = opts.ImageLink == undefined ? opts.Link : opts.ImageLink; img_link = opts.ImageLink == undefined ? opts.Link : opts.ImageLink;
...@@ -159,6 +163,7 @@ add_channel_opt_attribute('Rating'); ...@@ -159,6 +163,7 @@ add_channel_opt_attribute('Rating');
// TODO: textInput? // TODO: textInput?
add_channel_opt_attribute('SkipHours'); add_channel_opt_attribute('SkipHours');
add_channel_opt_attribute('SkipDays'); add_channel_opt_attribute('SkipDays');
add_channel_opt_attribute_rename('ITExplicit', 'itunes:explicit');
out.write('\t\t<atom:link href="'+opts.FeedURI+'" rel="self" type="application/rss+xml" />\n'); out.write('\t\t<atom:link href="'+opts.FeedURI+'" rel="self" type="application/rss+xml" />\n');
for (i=hdrs.length - 1; i >= 0; i--) { for (i=hdrs.length - 1; i >= 0; i--) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment