-
Notifications
You must be signed in to change notification settings - Fork 40
Description
- The Plugin is up to date
- Obsidian is up to date
Describe the bug
Adding book by ID or title is missing expected metadata from open library.
To Reproduce
Add book by title: "Project Hail Mary"
Expected behavior
Selecting the first result which looks correct doesn't actually fetch all metadata (particularly isbn is missing). It also seems to select a weird edition or version. I imagine for most people this is the desired result, but we end up with this. I'm not sure if this is related or causing the issue.
Plugin version
0.8.0
Additional context
I can't tell if the query is missing the required fields to return that OpenLibrary specifies, or this is an error related to matching content with multiple entries, or some other failure with the search functionality. I've tried both searching by Title and also searching by ID (of the work returned by searching by title), and in both cases, some metadata is returned, but ISBN is missing. This is true of three books I tried tonight.
Search by title query response from dev tools console in obsidian:
Request URL:
https://openlibrary.org/search.json?title=Project%20Hail%20Mary
{
"numFound": 6,
"start": 0,
"numFoundExact": true,
"num_found": 6,
"documentation_url": "https://openlibrary.org/dev/docs/api/search",
"q": "",
"offset": null,
"docs": [
{
"author_key": [
"OL7234434A"
],
"author_name": [
"Andy Weir"
],
"cover_edition_key": "OL32553390M",
"cover_i": 11200092,
"ebook_access": "no_ebook",
"edition_count": 22,
"first_publish_year": 2021,
"has_fulltext": false,
"key": "/works/OL21745884W",
"language": [
"fin",
"ger",
"eng"
],
"public_scan_b": false,
"title": "Project Hail Mary"
},
{
"author_key": [
"OL9813195A"
],
"author_name": [
"Unique Summary"
],
"ebook_access": "no_ebook",
"edition_count": 1,
"first_publish_year": 2021,
"has_fulltext": false,
"key": "/works/OL25960717W",
"language": [
"eng"
],
"public_scan_b": false,
"title": "SUMMARY and REVIEW : PROJECT HAIL MARY"
},
{
"ebook_access": "no_ebook",
"edition_count": 1,
"first_publish_year": 2021,
"has_fulltext": false,
"key": "/works/OL26086346W",
"language": [
"eng"
],
"public_scan_b": false,
"title": "Summary of Andy Weir's Project Hail Mary"
},
{
"author_key": [
"OL10293755A"
],
"author_name": [
"Antoine McCallan"
],
"ebook_access": "no_ebook",
"edition_count": 1,
"first_publish_year": 2021,
"has_fulltext": false,
"key": "/works/OL27881734W",
"language": [
"eng"
],
"public_scan_b": false,
"title": "Summary of Project Hail Mary by Andy Weir"
},
{
"author_key": [
"OL9658335A"
],
"author_name": [
"Good Reads Publishing"
],
"ebook_access": "no_ebook",
"edition_count": 1,
"first_publish_year": 2021,
"has_fulltext": false,
"key": "/works/OL27267403W",
"language": [
"eng"
],
"public_scan_b": false,
"title": "Summary and Analysis of Project Hail Mary by Andy Weir"
},
{
"author_key": [
"OL7234434A"
],
"author_name": [
"Andy Weir"
],
"ebook_access": "no_ebook",
"edition_count": 1,
"first_publish_year": 2022,
"has_fulltext": false,
"key": "/works/OL36735881W",
"language": [
"eng"
],
"public_scan_b": false,
"title": "Andy Weir's 3-Book Collection Set (Project Hail Mary, Artemis, the Martian)"
}
]
}When you select the first entry in the list of returned results, the following query gets fired:
Request URL:
https://openlibrary.org/search.json?q=key:%2Fworks%2FOL21745884W
Result:
{
"numFound": 1,
"start": 0,
"numFoundExact": true,
"num_found": 1,
"q": "key:/works/OL21745884W",
"documentation_url": "https://openlibrary.org/dev/docs/api/search",
"docs": [
{
"author_key": [
"OL7234434A"
],
"author_name": [
"Andy Weir"
],
"cover_edition_key": "OL32553390M",
"cover_i": 11200092,
"ebook_access": "no_ebook",
"edition_count": 22,
"first_publish_year": 2021,
"has_fulltext": false,
"key": "/works/OL21745884W",
"language": [
"fin",
"ger",
"eng"
],
"public_scan_b": false,
"title": "Project Hail Mary"
}
]
}