1.8.5
βοΈ Patch 1.8.5 β Watchlist Discord links (ASIN, Amazon & Qogita)¶
π Summary¶
- Targets-met Discord embeds β include ASIN and clickable GTIN / ASIN links (Amazon.de + Qogita catalog search), matching the watchlist table in the frontend.
- Embed title β links to Amazon when an ASIN is known, otherwise to Qogita catalog search.
- Catalog flag correction β Discord sample lines also use markdown links for GTIN and ASIN.
- Shared URL helpers β
watchlist_links.pymirrorsqogitaWatchlistPrefs.json the backend.
β¨ Improvements¶
Discord β watchlist targets met¶
Embeds sent after the Qogita cron catalog-targets refresh now include:
| Field | Content |
|---|---|
| GTIN | [8719134203318](https://www.qogita.com/categories/?query=β¦) |
| ASIN | [B000E7YJVU](https://www.amazon.de/dp/β¦) or β |
| Title | Product name; embed url β Amazon (preferred) or Qogita |
| Avg VK (30d) | Keepa 30-day average selling price (VK brutto) |
Existing fields unchanged: target EK, catalog price, seller, stock, on-Qogita flag, Qogita price/qty when qid is set.
Discord β catalog flag correction¶
Sample lines changed from plain `GTIN` to:
β’ [688575134490](qogitaβ¦) Β· ASIN [B000E7YJVU](amazonβ¦) β Qogita 23.11 EUR, stock 12
watchlist_links.py¶
resolve_watchlist_asin()β fromasincolumn orASIN:stub GTIN.amazon_de_product_url()βhttps://www.amazon.de/dp/{asin}.qogita_catalog_search_url()βhttps://www.qogita.com/categories/?query={gtin}(skipsASIN:stubs).discord_markdown_link()β[label](url)for Discord embed fields.
β¨ Tests¶
test_watchlist_links.pyβ ASIN resolution, Amazon/Qogita URLs, markdown link formatting.
cd backend/service_omni
pytest app/tests/test_watchlist_links.py -v
π Files changed¶
Backend (service_omni)
app/services/qogita/watchlist_links.py(new)app/services/price_alerts/discord_notifications.pyapp/tests/test_watchlist_links.py(new)
π§ Deploy¶
Restart service-omni. No database migration.
Discord webhook URL is unchanged β configure it on the watchlist tab (Discord webhook field) or via the Qogita cron job arguments.
Usage notes¶
When alerts fire
- Qogita watchlist cron runs (default every 6h).
- After sync, wholesale catalog targets are refreshed.
- Rows that newly meet target EK (
are_targets_metfalse β true) trigger Discord embeds. - Click GTIN in Discord β Qogita catalog search; click ASIN or the embed title β Amazon.de product page.
ASIN from Keepa-only rows
- Resolved from
asincolumn after fetch/analyze, or fromASIN:{asin}stub GTIN before EAN is known.