[Bug]: Blu-ray barcode lookup fails with noisy UPCitemdb titles
Before reporting
- [x] I am running the latest version of DVinyl.
- [x] I searched the existing issues and did not find a duplicate.
What happened?
On DVinyl 3.1.3, entering Blu-ray EAN 8717418371418 returns no results, although UPCitemdb successfully identifies it as:
Blu-ray " The Belle And The Tramp " Disney N 17 Blister Pack
DVinyl cleans this to " The Belle And The Tramp " Disney N 17 Blister Pack, which TMDB cannot match to Lady and the Tramp (La Belle et le Clochard).
Steps to reproduce
- Open the movie addition page and select Blu-ray.
- Enter 8717418371418 in the search field.
- Submit the search and observe that no result is returned.
- Open a shell inside the DVinyl container and run:
node -e 'const c="8717418371418"; fetch(`https://api.upcitemdb.com/prod/trial/lookup?upc=${c}`).then(async r=>console.log("HTTP",r.status,"\n",await r.text())).catch(console.error)' - Observe that UPCitemdb returns HTTP 200, "total":1, and the product title shown above.
Expected behavior
Improve title normalization or provide an editable title fallback when the TMDB search fails, while preserving the scanned barcode.
DVinyl version
3.1.3
How are you running DVinyl?
Docker (pre-built image)
Affected media type or plugin
Movies
Browser and device
No response
Logs or screenshots
Hey! Thanks for the report! I'll take a look asap
Good news: TMDB does find this one, it matches "The Belle And The Tramp" just fine. What breaks it is the leftover "Disney N 17 Blister Pack" at the end of the product name, so it's fixable without any translation guesswork.
I'd rather not keep growing the list of words to strip though, sellers put anything in there. So I'll make DVinyl retry with a shorter version of the name when nothing comes back, and show you the product name it found so you can just fix it yourself when it's really hopeless.
While looking at it I also noticed the scanned barcode gets lost if you edit the search afterwards fixing that one too. Thanks again!
Nice! The shorter-title retry and editable fallback sound perfect, and thanks for also fixing the barcode being lost. I’ll test it as soon as the release is out. Thanks a lot!
Hi! I just released version 3.1.4, which should fix this :D
Rather than keep growing the list of words to strip, a scan that comes back empty now retries on progressively shorter versions of the name, which lands on the film. And when even that fails, the product name it found is put in the search box so you can fix it yourself, instead of showing you back the digits you scanned! as i said yesterday ;)
Thank you for the repro, container shell command included that's really really useful
Feel free to reopen the issue if you run into any problems!
I tested it and it works perfectly! Thanks a lot!