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
53603f79
Commit
53603f79
authored
Jul 31, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get_meta button unfocused on return to edit books
parent
250cafe8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
comicvine.py
cps/metadata_provider/comicvine.py
+1
-1
scholar.py
cps/metadata_provider/scholar.py
+2
-2
edit_books.js
cps/static/js/edit_books.js
+1
-0
get_meta.js
cps/static/js/get_meta.js
+5
-0
book_edit.html
cps/templates/book_edit.html
+2
-2
No files found.
cps/metadata_provider/comicvine.py
View file @
53603f79
...
...
@@ -31,7 +31,7 @@ class ComicVine(Metadata):
apikey
=
"57558043c53943d5d1e96a9ad425b0eb85532ee6"
if
self
.
active
:
headers
=
{
'User-Agent'
:
'Not Evil Browser'
# ,
'User-Agent'
:
'Not Evil Browser'
}
result
=
requests
.
get
(
"https://comicvine.gamespot.com/api/search?api_key="
...
...
cps/metadata_provider/scholar.py
View file @
53603f79
...
...
@@ -17,8 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
scholarly
import
scholarly
from
flask
import
url_for
import
json
from
cps.services.Metadata
import
Metadata
#try:
...
...
@@ -51,7 +51,7 @@ class scholar(Metadata):
v
[
'tags'
]
=
""
v
[
'ratings'
]
=
0
v
[
'series'
]
=
""
v
[
'cover'
]
=
"/../../../static/generic_cover.jpg"
v
[
'cover'
]
=
url_for
(
'static'
,
filename
=
'generic_cover.jpg'
)
v
[
'url'
]
=
""
v
[
'source'
]
=
{
"id"
:
self
.
__id__
,
...
...
cps/static/js/edit_books.js
View file @
53603f79
...
...
@@ -269,3 +269,4 @@ $("#xchange").click(function () {
$
(
"#book_title"
).
val
(
$
(
"#bookAuthor"
).
val
());
$
(
"#bookAuthor"
).
val
(
title
);
});
cps/static/js/get_meta.js
View file @
53603f79
...
...
@@ -107,4 +107,9 @@ $(function () {
$
(
"#keyword"
).
val
(
bookTitle
);
doSearch
(
bookTitle
);
});
$
(
"#metaModal"
).
on
(
"show.bs.modal"
,
function
(
e
)
{
$
(
e
.
relatedTarget
).
one
(
'focus'
,
function
(
e
)
{
$
(
this
).
blur
();
});
});
});
cps/templates/book_edit.html
View file @
53603f79
...
...
@@ -232,7 +232,7 @@
<form
class=
"padded-bottom"
id=
"meta-search"
>
<div
class=
"input-group"
>
<label
class=
"sr-only"
for=
"keyword"
>
{{_('Keyword')}}
</label>
<input
type=
"text"
class=
"form-control"
id=
"keyword"
name=
"keyword"
placeholder=
"{{_("
Search
keyword
")}}"
>
<input
type=
"text"
class=
"form-control"
id=
"keyword"
name=
"keyword"
placeholder=
"{{_("
Search
keyword
")}}"
>
<span
class=
"input-group-btn"
>
<button
type=
"submit"
class=
"btn btn-primary"
id=
"do-search"
>
{{_("Search")}}
</button>
</span>
...
...
@@ -262,7 +262,7 @@
<
img
class
=
"pull-left img-responsive"
data
-
toggle
=
"modal"
data
-
target
=
"#metaModal"
src
=
"<%= cover || "
{{
url_for
(
'static'
,
filename
=
'img/academicpaper.svg'
)
}}
"
%>"
src
=
"<%= cover || "
{{
url_for
(
'static'
,
filename
=
'img/academicpaper.svg'
)
}}
" %>"
alt
=
"Cover"
>
<
div
class
=
"media-body"
>
...
...
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