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
a4841836
Commit
a4841836
authored
May 21, 2020
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fiexes from tests
parent
b7549723
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
979 additions
and
219 deletions
+979
-219
admin.py
cps/admin.py
+11
-5
opds.py
cps/opds.py
+5
-1
Calibre-Web TestSummary.html
test/Calibre-Web TestSummary.html
+963
-213
No files found.
cps/admin.py
View file @
a4841836
...
...
@@ -544,13 +544,13 @@ def _configuration_logfile_helper(to_save, gdriveError):
reboot_required
|=
_config_int
(
to_save
,
"config_log_level"
)
reboot_required
|=
_config_string
(
to_save
,
"config_logfile"
)
if
not
logger
.
is_valid_logfile
(
config
.
config_logfile
):
return
_configuration_result
(
_
(
'Logfile Location is not Valid, Please Enter Correct Path'
),
gdriveError
)
return
reboot_required
,
_configuration_result
(
_
(
'Logfile Location is not Valid, Please Enter Correct Path'
),
gdriveError
)
reboot_required
|=
_config_checkbox_int
(
to_save
,
"config_access_log"
)
reboot_required
|=
_config_string
(
to_save
,
"config_access_logfile"
)
if
not
logger
.
is_valid_logfile
(
config
.
config_access_logfile
):
return
_configuration_result
(
_
(
'Access Logfile Location is not Valid, Please Enter Correct Path'
),
gdriveError
)
return
reboot_required
return
reboot_required
,
_configuration_result
(
_
(
'Access Logfile Location is not Valid, Please Enter Correct Path'
),
gdriveError
)
return
reboot_required
,
None
def
_configuration_ldap_helper
(
gdriveError
,
to_save
):
reboot_required
=
False
...
...
@@ -646,7 +646,10 @@ def _configuration_update_helper():
#LDAP configurator,
if
config
.
config_login_type
==
constants
.
LOGIN_LDAP
:
reboot_required
|=
_configuration_ldap_helper
(
to_save
,
gdriveError
)
reboot
,
message
=
_configuration_ldap_helper
(
to_save
,
gdriveError
)
if
message
:
return
message
reboot_required
|=
reboot
# Remote login configuration
_config_checkbox
(
to_save
,
"config_remote_login"
)
...
...
@@ -672,7 +675,10 @@ def _configuration_update_helper():
if
config
.
config_login_type
==
constants
.
LOGIN_OAUTH
:
_configuration_oauth_helper
(
to_save
)
reboot_required
|=
_configuration_logfile_helper
(
to_save
,
gdriveError
)
reboot
,
message
=
_configuration_logfile_helper
(
to_save
,
gdriveError
)
if
message
:
return
message
reboot_required
|=
reboot
# Rarfile Content configuration
_config_string
(
to_save
,
"config_rarfile_location"
)
unrar_status
=
helper
.
check_unrar
(
config
.
config_rarfile_location
)
...
...
cps/opds.py
View file @
a4841836
...
...
@@ -367,7 +367,11 @@ def feed_shelf(book_id):
@
requires_basic_auth_if_no_ano
@
download_required
def
opds_download_link
(
book_id
,
book_format
):
return
get_download_link
(
book_id
,
book_format
.
lower
())
if
"Kobo"
in
request
.
headers
.
get
(
'User-Agent'
):
client
=
"kobo"
else
:
client
=
""
return
get_download_link
(
book_id
,
book_format
.
lower
(),
client
)
@
opds
.
route
(
"/ajax/book/<string:uuid>/<library>"
)
...
...
test/Calibre-Web TestSummary.html
View file @
a4841836
This diff is collapsed.
Click to expand it.
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