mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 04:54:44 +01:00
Fix #1177158 (Can not download an ORIGINAL_xxxx format book via the content server)
This commit is contained in:
parent
bb9466e58e
commit
56afdebcf9
1 changed files with 1 additions and 2 deletions
|
|
@ -61,7 +61,6 @@ def last_modified(self, updated):
|
|||
8:'Aug', 9:'Sep', 10:'Oct', 11:'Nov', 12:'Dec'}
|
||||
return lm.replace('month', month[updated.month])
|
||||
|
||||
|
||||
def sort(self, items, field, order):
|
||||
field = self.db.data.sanitize_sort_field_name(field)
|
||||
if field not in self.db.field_metadata.sortable_field_keys():
|
||||
|
|
@ -77,7 +76,7 @@ def get(self, what, id):
|
|||
try:
|
||||
id = int(id)
|
||||
except ValueError:
|
||||
id = id.rpartition('_')[-1].partition('.')[0]
|
||||
id = id.rpartition('.')[0].rpartition('_')[-1]
|
||||
match = re.search(r'\d+', id)
|
||||
if not match:
|
||||
raise cherrypy.HTTPError(404, 'id:%s not an integer'%id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue