mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix regression affecting conversion of CBR files in the GUI. Use absolute URLs in the content server to facilitate reverse proxying
This commit is contained in:
parent
eccfcbf586
commit
eea093014c
@ -62,7 +62,8 @@ def convert_single_epub(parent, db, comics, others):
|
|||||||
for fmt in ['cbz', 'cbr']:
|
for fmt in ['cbz', 'cbr']:
|
||||||
try:
|
try:
|
||||||
data = db.format(row, fmt.upper())
|
data = db.format(row, fmt.upper())
|
||||||
break
|
if data is not None:
|
||||||
|
break
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
pt = PersistentTemporaryFile('.'+fmt)
|
pt = PersistentTemporaryFile('.'+fmt)
|
||||||
@ -121,7 +122,8 @@ def convert_single_lrf(parent, db, comics, others):
|
|||||||
for fmt in ['cbz', 'cbr']:
|
for fmt in ['cbz', 'cbr']:
|
||||||
try:
|
try:
|
||||||
data = db.format(row, fmt.upper())
|
data = db.format(row, fmt.upper())
|
||||||
break
|
if data is not None:
|
||||||
|
break
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
if data is None:
|
if data is None:
|
||||||
@ -207,7 +209,7 @@ def convert_bulk_epub(parent, db, comics, others):
|
|||||||
for fmt in ['cbz', 'cbr']:
|
for fmt in ['cbz', 'cbr']:
|
||||||
try:
|
try:
|
||||||
data = db.format(row, fmt.upper())
|
data = db.format(row, fmt.upper())
|
||||||
if data:
|
if data is not None:
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
@ -302,7 +304,7 @@ def convert_bulk_lrf(parent, db, comics, others):
|
|||||||
for fmt in ['cbz', 'cbr']:
|
for fmt in ['cbz', 'cbr']:
|
||||||
try:
|
try:
|
||||||
data = db.format(row, fmt.upper())
|
data = db.format(row, fmt.upper())
|
||||||
if data:
|
if data is not None:
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
@ -1160,6 +1160,8 @@ books_series_link feeds
|
|||||||
for row in rows:
|
for row in rows:
|
||||||
self.conn.execute('INSERT INTO %s VALUES(%s)'%(table, ','.join(repeat('?', len(row)))), row)
|
self.conn.execute('INSERT INTO %s VALUES(%s)'%(table, ','.join(repeat('?', len(row)))), row)
|
||||||
|
|
||||||
|
self.conn.commit()
|
||||||
|
self.refresh('timestamp', True)
|
||||||
for i, book in enumerate(books):
|
for i, book in enumerate(books):
|
||||||
progress.setLabelText(header+_(u'Copying <b>%s</b>')%book[1])
|
progress.setLabelText(header+_(u'Copying <b>%s</b>')%book[1])
|
||||||
id = book[0]
|
id = book[0]
|
||||||
|
@ -40,7 +40,8 @@ function create_table_headers() {
|
|||||||
|
|
||||||
|
|
||||||
function format_url(format, id, title) {
|
function format_url(format, id, title) {
|
||||||
return '/get/'+format.toLowerCase() + '/'+title + '_' + id+'.'+format.toLowerCase();
|
return self.location.pathname.substring(0,self.location.pathname.lastIndexOf('/')) +
|
||||||
|
'/get/'+format.toLowerCase() + '/'+title + '_' + id+'.'+format.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
function render_book(book) {
|
function render_book(book) {
|
||||||
@ -60,7 +61,7 @@ function render_book(book) {
|
|||||||
title += ' ({0} MB) '.format(size);
|
title += ' ({0} MB) '.format(size);
|
||||||
}
|
}
|
||||||
if (tags) title += '[{0}]'.format(tags);
|
if (tags) title += '[{0}]'.format(tags);
|
||||||
title += '<img style="display:none" alt="" src="/get/cover/{0}" /></span>'.format(id);
|
title += '<img style="display:none" alt="" src="{1}/get/cover/{0}" /></span>'.format(id, self.location.pathname.substring(0,self.location.pathname.lastIndexOf('/')));
|
||||||
title += '<p class="comments">{0}</p>'.format(comments)
|
title += '<p class="comments">{0}</p>'.format(comments)
|
||||||
// Render authors cell
|
// Render authors cell
|
||||||
var _authors = new Array();
|
var _authors = new Array();
|
||||||
@ -123,7 +124,7 @@ function fetch_library_books(start, num, timeout, sort, order, search) {
|
|||||||
|
|
||||||
current_library_request = $.ajax({
|
current_library_request = $.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: "/library",
|
url: self.location.pathname.substring(0,self.location.pathname.lastIndexOf('/'))+"/library",
|
||||||
data: data,
|
data: data,
|
||||||
cache: false,
|
cache: false,
|
||||||
timeout: timeout, //milliseconds
|
timeout: timeout, //milliseconds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user