1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-24 00:50:30 +00:00

Bugfixes load metadata

Improvements for testing load metadata
This commit is contained in:
Ozzie Isaacs 2022-01-07 12:40:03 +01:00
parent c830a5936e
commit e3dbf7a88d
4 changed files with 9 additions and 9 deletions

View File

@ -36,7 +36,7 @@ class ComicVine(Metadata):
result = requests.get("https://comicvine.gamespot.com/api/search?api_key="
+ apikey + "&resources=issue&query=" + query + "&sort=name:desc&format=json", headers=headers)
for r in result.json()['results']:
for r in result.json().get('results'):
seriesTitle = r['volume'].get('name', "")
if r.get('store_date'):
dateFomers = r.get('store_date')

View File

@ -30,7 +30,7 @@ class Google(Metadata):
if self.active:
val = list()
result = requests.get("https://www.googleapis.com/books/v1/volumes?q="+query.replace(" ","+"))
for r in result.json()['items']:
for r in result.json().get('items'):
v = dict()
v['id'] = r['id']
v['title'] = r['volumeInfo'].get('title',"")

View File

@ -40,7 +40,7 @@ $(function () {
$("#book_title").val(book.title);
$("#tags").val(uniqueTags.join(", "));
$("#rating").data("rating").setValue(Math.round(book.rating));
if(book.cover){
if(book.cover && $("#cover_url").length){
$(".cover img").attr("src", book.cover);
$("#cover_url").val(book.cover);
}

View File

@ -247,7 +247,7 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{_('Close')}}</button>
<button id="meta_close" type="button" class="btn btn-default" data-dismiss="modal">{{_('Close')}}</button>
</div>
</div>
</div>
@ -265,17 +265,17 @@
>
<div class="media-body">
<h4 class="media-heading">
<a href="<%= url %>" target="_blank" rel="noopener"><%= title %></a>
<a class="meta_title" href="<%= url %>" target="_blank" rel="noopener"><%= title %></a>
</h4>
<p>{{_('Author')}}<%= authors.join(" & ") %></p>
<p class="meta_author">{{_('Author')}}<%= authors.join(" & ") %></p>
<% if (publisher) { %>
<p>{{_('Publisher')}}<%= publisher %></p>
<p class="meta_publisher">{{_('Publisher')}}<%= publisher %></p>
<% } %>
<% if (description) { %>
<p>{{_('Description')}}: <%= description %></p>
<p class="meta_description">{{_('Description')}}: <%= description %></p>
<% } %>
<p>{{_('Source')}}:
<a href="<%= source.link %>" target="_blank" rel="noopener"><%= source.description %></a>
<a class="meta_source" href="<%= source.link %>" target="_blank" rel="noopener"><%= source.description %></a>
</p>
</div>
</li>