]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 24 Jul 2023 08:30:42 +0000 (10:30 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 24 Jul 2023 08:30:42 +0000 (10:30 +0200)
- added more aliases, please don't touch this part of your software or else
  other software cannot maybe handle it correctly

fba/helpers/software.py
fba/http/federation.py
templates/views/scoreboard.html

index bc1e2ce4e588ebf3ededb110fc95a7b9984b58db..bd9905b7bacb9e1050fb5df93a4bc42649e49224 100644 (file)
@@ -46,6 +46,15 @@ def alias(software: str) -> str:
     elif software in ["nextcloud social", "nextcloudpi", "storage share"]:
         logger.debug("Setting nextcloud: software='%s'", software)
         software = "nextcloud"
+    elif software == "activity-relay":
+        logger.debug("Setting activityrelay: software='%s'", software)
+        software = "activityrelay"
+    elif "owncast" in software:
+        logger.debug("Setting owncast: software='%s'", software)
+        software = "owncast"
+    elif software in ["streams-hubzilla-social", "streams13"]:
+        logger.debug("Setting streams: software='%s'", software)
+        software = "streams"
     elif software == "roadhouse":
         logger.debug("Setting hubzilla: software='%s'", software)
         software = "hubzilla"
index 540f7416943f5a7dcdd29c34ade2a9d0b5a9919e..895a5090bb7c911263a04936a779224158dd9a4e 100644 (file)
@@ -497,14 +497,6 @@ def fetch_generator_from_path(domain: str, path: str = "/") -> str:
             if software is not None and software != "":
                 logger.info("domain='%s' is generated by software='%s' - Setting detection_mode=GENERATOR ...", domain, software)
                 instances.set_detection_mode(domain, "GENERATOR")
-        elif isinstance(site_name, bs4.element.Tag) and isinstance(site_name.get("content"), str):
-            logger.debug("Found property=og:site_name, domain='%s'", domain)
-            software = tidyup.domain(site_name.get("content"))
-
-            logger.debug("software[%s]='%s'", type(software), software)
-            if software is not None and software != "":
-                logger.debug("domain='%s' has og:site_name='%s' - Setting detection_mode=SITE_NAME ...", domain, software)
-                instances.set_detection_mode(domain, "SITE_NAME")
         elif isinstance(platform, bs4.element.Tag) and isinstance(platform.get("content"), str):
             logger.debug("Found property=og:platform, domain='%s'", domain)
             software = tidyup.domain(platform.get("content"))
@@ -513,6 +505,14 @@ def fetch_generator_from_path(domain: str, path: str = "/") -> str:
             if software is not None and software != "":
                 logger.debug("domain='%s' has og:platform='%s' - Setting detection_mode=PLATFORM ...", domain, software)
                 instances.set_detection_mode(domain, "PLATFORM")
+        elif isinstance(site_name, bs4.element.Tag) and isinstance(site_name.get("content"), str):
+            logger.debug("Found property=og:site_name, domain='%s'", domain)
+            software = tidyup.domain(site_name.get("content"))
+
+            logger.debug("software[%s]='%s'", type(software), software)
+            if software is not None and software != "":
+                logger.debug("domain='%s' has og:site_name='%s' - Setting detection_mode=SITE_NAME ...", domain, software)
+                instances.set_detection_mode(domain, "SITE_NAME")
     elif not domain_helper.is_in_url(domain, response.url):
         logger.warning("domain='%s' doesn't match response.url='%s', maybe redirect to other domain?", domain, response.url)
 
index bb25f1fe071aa85169df0fa8885a915eecc5337f..776dbc768d1b9a2a694476bd6567c908ad5897da 100644 (file)
@@ -82,8 +82,8 @@
                 <li><b>AUTO_DISCOVERY</b>: <code>/.well-known/nodeinfo</code> was reachable and software type was found in nodeinfo response</li>
                 <li><b>STATIC_CHECK</b>: Node information was found by probing for well-known URLs</li>
                 <li><b>GENERATOR</b>: Meta data <code>generator</code> was found in HTML code</li>
-                <li><b>SITE_NAME</b>: Meta data <code>og:site_name</code> was found in HTML code</li>
                 <li><b>PLATFORM</b>: Meta data <code>og:platform</code> was found in HTML code</li>
+                <li><b>SITE_NAME</b>: Meta data <code>og:site_name</code> was found in HTML code</li>
                 <li><b>None</b>: the instance was not reachable or the used software was not stated</li>
             </ol>
         </div>