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
193605df
Commit
193605df
authored
Aug 20, 2017
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #286
parent
cf5e2f7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
helper.py
cps/helper.py
+1
-1
web.py
cps/web.py
+2
-2
No files found.
cps/helper.py
View file @
193605df
...
@@ -278,7 +278,7 @@ def get_valid_filename(value, replace_whitespace=True):
...
@@ -278,7 +278,7 @@ def get_valid_filename(value, replace_whitespace=True):
else
:
else
:
value
=
unicode
(
re_slugify
.
sub
(
''
,
value
)
.
strip
())
value
=
unicode
(
re_slugify
.
sub
(
''
,
value
)
.
strip
())
if
replace_whitespace
:
if
replace_whitespace
:
#*+:\"/<>?
werden durch _ ersetzt
#*+:\"/<>?
are replaced by _
value
=
re
.
sub
(
'[
\
*
\
+:
\\\"
/<>
\
?]+'
,
u'_'
,
value
,
flags
=
re
.
U
)
value
=
re
.
sub
(
'[
\
*
\
+:
\\\"
/<>
\
?]+'
,
u'_'
,
value
,
flags
=
re
.
U
)
value
=
value
[:
128
]
value
=
value
[:
128
]
...
...
cps/web.py
View file @
193605df
...
@@ -2994,8 +2994,8 @@ def upload():
...
@@ -2994,8 +2994,8 @@ def upload():
tags
=
meta
.
tags
tags
=
meta
.
tags
series
=
meta
.
series
series
=
meta
.
series
series_index
=
meta
.
series_id
series_index
=
meta
.
series_id
title_dir
=
helper
.
get_valid_filename
(
title
,
False
)
title_dir
=
helper
.
get_valid_filename
(
title
)
author_dir
=
helper
.
get_valid_filename
(
author
,
False
)
author_dir
=
helper
.
get_valid_filename
(
author
)
data_name
=
title_dir
data_name
=
title_dir
filepath
=
config
.
config_calibre_dir
+
os
.
sep
+
author_dir
+
os
.
sep
+
title_dir
filepath
=
config
.
config_calibre_dir
+
os
.
sep
+
author_dir
+
os
.
sep
+
title_dir
saved_filename
=
filepath
+
os
.
sep
+
data_name
+
meta
.
extension
.
lower
()
saved_filename
=
filepath
+
os
.
sep
+
data_name
+
meta
.
extension
.
lower
()
...
...
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