From 8e1bcfd8b412f4271ed9a1e0397513cef646f78c Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Sun, 13 Sep 2020 15:16:00 +0200 Subject: [PATCH] misc/collect.py: rename TP-LINK to TP-LINK This is a fix for the 19.07 releases and TP-Link devices. Those are in both ar71xx and ath79, but with a different vendor letter case. Make the vendor equal so the code recognizes it and appends the target as extra differentiator. --- misc/collect.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/collect.py b/misc/collect.py index 9ec1b53..2cd4b8e 100755 --- a/misc/collect.py +++ b/misc/collect.py @@ -48,6 +48,14 @@ def merge_profiles(profiles, download_url): ) continue + """ + Some devices are in ar71xx and ath79. But use TP-LINK" and "TP-Link". + E.g: `TP-LINK Archer C7 v5` and `TP-Link Archer C7 v5` + To be able to detect this, we need to make "same" titles identical. + """ + if title.startswith("TP-LINK "): + title = "TP-Link {}".format(title[8:]) + # device is a duplicate, try to differentiate by target if title in output["models"]: title = "{} ({})".format(title, target) -- 2.30.2