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
30d9991d
Commit
30d9991d
authored
Jul 07, 2018
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'Goodread_fix/patch-test'
parents
25f1226e
30799996
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
helper.py
cps/helper.py
+6
-1
web.py
cps/web.py
+7
-3
No files found.
cps/helper.py
View file @
30d9991d
...
...
@@ -332,7 +332,12 @@ def update_dir_stucture(book_id, calibrepath):
if
titledir
!=
new_titledir
:
try
:
new_title_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
path
),
new_titledir
)
if
not
os
.
path
.
exists
(
new_title_path
):
os
.
renames
(
path
,
new_title_path
)
else
:
for
dir_name
,
subdir_list
,
file_list
in
os
.
walk
(
path
):
for
file
in
file_list
:
os
.
renames
(
os
.
path
.
join
(
dir_name
,
file
),
os
.
path
.
join
(
new_title_path
+
dir_name
[
len
(
path
):],
file
))
path
=
new_title_path
localbook
.
path
=
localbook
.
path
.
split
(
'/'
)[
0
]
+
'/'
+
new_titledir
except
OSError
as
ex
:
...
...
cps/web.py
View file @
30d9991d
...
...
@@ -1226,9 +1226,13 @@ def author(book_id, page):
author_info
=
None
other_books
=
[]
if
goodreads_support
and
config
.
config_use_goodreads
:
try
:
gc
=
GoodreadsClient
(
config
.
config_goodreads_api_key
,
config
.
config_goodreads_api_secret
)
author_info
=
gc
.
find_author
(
author_name
=
name
)
other_books
=
get_unique_other_books
(
entries
.
all
(),
author_info
.
books
)
except
:
# Skip goodreads, if site is down/inaccessible
pass
return
render_title_template
(
'author.html'
,
entries
=
entries
,
pagination
=
pagination
,
title
=
name
,
author
=
author_info
,
other_books
=
other_books
)
...
...
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