Loading opds_catalog/feeds.py +9 −2 Original line number Diff line number Diff line Loading @@ -293,12 +293,19 @@ class CatalogsFeed(AuthFeed): if item['is_catalog']: return (opdsEnclosure(reverse("opds_catalog:cat_tree", kwargs={"cat_id":item['id']}),"application/atom+xml;profile=opds-catalog;kind=navigation", "subsection"),) else: return ( enclosure = [ opdsEnclosure(reverse("opds_catalog:download", kwargs={"book_id":item['id'],"zip_flag":0}),"application/%s"%item['format'] ,"http://opds-spec.org/acquisition/open-access"), opdsEnclosure(reverse("opds_catalog:download", kwargs={"book_id":item['id'],"zip_flag":1}),"application/%s+zip"%item['format'], "http://opds-spec.org/acquisition/open-access"), opdsEnclosure(reverse("opds_catalog:cover", kwargs={"book_id":item['id']}),"image/jpeg", "http://opds-spec.org/image"), opdsEnclosure(reverse("opds_catalog:thumb", kwargs={"book_id": item['id']}), "image/jpeg","http://opds-spec.org/thumbnail"), ) ] if (config.SOPDS_FB2TOEPUB!="") and (item['format']=='fb2'): enclosure += [opdsEnclosure(reverse("opds_catalog:convert", kwargs={"book_id":item['id'],"convert_type":"epub"}),"application/epub+zip","http://opds-spec.org/acquisition/open-access")] if (config.SOPDS_FB2TOMOBI!="") and (item['format']=='fb2'): enclosure += [opdsEnclosure(reverse("opds_catalog:convert", kwargs={"book_id":item['id'],"convert_type":"mobi"}),"application/mobi","http://opds-spec.org/acquisition/open-access")] return enclosure def item_description(self, item): if item['is_catalog']: Loading opds_catalog/settings.py +1 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ from django.utils import translation from constance import config loglevels={'debug':logging.DEBUG,'info':logging.INFO,'warning':logging.WARNING,'error':logging.ERROR,'critical':logging.CRITICAL,'none':logging.NOTSET} NOZIP_FORMATS = ['epub', 'mobi'] VERSION = "0.42-dev" TITLE = getattr(settings, "SOPDS_TITLE", "SimpleOPDS") Loading sopds_web_backend/templates/sopds_books.html +3 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,9 @@ <b>{{ b.title }}</b> <i style="font-size:80%;">{% trans "Download:" %} </i> <i><a href="{% url 'opds_catalog:download' b.id 0 %}"><span class="label small">{{b.format}}</span></a></i> {% if not b.format in nozip %} <i><a href="{% url 'opds_catalog:download' b.id 1 %}"><span class="label small">{{b.format}}+zip</span></a></i> {% endif %} {% if b.format == 'fb2' and fb2toepub %} <i><a href="{% url 'opds_catalog:convert' b.id 'epub' %}"><span class="label small">epub</span></a></i> {% endif %} Loading sopds_web_backend/views.py +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ def sopds_processor(request): args['splititems'] = config.SOPDS_SPLITITEMS args['fb2tomobi'] = (config.SOPDS_FB2TOMOBI!="") args['fb2toepub'] = (config.SOPDS_FB2TOEPUB!="") args['nozip'] = settings.NOZIP_FORMATS if config.SOPDS_ALPHABET_MENU: args['lang_menu'] = lang_menu Loading Loading
opds_catalog/feeds.py +9 −2 Original line number Diff line number Diff line Loading @@ -293,12 +293,19 @@ class CatalogsFeed(AuthFeed): if item['is_catalog']: return (opdsEnclosure(reverse("opds_catalog:cat_tree", kwargs={"cat_id":item['id']}),"application/atom+xml;profile=opds-catalog;kind=navigation", "subsection"),) else: return ( enclosure = [ opdsEnclosure(reverse("opds_catalog:download", kwargs={"book_id":item['id'],"zip_flag":0}),"application/%s"%item['format'] ,"http://opds-spec.org/acquisition/open-access"), opdsEnclosure(reverse("opds_catalog:download", kwargs={"book_id":item['id'],"zip_flag":1}),"application/%s+zip"%item['format'], "http://opds-spec.org/acquisition/open-access"), opdsEnclosure(reverse("opds_catalog:cover", kwargs={"book_id":item['id']}),"image/jpeg", "http://opds-spec.org/image"), opdsEnclosure(reverse("opds_catalog:thumb", kwargs={"book_id": item['id']}), "image/jpeg","http://opds-spec.org/thumbnail"), ) ] if (config.SOPDS_FB2TOEPUB!="") and (item['format']=='fb2'): enclosure += [opdsEnclosure(reverse("opds_catalog:convert", kwargs={"book_id":item['id'],"convert_type":"epub"}),"application/epub+zip","http://opds-spec.org/acquisition/open-access")] if (config.SOPDS_FB2TOMOBI!="") and (item['format']=='fb2'): enclosure += [opdsEnclosure(reverse("opds_catalog:convert", kwargs={"book_id":item['id'],"convert_type":"mobi"}),"application/mobi","http://opds-spec.org/acquisition/open-access")] return enclosure def item_description(self, item): if item['is_catalog']: Loading
opds_catalog/settings.py +1 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ from django.utils import translation from constance import config loglevels={'debug':logging.DEBUG,'info':logging.INFO,'warning':logging.WARNING,'error':logging.ERROR,'critical':logging.CRITICAL,'none':logging.NOTSET} NOZIP_FORMATS = ['epub', 'mobi'] VERSION = "0.42-dev" TITLE = getattr(settings, "SOPDS_TITLE", "SimpleOPDS") Loading
sopds_web_backend/templates/sopds_books.html +3 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,9 @@ <b>{{ b.title }}</b> <i style="font-size:80%;">{% trans "Download:" %} </i> <i><a href="{% url 'opds_catalog:download' b.id 0 %}"><span class="label small">{{b.format}}</span></a></i> {% if not b.format in nozip %} <i><a href="{% url 'opds_catalog:download' b.id 1 %}"><span class="label small">{{b.format}}+zip</span></a></i> {% endif %} {% if b.format == 'fb2' and fb2toepub %} <i><a href="{% url 'opds_catalog:convert' b.id 'epub' %}"><span class="label small">epub</span></a></i> {% endif %} Loading
sopds_web_backend/views.py +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ def sopds_processor(request): args['splititems'] = config.SOPDS_SPLITITEMS args['fb2tomobi'] = (config.SOPDS_FB2TOMOBI!="") args['fb2toepub'] = (config.SOPDS_FB2TOEPUB!="") args['nozip'] = settings.NOZIP_FORMATS if config.SOPDS_ALPHABET_MENU: args['lang_menu'] = lang_menu Loading