BrickLink Links Fail for Certain Parts #55
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When
BRICKLINK_LINKS=True
, some parts (particularly those with prints) fail to link correctly to BrickLink. Below are three examples illustrating the issue.Example 1: Torso with Print
76969
.Rebrickable correctly links to
973c03h78pr0001
, but the BrickLink link fails. The correct BrickLink part ID is973pb5957c01
. See #52 for similar issue.Example 2: Printed Pants
76969
.Rebrickable correctly links to
41879a
, but the BrickLink link fails. The correct BrickLink part ID is41879
.Example 3: Simple Part Without Color
A simple part like
Plate 1 x 2
in "Blue" (parts/3023/1/302323/details
) currently links to:https://www.bricklink.com/v2/catalog/catalogitem.page?P=3023
.While this link is functional, it does not specify a color. The correct link should be:
https://www.bricklink.com/v2/catalog/catalogitem.page?P=3023&C=7
,where
7
is the BrickLinkcolor_id
for "Blue."Analysis
Issue 1: Missing BrickLink Part IDs
Certain printed parts, such as
973pb5957c01
, require storing BrickLink-specific part IDs in the database to generate accurate links.Issue 2: Mismatched Color IDs
BrickLink and Rebrickable use different IDs for colors. For example:
1
.7
.BrickLink links require both the
part_id
and the correctcolor_id
. The/api/v3/lego/colors/{id}/
endpoint provides BrickLink color IDs, but this would require either:Issue 3: Lack of Color-Specific Links for Basic Parts
Basic parts, such as
3023
(Plate 1 x 2), do not include color in their BrickLink URLs, resulting in less precise links. Adding the correctcolor_id
would make these links more useful.Proposed Solutions
Store BrickLink Part IDs in the Database
Create a Color Translation Table
/api/v3/lego/colors/{id}/
during link generation would spam the API, leading to potential throttling or disruptions. This is not a workable solution for performance reasons.Include Color IDs in BrickLink URLs
color_id
to the BrickLink URL (e.g.,&C=7
) would improve link accuracy.