misc/collect.py: differentiate duplicate models by target
authorMoritz Warning <moritzwarning@web.de>
Sun, 13 Sep 2020 13:02:38 +0000 (15:02 +0200)
committerMoritz Warning <moritzwarning@web.de>
Sun, 13 Sep 2020 19:59:26 +0000 (21:59 +0200)
some devices might appear in different targets when migrating to new targets (e.g ar71xx and ath79)

misc/collect.py

index 1df923ff7011a7f18709abe40353dcd42ad9fbf8..9ec1b5304a0c810082286738e63e421b35ec857e 100755 (executable)
@@ -48,6 +48,10 @@ def merge_profiles(profiles, download_url):
                 )
                 continue
 
+            # device is a duplicate, try to differentiate by target
+            if title in output["models"]:
+                title = "{} ({})".format(title, target)
+
             output["models"][title] = {"id": id, "target": target, "images": images}
 
             if code is not None: