mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-28 12:30:00 +00:00
Merge branch 'master' into development
This commit is contained in:
commit
0aa33d88a5
@ -624,6 +624,8 @@ class CalibreDB():
|
|||||||
.join(*join, isouter=True) \
|
.join(*join, isouter=True) \
|
||||||
.filter(db_filter) \
|
.filter(db_filter) \
|
||||||
.filter(self.common_filters(allow_show_archived))
|
.filter(self.common_filters(allow_show_archived))
|
||||||
|
entries = list()
|
||||||
|
pagination = list()
|
||||||
try:
|
try:
|
||||||
pagination = Pagination(page, pagesize,
|
pagination = Pagination(page, pagesize,
|
||||||
len(query.all()))
|
len(query.all()))
|
||||||
|
@ -156,7 +156,7 @@ class WebServer(object):
|
|||||||
os.name == "nt"
|
os.name == "nt"
|
||||||
and __main__.__package__ == ""
|
and __main__.__package__ == ""
|
||||||
and not os.path.exists(py_script)
|
and not os.path.exists(py_script)
|
||||||
and os.path.exists(f"{py_script}.exe")
|
and os.path.exists("{}.exe".format(py_script))
|
||||||
):
|
):
|
||||||
# Executed a file, like "python app.py".
|
# Executed a file, like "python app.py".
|
||||||
py_script = os.path.abspath(py_script)
|
py_script = os.path.abspath(py_script)
|
||||||
@ -164,7 +164,7 @@ class WebServer(object):
|
|||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
# Windows entry points have ".exe" extension and should be
|
# Windows entry points have ".exe" extension and should be
|
||||||
# called directly.
|
# called directly.
|
||||||
if not os.path.exists(py_script) and os.path.exists(f"{py_script}.exe"):
|
if not os.path.exists(py_script) and os.path.exists("{}.exe".format(py_script)):
|
||||||
py_script += ".exe"
|
py_script += ".exe"
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -185,7 +185,7 @@ class WebServer(object):
|
|||||||
name = os.path.splitext(os.path.basename(py_script))[0]
|
name = os.path.splitext(os.path.basename(py_script))[0]
|
||||||
|
|
||||||
if name != "__main__":
|
if name != "__main__":
|
||||||
py_module += f".{name}"
|
py_module += ".{}".format(name)
|
||||||
else:
|
else:
|
||||||
# Incorrectly rewritten by pydevd debugger from "-m script" to "script".
|
# Incorrectly rewritten by pydevd debugger from "-m script" to "script".
|
||||||
py_module = py_script
|
py_module = py_script
|
||||||
|
Loading…
Reference in New Issue
Block a user