diff --git a/data/interfaces/bookstrap/audio.html b/data/interfaces/bookstrap/audio.html
index 20a1c218f..a345d6fce 100644
--- a/data/interfaces/bookstrap/audio.html
+++ b/data/interfaces/bookstrap/audio.html
@@ -13,7 +13,7 @@
%endif
Recent AudioBooks
%if lazylibrarian.CONFIG['USER_ACCOUNTS'] == True:
-
+
%endif
diff --git a/data/interfaces/bookstrap/books.html b/data/interfaces/bookstrap/books.html
index 3adba92fb..8c8cc7ced 100644
--- a/data/interfaces/bookstrap/books.html
+++ b/data/interfaces/bookstrap/books.html
@@ -14,7 +14,7 @@
Additions
Downloads
%if lazylibrarian.CONFIG['USER_ACCOUNTS'] == True:
-
+
%endif
%if len(languages) > 1:
diff --git a/data/interfaces/bookstrap/magazines.html b/data/interfaces/bookstrap/magazines.html
index 71e1d563d..1c2ce994f 100644
--- a/data/interfaces/bookstrap/magazines.html
+++ b/data/interfaces/bookstrap/magazines.html
@@ -14,7 +14,7 @@
%endif
Recent Issues
%if lazylibrarian.CONFIG['USER_ACCOUNTS'] == True:
-
+
%endif
diff --git a/lazylibrarian/webServe.py b/lazylibrarian/webServe.py
index 96d5d3849..3ca381913 100644
--- a/lazylibrarian/webServe.py
+++ b/lazylibrarian/webServe.py
@@ -39,7 +39,8 @@
from lazylibrarian.csvfile import import_CSV, export_CSV, dump_table, restore_table
from lazylibrarian.downloadmethods import NZBDownloadMethod, TORDownloadMethod, DirectDownloadMethod
from lazylibrarian.formatter import unaccented, unaccented_str, plural, now, today, check_int, replace_all, \
- safe_unicode, cleanName, surnameFirst, sortDefinite, getList, makeUnicode, md5_utf8, dateFormat, check_year
+ safe_unicode, cleanName, surnameFirst, sortDefinite, getList, makeUnicode, makeBytestr, md5_utf8, dateFormat, \
+ check_year
from lazylibrarian.gb import GoogleBooks
from lazylibrarian.gr import GoodReads
from lazylibrarian.images import getBookCover
@@ -1809,6 +1810,8 @@ def mimetype(filename):
return 'application/pdf'
elif name.endswith('.mp3'):
return 'audio/mpeg3'
+ elif name.endswith('.xml'):
+ return 'application/rss+xml'
return "application/x-download"
@cherrypy.expose
@@ -3439,11 +3442,14 @@ def rssFeed(self, **kwargs):
netloc = cherrypy.request.headers['X-Forwarded-Host']
except KeyError:
pass
+ filename = 'LazyLibrarian_RSS_' + ftype + '.xml'
path = path.replace('rssFeed', '').rstrip('/')
baseurl = urlunsplit((scheme, netloc, path, qs, anchor))
- remote_ip = cherrypy.request.remote.ip
- logger.info("RSS Feed request %s %s%s for %s" % (limit, ftype, plural(limit), remote_ip))
- return genFeed(ftype, limit=limit, user=userid, baseurl=baseurl)
+ logger.info("RSS Feed request %s %s%s" % (limit, ftype, plural(limit)))
+ cherrypy.response.headers["Content-Type"] = 'application/rss+xml'
+ cherrypy.response.headers["Content-Disposition"] = 'attachment; filename="%s"' % filename
+ res = genFeed(ftype, limit=limit, user=userid, baseurl=baseurl)
+ return makeBytestr(res)
@cherrypy.expose
def importCSV(self):