Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
361a1243
Commit
361a1243
authored
Feb 27, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements #828
parent
fad62a09
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
66 deletions
+63
-66
uploadprogress.js
cps/static/js/uploadprogress.js
+2
-2
layout.html
cps/templates/layout.html
+2
-1
messages.mo
cps/translations/de/LC_MESSAGES/messages.mo
+0
-0
messages.po
cps/translations/de/LC_MESSAGES/messages.po
+52
-52
web.py
cps/web.py
+7
-11
No files found.
cps/static/js/uploadprogress.js
View file @
361a1243
...
...
@@ -132,8 +132,8 @@
// Replace the contents of the form, with the returned html
if
(
xhr
.
status
===
422
)
{
var
newHtml
=
$
.
parseHTML
(
xhr
.
responseText
);
this
.
replace_form
(
newHtml
);
this
.
$modal
.
modal
(
"hide"
);
this
.
$modalBar
.
text
(
newHtml
[
0
].
data
);
//
this.$modal.modal("hide");
}
// Write the error response to the document.
else
{
...
...
cps/templates/layout.html
View file @
361a1243
...
...
@@ -62,7 +62,8 @@
<li>
<form
id=
"form-upload"
class=
"navbar-form"
action=
"{{ url_for('upload') }}"
method=
"post"
enctype=
"multipart/form-data"
>
<div
class=
"form-group"
>
<span
class=
"btn btn-default btn-file"
>
{{_('Upload')}}
<input
id=
"btn-upload"
name=
"btn-upload"
type=
"file"
multiple
></span>
<span
class=
"btn btn-default btn-file"
>
{{_('Upload')}}
<input
id=
"btn-upload"
name=
"btn-upload"
type=
"file"
accept=
"{% for format in accept %}.{{format}}{{ ',' if not loop.last }}{% endfor %}"
multiple
></span>
</div>
</form>
</li>
...
...
cps/translations/de/LC_MESSAGES/messages.mo
View file @
361a1243
No preview for this file type
cps/translations/de/LC_MESSAGES/messages.po
View file @
361a1243
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Calibre-Web\n"
"Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n"
"POT-Creation-Date: 2019-02-2
4 19:21
+0100\n"
"POT-Creation-Date: 2019-02-2
7 19:28
+0100\n"
"PO-Revision-Date: 2019-02-24 19:15+0100\n"
"Last-Translator: Ozzie Isaacs\n"
"Language: de\n"
...
...
@@ -310,7 +310,7 @@ msgstr "Kategorieliste"
msgid "Category: %(name)s"
msgstr "Kategorie: %(name)s"
#: cps/templates/layout.html:7
2
cps/web.py:1628
#: cps/templates/layout.html:7
3
cps/web.py:1628
msgid "Tasks"
msgstr "Aufgaben"
...
...
@@ -357,12 +357,12 @@ msgid "search"
msgstr "Suche"
#: cps/templates/index.xml:47 cps/templates/index.xml:51
#: cps/templates/layout.html:14
7
cps/web.py:2095
#: cps/templates/layout.html:14
8
cps/web.py:2095
msgid "Read Books"
msgstr "Gelesene Bücher"
#: cps/templates/index.xml:55 cps/templates/index.xml:59
#: cps/templates/layout.html:1
49
cps/web.py:2098
#: cps/templates/layout.html:1
50
cps/web.py:2098
msgid "Unread Books"
msgstr "Ungelesene Bücher"
...
...
@@ -667,16 +667,16 @@ msgstr "Buch öffnen fehlgeschlagen. Datei existiert nicht, oder ist nicht zugä
msgid "edit metadata"
msgstr "Metadaten editieren"
#: cps/web.py:3490 cps/web.py:373
7
#: cps/web.py:3490 cps/web.py:373
6
#, python-format
msgid "File extension '%(ext)s' is not allowed to be uploaded to this server"
msgstr "Dateiendung '%(ext)s' kann nicht auf diesen Server hochgeladen werden"
#: cps/web.py:3494 cps/web.py:37
41
#: cps/web.py:3494 cps/web.py:37
39
msgid "File to be uploaded must have an extension"
msgstr "Dateien müssen eine Erweiterung haben, um hochgeladen zu werden"
#: cps/web.py:3506 cps/web.py:37
61
#: cps/web.py:3506 cps/web.py:37
58
#, python-format
msgid "Failed to create path %(path)s (Permission denied)."
msgstr "Fehler beim Erzeugen des Pfads %(path)s (Zugriff verweigert)"
...
...
@@ -726,31 +726,31 @@ msgstr "Metadaten wurden erfolgreich aktualisiert"
msgid "Error editing book, please check logfile for details"
msgstr "Fehler beim Editieren des Buchs, Details im Logfile"
#: cps/web.py:376
6
#: cps/web.py:376
2
#, python-format
msgid "Failed to store file %(file)s (Permission denied)."
msgstr "Fehler beim speichern der Datei %(file)s (Zugriff verweigert)"
#: cps/web.py:37
71
#: cps/web.py:37
67
#, python-format
msgid "Failed to delete file %(file)s (Permission denied)."
msgstr "Fehler beim Löschen von Datei %(file)s (Zugriff verweigert)"
#: cps/web.py:385
4
#: cps/web.py:385
0
#, python-format
msgid "File %(title)s"
msgstr "Datei %(title)s"
#: cps/web.py:38
83
#: cps/web.py:38
79
msgid "Source or destination format for conversion missing"
msgstr "Quell- oder Zielformat für Konvertierung fehlt"
#: cps/web.py:38
93
#: cps/web.py:38
89
#, python-format
msgid "Book successfully queued for converting to %(book_format)s"
msgstr "Buch wurde erfolgreich für die Konvertierung in das %(book_format)s Format eingereiht"
#: cps/web.py:389
7
#: cps/web.py:389
3
#, python-format
msgid "There was an error converting this book: %(res)s"
msgstr "Es trat ein Fehlker beim Konvertieren des Buches auf: %(res)s"
...
...
@@ -785,7 +785,7 @@ msgstr "Kindle"
msgid "DLS"
msgstr "DLS"
#: cps/templates/admin.html:13 cps/templates/layout.html:7
5
#: cps/templates/admin.html:13 cps/templates/layout.html:7
6
msgid "Admin"
msgstr "Admin"
...
...
@@ -996,7 +996,7 @@ msgstr "Beschreibung"
msgid "Tags"
msgstr "Tags"
#: cps/templates/book_edit.html:75 cps/templates/layout.html:15
8
#: cps/templates/book_edit.html:75 cps/templates/layout.html:15
9
#: cps/templates/search_form.html:53
msgid "Series"
msgstr "Serien"
...
...
@@ -1090,8 +1090,8 @@ msgstr "Klicke auf das Bild um die Metadaten zu übertragen"
msgid "Loading..."
msgstr "Lade..."
#: cps/templates/book_edit.html:239 cps/templates/layout.html:22
5
#: cps/templates/layout.html:25
7
#: cps/templates/book_edit.html:239 cps/templates/layout.html:22
6
#: cps/templates/layout.html:25
8
msgid "Close"
msgstr "Schließen"
...
...
@@ -1259,7 +1259,7 @@ msgstr "Pfad zu Konvertertool"
msgid "Location of Unrar binary"
msgstr "Pfad zum UnRar Programm"
#: cps/templates/config_edit.html:229 cps/templates/layout.html:8
3
#: cps/templates/config_edit.html:229 cps/templates/layout.html:8
4
#: cps/templates/login.html:4
msgid "Login"
msgstr "Login"
...
...
@@ -1268,8 +1268,8 @@ msgstr "Login"
msgid "View Configuration"
msgstr "Ansichtskonfiguration"
#: cps/templates/config_view_edit.html:19 cps/templates/layout.html:13
4
#: cps/templates/layout.html:13
5
cps/templates/shelf_edit.html:7
#: cps/templates/config_view_edit.html:19 cps/templates/layout.html:13
5
#: cps/templates/layout.html:13
6
cps/templates/shelf_edit.html:7
msgid "Title"
msgstr "Titel"
...
...
@@ -1489,7 +1489,7 @@ msgstr "Hinzufügen"
msgid "Do you really want to delete this domain rule?"
msgstr "Soll diese Domain Regel wirklich gelöscht werden?"
#: cps/templates/feed.xml:21 cps/templates/layout.html:2
09
#: cps/templates/feed.xml:21 cps/templates/layout.html:2
10
msgid "Next"
msgstr "Nächste"
...
...
@@ -1510,7 +1510,7 @@ msgstr "Entdecke (Zufälliges Buch)"
msgid "Start"
msgstr "Start"
#: cps/templates/index.xml:18 cps/templates/layout.html:14
0
#: cps/templates/index.xml:18 cps/templates/layout.html:14
1
msgid "Hot Books"
msgstr "Beliebte Bücher"
...
...
@@ -1518,7 +1518,7 @@ msgstr "Beliebte Bücher"
msgid "Popular publications from this catalog based on Downloads."
msgstr "Beliebte Publikationen aus dieser Bibliothek basierend auf Downloadzahlen."
#: cps/templates/index.xml:25 cps/templates/layout.html:14
3
#: cps/templates/index.xml:25 cps/templates/layout.html:14
4
msgid "Best rated Books"
msgstr "Best bewertete Bücher"
...
...
@@ -1538,7 +1538,7 @@ msgstr "Die neuesten Bücher"
msgid "Show Random Books"
msgstr "Zeige zufällige Bücher"
#: cps/templates/index.xml:62 cps/templates/layout.html:16
1
#: cps/templates/index.xml:62 cps/templates/layout.html:16
2
msgid "Authors"
msgstr "Autoren"
...
...
@@ -1546,7 +1546,7 @@ msgstr "Autoren"
msgid "Books ordered by Author"
msgstr "Bücher nach Autoren sortiert"
#: cps/templates/index.xml:69 cps/templates/layout.html:16
4
#: cps/templates/index.xml:69 cps/templates/layout.html:16
5
msgid "Publishers"
msgstr "Verleger"
...
...
@@ -1562,7 +1562,7 @@ msgstr "Bücher nach Kategorien sortiert"
msgid "Books ordered by series"
msgstr "Bücher nach Reihen geordnet"
#: cps/templates/index.xml:90 cps/templates/layout.html:17
0
#: cps/templates/index.xml:90 cps/templates/layout.html:17
1
msgid "Public Shelves"
msgstr "Öffentliche Bücherregale"
...
...
@@ -1570,7 +1570,7 @@ msgstr "Öffentliche Bücherregale"
msgid "Books organized in public shelfs, visible to everyone"
msgstr "Bücher organisiert in öffentlichem Bücherregal, sichtbar für jedermann"
#: cps/templates/index.xml:98 cps/templates/layout.html:17
4
#: cps/templates/index.xml:98 cps/templates/layout.html:17
5
msgid "Your Shelves"
msgstr "Deine Bücherregale"
...
...
@@ -1590,99 +1590,99 @@ msgstr "Nagivation umschalten"
msgid "Advanced Search"
msgstr "Erweiterte Suche"
#: cps/templates/layout.html:7
5
cps/templates/read.html:71
#: cps/templates/layout.html:7
6
cps/templates/read.html:71
#: cps/templates/readcbr.html:79 cps/templates/readcbr.html:103
msgid "Settings"
msgstr "Einstellungen"
#: cps/templates/layout.html:7
7
#: cps/templates/layout.html:7
8
msgid "Account"
msgstr "Benutzerkonto"
#: cps/templates/layout.html:
79
#: cps/templates/layout.html:
80
msgid "Logout"
msgstr "Logout"
#: cps/templates/layout.html:8
4
cps/templates/register.html:14
#: cps/templates/layout.html:8
5
cps/templates/register.html:14
msgid "Register"
msgstr "Registrieren"
#: cps/templates/layout.html:11
0 cps/templates/layout.html:256
#: cps/templates/layout.html:11
1 cps/templates/layout.html:257
msgid "Uploading..."
msgstr "Hochladen..."
#: cps/templates/layout.html:11
1
#: cps/templates/layout.html:11
2
msgid "please don't refresh the page"
msgstr "Bitte die Seite nicht neu laden"
#: cps/templates/layout.html:12
1
#: cps/templates/layout.html:12
2
msgid "Browse"
msgstr "Browsen"
#: cps/templates/layout.html:12
3
#: cps/templates/layout.html:12
4
msgid "Recently Added"
msgstr "Kürzlich hinzugefügt"
#: cps/templates/layout.html:12
8
#: cps/templates/layout.html:12
9
msgid "Sorted Books"
msgstr "Bücher Sortiert"
#: cps/templates/layout.html:13
2 cps/templates/layout.html:133
#: cps/templates/layout.html:13
4 cps/templates/layout.html:135
#: cps/templates/layout.html:13
3 cps/templates/layout.html:134
#: cps/templates/layout.html:13
5 cps/templates/layout.html:136
msgid "Sort By"
msgstr "Sortiert nach"
#: cps/templates/layout.html:13
2
#: cps/templates/layout.html:13
3
msgid "Newest"
msgstr "Neueste"
#: cps/templates/layout.html:13
3
#: cps/templates/layout.html:13
4
msgid "Oldest"
msgstr "Älteste"
#: cps/templates/layout.html:13
4
#: cps/templates/layout.html:13
5
msgid "Ascending"
msgstr "Aufsteigend"
#: cps/templates/layout.html:13
5
#: cps/templates/layout.html:13
6
msgid "Descending"
msgstr "Absteigend"
#: cps/templates/layout.html:15
2
#: cps/templates/layout.html:15
3
msgid "Discover"
msgstr "Entdecke"
#: cps/templates/layout.html:15
5
#: cps/templates/layout.html:15
6
msgid "Categories"
msgstr "Kategorien"
#: cps/templates/layout.html:16
7
cps/templates/search_form.html:74
#: cps/templates/layout.html:16
8
cps/templates/search_form.html:74
msgid "Languages"
msgstr "Sprachen"
#: cps/templates/layout.html:1
79
#: cps/templates/layout.html:1
80
msgid "Create a Shelf"
msgstr "Bücherregal erzeugen"
#: cps/templates/layout.html:18
0
cps/templates/stats.html:3
#: cps/templates/layout.html:18
1
cps/templates/stats.html:3
msgid "About"
msgstr "Über"
#: cps/templates/layout.html:19
4
#: cps/templates/layout.html:19
5
msgid "Previous"
msgstr "Vorheriger"
#: cps/templates/layout.html:22
1
#: cps/templates/layout.html:22
2
msgid "Book Details"
msgstr "Buchdetails"
#: cps/templates/layout.html:25
5
#: cps/templates/layout.html:25
6
msgid "Upload done, processing, please wait..."
msgstr "Hochladen beendet, verarbeite Daten, bitte warten..."
#: cps/templates/layout.html:25
8
#: cps/templates/layout.html:25
9
msgid "Error"
msgstr "Feh
k
er"
msgstr "Feh
l
er"
#: cps/templates/login.html:8 cps/templates/login.html:9
#: cps/templates/register.html:7 cps/templates/user_edit.html:8
...
...
cps/web.py
View file @
361a1243
...
...
@@ -698,7 +698,7 @@ def render_xml_template(*args, **kwargs):
# Returns the template for redering and includes the instance name
def
render_title_template
(
*
args
,
**
kwargs
):
return
render_template
(
instance
=
config
.
config_calibre_web_title
,
*
args
,
**
kwargs
)
return
render_template
(
instance
=
config
.
config_calibre_web_title
,
accept
=
EXTENSIONS_UPLOAD
,
*
args
,
**
kwargs
)
@
app
.
before_request
...
...
@@ -3733,13 +3733,10 @@ def upload():
if
'.'
in
requested_file
.
filename
:
file_ext
=
requested_file
.
filename
.
rsplit
(
'.'
,
1
)[
-
1
]
.
lower
()
if
file_ext
not
in
EXTENSIONS_UPLOAD
:
flash
(
_
(
"File extension '
%(ext)
s' is not allowed to be uploaded to this server"
,
ext
=
file_ext
),
category
=
"error"
)
return
redirect
(
url_for
(
'index'
))
return
Response
(
_
(
"File extension '
%(ext)
s' is not allowed to be uploaded to this server"
,
ext
=
file_ext
)),
422
else
:
flash
(
_
(
'File to be uploaded must have an extension'
),
category
=
"error"
)
return
redirect
(
url_for
(
'index'
))
return
Response
(
_
(
'File to be uploaded must have an extension'
)),
422
# extract metadata from file
meta
=
uploader
.
upload
(
requested_file
)
...
...
@@ -3758,13 +3755,12 @@ def upload():
try
:
os
.
makedirs
(
filepath
)
except
OSError
:
flash
(
_
(
u"Failed to create path
%(path)
s (Permission denied)."
,
path
=
filepath
),
category
=
"error"
)
return
redirect
(
url_for
(
'index'
))
return
Response
(
_
(
u"Failed to create path
%(path)
s (Permission denied)."
,
path
=
filepath
)),
422
try
:
copyfile
(
meta
.
file_path
,
saved_filename
)
except
OSError
:
flash
(
_
(
u"Failed to store file
%(file)
s (Permission denied)."
,
file
=
saved_filename
),
category
=
"error"
)
return
redirect
(
url_for
(
'index'
))
return
Response
(
_
(
u"Failed to store file
%(file)
s (Permission denied)."
,
file
=
saved_filename
)),
422
try
:
os
.
unlink
(
meta
.
file_path
)
except
OSError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment