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:
Kovid Goyal 2008-11-07 13:11:33 -08:00
parent eccfcbf586
commit eea093014c
3 changed files with 13 additions and 8 deletions

View File

@ -62,6 +62,7 @@ def convert_single_epub(parent, db, comics, others):
for fmt in ['cbz', 'cbr']:
try:
data = db.format(row, fmt.upper())
if data is not None:
break
except:
continue
@ -121,6 +122,7 @@ def convert_single_lrf(parent, db, comics, others):
for fmt in ['cbz', 'cbr']:
try:
data = db.format(row, fmt.upper())
if data is not None:
break
except:
continue
@ -207,7 +209,7 @@ def convert_bulk_epub(parent, db, comics, others):
for fmt in ['cbz', 'cbr']:
try:
data = db.format(row, fmt.upper())
if data:
if data is not None:
break
except:
continue
@ -302,7 +304,7 @@ def convert_bulk_lrf(parent, db, comics, others):
for fmt in ['cbz', 'cbr']:
try:
data = db.format(row, fmt.upper())
if data:
if data is not None:
break
except:
continue

View File

@ -1160,6 +1160,8 @@ books_series_link feeds
for row in rows:
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):
progress.setLabelText(header+_(u'Copying <b>%s</b>')%book[1])
id = book[0]

View File

@ -40,7 +40,8 @@ function create_table_headers() {
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) {
@ -60,7 +61,7 @@ function render_book(book) {
title += '&nbsp;({0}&nbsp;MB)&nbsp;'.format(size);
}
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)
// Render authors cell
var _authors = new Array();
@ -123,7 +124,7 @@ function fetch_library_books(start, num, timeout, sort, order, search) {
current_library_request = $.ajax({
type: "GET",
url: "/library",
url: self.location.pathname.substring(0,self.location.pathname.lastIndexOf('/'))+"/library",
data: data,
cache: false,
timeout: timeout, //milliseconds