[Bug]: ASIN doesn't get stripped before Lookup #1731

Closed
opened 2026-04-24 23:56:13 +02:00 by adam · 1 comment
Owner

Originally created by @bloedboemmel on GitHub (Feb 12, 2024).

Describe the issue

When you paste an ASIN into the Chapter-Lookup page, there could occur leading/following whitespaces (which are produced when copying, but are very difficult to spot in darkmode)

When pressing lookup, it fails, because it includes the whitespaces into the url lookup.
You can see that in the logs:

<html>
<body>
<!--StartFragment--><div class="x-grid3-row x-grid3-row-selected" id="ext-gen5310" style="margin: 0px; padding: 0px; cursor: default; border-width: 0px 0px 1px; border-style: dotted dotted solid; border-top-color: initial; border-right-color: initial; border-bottom-color: rgba(198, 212, 224, 0.4); border-left-color: initial; border-image: initial; width: 2252px; background-color: rgba(5, 127, 235, 0.1) !important; color: rgb(65, 75, 85); font-size: 13px; font-family: Verdana, Arial, sans-serif; font-style: normal; font-variant-ligatures: none; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; height: 24px;">
2024-02-12 08:57:40.008] ERROR: [Audnexus] Chapter ASIN request failed for B099ZRXZCQ /de [AxiosError: Request failed with status code 400] { | stderr
-- | --


</div><!--EndFragment-->
</body>
</html>

It would be great to strip the asin before lookup.

Steps to reproduce the issue

  1. Edit chapters
  2. Press Lookup
  3. Put in an ASIN and put in a whitespace
  4. Press lookup

Audiobookshelf version

v.2.7.2

How are you running audiobookshelf?

Docker

Originally created by @bloedboemmel on GitHub (Feb 12, 2024). ### Describe the issue When you paste an ASIN into the Chapter-Lookup page, there could occur leading/following whitespaces (which are produced when copying, but are very difficult to spot in darkmode) When pressing lookup, it fails, because it includes the whitespaces into the url lookup. You can see that in the logs: ``` <html> <body> <!--StartFragment--><div class="x-grid3-row x-grid3-row-selected" id="ext-gen5310" style="margin: 0px; padding: 0px; cursor: default; border-width: 0px 0px 1px; border-style: dotted dotted solid; border-top-color: initial; border-right-color: initial; border-bottom-color: rgba(198, 212, 224, 0.4); border-left-color: initial; border-image: initial; width: 2252px; background-color: rgba(5, 127, 235, 0.1) !important; color: rgb(65, 75, 85); font-size: 13px; font-family: Verdana, Arial, sans-serif; font-style: normal; font-variant-ligatures: none; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; height: 24px;"> 2024-02-12 08:57:40.008] ERROR: [Audnexus] Chapter ASIN request failed for B099ZRXZCQ /de [AxiosError: Request failed with status code 400] { | stderr -- | -- </div><!--EndFragment--> </body> </html> ``` It would be great to strip the asin before lookup. ### Steps to reproduce the issue 1. Edit chapters 2. Press Lookup 3. Put in an ASIN and put in a whitespace 4. Press lookup ### Audiobookshelf version v.2.7.2 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:56:13 +02:00
adam closed this issue 2026-04-24 23:56:13 +02:00
Author
Owner

@advplyr commented on GitHub (Feb 20, 2024):

Fixed in v2.8.0

@advplyr commented on GitHub (Feb 20, 2024): Fixed in [v2.8.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.8.0)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1731