mirror of
https://github.com/evilhero/mylar
synced 2025-03-09 13:24:53 +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>
|
||||
<title>${entry['title']}</title>
|
||||
<id>${entry['id']}</id>
|
||||
%if entry['author']:
|
||||
<author>
|
||||
<name>${entry['author']}</name>
|
||||
</author>
|
||||
%endif
|
||||
<updated>${entry['updated']}</updated>
|
||||
<content type="text">${entry['content']}</content>
|
||||
<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:
|
||||
self.data = _error_with_message('Comic Not Found')
|
||||
return
|
||||
logger.info(comic)
|
||||
issues = self._dic_from_query('SELECT * from issues WHERE ComicID="' + kwargs['comicid'] + '"order by Int_IssueNumber DESC')
|
||||
if mylar.CONFIG.ANNUALS_ON:
|
||||
annuals = self._dic_from_query('SELECT * FROM annuals WHERE ComicID="' + kwargs['comicid'] + '"')
|
||||
|
@ -296,15 +295,19 @@ class OPDS(object):
|
|||
updated = issue['DateAdded']
|
||||
else:
|
||||
updated = issue['ReleaseDate']
|
||||
fileloc = os.path.join(comic['ComicLocation'],issue['Location'])
|
||||
metainfo = mylar.helpers.IssueDetails(fileloc)
|
||||
entries.append(
|
||||
{
|
||||
'title': escape('%s - %s' % (issue['Issue_Number'], issue['IssueName'])),
|
||||
'id': escape('comic:%s - %s' % (issue['ComicName'], issue['Issue_Number'])),
|
||||
'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']),
|
||||
'kind': 'acquisition',
|
||||
'rel': 'acquisition',
|
||||
'author': metainfo['writer']
|
||||
''
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue