Commit 34e9ef35 authored by OzzieIsaacs's avatar OzzieIsaacs

Code cosmetics

parent a159bb0b
This diff is collapsed.
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
* *
* http://kthoom.googlecode.com/hg/docs/unrar.html * http://kthoom.googlecode.com/hg/docs/unrar.html
*/ */
/* global bitjs */
// This file expects to be invoked as a Worker (see onmessage below). // This file expects to be invoked as a Worker (see onmessage below).
importScripts('io.js'); importScripts("io.js");
importScripts('archive.js'); importScripts("archive.js");
// Progress variables. // Progress variables.
var currentFilename = ""; var currentFilename = "";
......
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
* *
* TAR format: http://www.gnu.org/software/automake/manual/tar/Standard.html * TAR format: http://www.gnu.org/software/automake/manual/tar/Standard.html
*/ */
/* global bitjs */
// This file expects to be invoked as a Worker (see onmessage below). // This file expects to be invoked as a Worker (see onmessage below).
importScripts('io.js'); importScripts("io.js");
importScripts('archive.js'); importScripts("archive.js");
// Progress variables. // Progress variables.
var currentFilename = ""; var currentFilename = "";
......
...@@ -9,10 +9,11 @@ ...@@ -9,10 +9,11 @@
* ZIP format: http://www.pkware.com/documents/casestudies/APPNOTE.TXT * ZIP format: http://www.pkware.com/documents/casestudies/APPNOTE.TXT
* DEFLATE format: http://tools.ietf.org/html/rfc1951 * DEFLATE format: http://tools.ietf.org/html/rfc1951
*/ */
/* global bitjs */
// This file expects to be invoked as a Worker (see onmessage below). // This file expects to be invoked as a Worker (see onmessage below).
importScripts('io.js'); importScripts("io.js");
importScripts('archive.js'); importScripts("archive.js");
// Progress variables. // Progress variables.
var currentFilename = ""; var currentFilename = "";
......
...@@ -1808,12 +1808,12 @@ def read_book(book_id, book_format): ...@@ -1808,12 +1808,12 @@ def read_book(book_id, book_format):
elif book_format.lower() == "txt": elif book_format.lower() == "txt":
return render_title_template('readtxt.html', txtfile=book_id, title=_(u"Read a Book")) return render_title_template('readtxt.html', txtfile=book_id, title=_(u"Read a Book"))
else: else:
for format in ["cbr","cbt","cbz"]: for fileext in ["cbr","cbt","cbz"]:
if book_format.lower() == format: if book_format.lower() == fileext:
all_name = str(book_id) + "/" + book.data[0].name + "." + format all_name = str(book_id) + "/" + book.data[0].name + "." + fileext
tmp_file = os.path.join(book_dir, book.data[0].name) + "." + format tmp_file = os.path.join(book_dir, book.data[0].name) + "." + fileext
if not os.path.exists(all_name): if not os.path.exists(all_name):
cbr_file = os.path.join(config.config_calibre_dir, book.path, book.data[0].name) + "." + format cbr_file = os.path.join(config.config_calibre_dir, book.path, book.data[0].name) + "." + fileext
copyfile(cbr_file, tmp_file) copyfile(cbr_file, tmp_file)
return render_title_template('readcbr.html', comicfile=all_name, title=_(u"Read a Book")) return render_title_template('readcbr.html', comicfile=all_name, title=_(u"Read a Book"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment