Open kellnerd opened 1 month ago
Ideally the Beatport provider should try multiple barcodes, but Beatport searches are already slow enough as is, so I will probably try to make the permalink generation choose a “better suited” GTIN first, I guess.
I improved the permalink generation in 48c6a0ae0d3384843d4229653f234f30f24cd748, which solves the original issue report.
Contributions to make the GTIN search more robust are still welcome once we migrate from the slow HTML scraping approach to a hopefully faster API based implementation.
Originally reported on the forums by DenizC:
The problem is the zero-padding of the barcode, Beatport complains that it couldn’t find the barcode without the leading zero. I only spotted this because the primary source (iTunes and Bandcamp in your examples) has returned the barcode with a leading zero. If I add the zero-padding to the permalink, it starts working again.
Beatport is yet another provider which doesn’t return search results if the barcode does not have the right amount of zeros :person_facepalming: Together with the permalink generation, which chooses the encoded GTIN from an arbitrary provider (because in theory they should have the same value and each provider should be able to handle leading zeros) this leads to broken permalinks while the initial lookup worked because it used the GTIN from the primary provider which had the correct number of zeros (by chance).
Ideally the Beatport provider should try multiple barcodes, but Beatport searches are already slow enough as is, so I will probably try to make the permalink generation choose a “better suited” GTIN first, I guess.