Skip to content

Commit 0061fa1

Browse files
authored
Update links for Internet Archive cover uploads
1 parent e0eeb42 commit 0061fa1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

openlibrary/templates/covers/add.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@
8181
$#</form>
8282

8383
$if doc.type.key == "/type/edition" and doc.ocaid:
84-
$ img_url = "https://archive.org/services/img/%s/full/pct:600/0/default.jpg" % doc.ocaid
85-
$:render_template("covers/external_image", action, img_url, _("Internet Archive"))
84+
$ img_url_cover = "https://archive.org/download/%s/page/cover" % doc.ocaid
85+
$ img_url_title = "https://archive.org/download/%s/page/title" % doc.ocaid
86+
$:render_template("covers/external_image", action, img_url_cover, img_url_title, _("Internet Archive"))
8687

8788
$if doc.type.key == "/type/author" and data.get('wikidata_images'):
88-
$ img_url = data.get('wikidata_images')[0]
89-
$:render_template("covers/external_image", action, img_url, _("Wikidata"))
89+
$ img_url_cover = data.get('wikidata_images')[0]
90+
$ img_url_title = None
91+
$:render_template("covers/external_image", action, img_url_cover, img_url_title, _("Wikidata"))

0 commit comments

Comments
 (0)