Skip to content

Instantly share code, notes, and snippets.

@ymorimo
Created June 6, 2012 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymorimo/2885292 to your computer and use it in GitHub Desktop.
Save ymorimo/2885292 to your computer and use it in GitHub Desktop.
diff --git a/src/html.c b/src/html.c
index 17987fb..65415eb 100644
--- a/src/html.c
+++ b/src/html.c
@@ -952,8 +952,13 @@ void send_rss(request_rec *r, const mu_pack *const pack, const mu_config *const
ap_rvputs(r, "version=\"2.0\">\n"
" <channel>\n"
- " <title>", _("RSS Feed for "), ap_escape_html(r->pool, r->uri), "</title>\n"
- " <link>", NULL);
+ " <title>");
+ if (q->album) {
+ ap_rputs(ap_escape_html(r->pool, q->album), r);
+ } else {
+ ap_rvputs(r, _("RSS Feed for "), ap_escape_html(r->pool, r->uri), NULL);
+ }
+ ap_rputs("</title>\n <link>", r);
send_url(r, r->uri, NULL, conf, 1);
ap_rputs("</link>\n <description>", r);
@@ -988,9 +993,9 @@ void send_rss(request_rec *r, const mu_pack *const pack, const mu_config *const
q->size, filetype[q->filetype % FT_MAX].mimetype);
if (conf->options & MI_PODCAST) {
- ap_rputs(" <guild>", r);
+ ap_rputs(" <guid>", r);
send_url(r, q->uri, NULL, conf, 1);
- ap_rputs("</guild>\n", r);
+ ap_rputs("</guid>\n", r);
localtime_r(&q->mtime, &time_buf);
strftime(date_buf, 32, "%a, %e %b %Y %H:%M:%S %z", &time_buf);
ap_rprintf(r, " <pubDate>%s</pubDate>\n", date_buf);
@@ -1000,29 +1005,7 @@ void send_rss(request_rec *r, const mu_pack *const pack, const mu_config *const
}
}
- ap_rvputs(r, " <description>\n ", _("Artist"), " | ", _("Album"), " | ", _("Track"), " | ", _("Disc"),
- " | ", _("Length"), " | ", _("Genre"), " | ", _("Bitrate"), " | ", _("Freq"), " | ", _("Filetype"),
- " | ", _("Size"), "<br />\n", NULL);
- ap_rprintf(r, " %s | %s | ", q->artist ? ap_escape_html(r->pool, q->artist) : "",
- q->album ? ap_escape_html(r->pool, q->album) : "");
- if (q->track)
- ap_rprintf(r, "%u", q->track);
- ap_rputs(" | ", r);
- if (q->posn)
- ap_rprintf(r, "%u", q->posn);
- ap_rputs(" | ", r);
- if (q->length)
- ap_rprintf(r, "%u:%.2u", q->length / 60, q->length % 60);
- ap_rputs(" | ", r);
- ap_rprintf(r, "%s | ", q->genre ? ap_escape_html(r->pool, q->genre) : "");
- if (q->bitrate)
- ap_rprintf(r, "%lu %s", q->bitrate >> 10, (q->flags & EF_VBR) ? "VBR" : "");
- ap_rputs(" | ", r);
- if (q->freq)
- ap_rprintf(r, "%u", q->freq);
- ap_rputs(" | ", r);
- ap_rprintf(r, "%s | %lu\n", filetype[q->filetype % FT_MAX].nametype, q->size);
- ap_rputs(" </description>\n"
+ ap_rputs(" <description></description>\n"
" </item>\n", r);
limit--;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment