mirror of
https://github.com/evilhero/mylar
synced 2025-03-09 21:33:42 +00:00
OPDS Comics and Issues
This commit is contained in:
parent
acaf26e29f
commit
9e8020d4c0
2 changed files with 10 additions and 2 deletions
|
@ -22,6 +22,11 @@
|
||||||
<entry>
|
<entry>
|
||||||
<title>${entry['title']}</title>
|
<title>${entry['title']}</title>
|
||||||
<id>${entry['id']}</id>
|
<id>${entry['id']}</id>
|
||||||
|
%if entry['author']:
|
||||||
|
<author>
|
||||||
|
<name>${entry['author']}</name>
|
||||||
|
</author>
|
||||||
|
%endif
|
||||||
<updated>${entry['updated']}</updated>
|
<updated>${entry['updated']}</updated>
|
||||||
<content type="text">${entry['content']}</content>
|
<content type="text">${entry['content']}</content>
|
||||||
<link href="${entry['href']}" rel= "${entry['rel']}" type="application/atom+xml; profile=opds-catalog; kind=${entry['kind']}"/>
|
<link href="${entry['href']}" rel= "${entry['rel']}" type="application/atom+xml; profile=opds-catalog; kind=${entry['kind']}"/>
|
||||||
|
|
|
@ -280,7 +280,6 @@ class OPDS(object):
|
||||||
if len(comic) == 0:
|
if len(comic) == 0:
|
||||||
self.data = _error_with_message('Comic Not Found')
|
self.data = _error_with_message('Comic Not Found')
|
||||||
return
|
return
|
||||||
logger.info(comic)
|
|
||||||
issues = self._dic_from_query('SELECT * from issues WHERE ComicID="' + kwargs['comicid'] + '"order by Int_IssueNumber DESC')
|
issues = self._dic_from_query('SELECT * from issues WHERE ComicID="' + kwargs['comicid'] + '"order by Int_IssueNumber DESC')
|
||||||
if mylar.CONFIG.ANNUALS_ON:
|
if mylar.CONFIG.ANNUALS_ON:
|
||||||
annuals = self._dic_from_query('SELECT * FROM annuals WHERE ComicID="' + kwargs['comicid'] + '"')
|
annuals = self._dic_from_query('SELECT * FROM annuals WHERE ComicID="' + kwargs['comicid'] + '"')
|
||||||
|
@ -296,15 +295,19 @@ class OPDS(object):
|
||||||
updated = issue['DateAdded']
|
updated = issue['DateAdded']
|
||||||
else:
|
else:
|
||||||
updated = issue['ReleaseDate']
|
updated = issue['ReleaseDate']
|
||||||
|
fileloc = os.path.join(comic['ComicLocation'],issue['Location'])
|
||||||
|
metainfo = mylar.helpers.IssueDetails(fileloc)
|
||||||
entries.append(
|
entries.append(
|
||||||
{
|
{
|
||||||
'title': escape('%s - %s' % (issue['Issue_Number'], issue['IssueName'])),
|
'title': escape('%s - %s' % (issue['Issue_Number'], issue['IssueName'])),
|
||||||
'id': escape('comic:%s - %s' % (issue['ComicName'], issue['Issue_Number'])),
|
'id': escape('comic:%s - %s' % (issue['ComicName'], issue['Issue_Number'])),
|
||||||
'updated': updated,
|
'updated': updated,
|
||||||
'content': escape('%s - %s' % (issue['Issue_Number'], issue['IssueName'])),
|
'content': escape('%s' % (metainfo['summary'])),
|
||||||
'href': '/opds?cmd=Issue&issueid=%s' % quote_plus(issue['IssueID']),
|
'href': '/opds?cmd=Issue&issueid=%s' % quote_plus(issue['IssueID']),
|
||||||
'kind': 'acquisition',
|
'kind': 'acquisition',
|
||||||
'rel': 'acquisition',
|
'rel': 'acquisition',
|
||||||
|
'author': metainfo['writer']
|
||||||
|
''
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue