]> git.leonardobizzoni.com Git - holonotify/commitdiff
Fixed Sana icon and blacklist is now checked before sending a notification
authorleo <leo@EnvyPhoenix.lan>
Sun, 24 Oct 2021 15:40:14 +0000 (17:40 +0200)
committerleo <leo@EnvyPhoenix.lan>
Sun, 24 Oct 2021 15:40:14 +0000 (17:40 +0200)
holonotify.py
utils.py

index a2623afe44477d059dc9ea9e85289b42a64c7bb2..cfb6dd6f0fa369c984b1e80074cfd16281b090a7 100755 (executable)
@@ -16,7 +16,9 @@ ended = list()
 blacklist = list()
 
 def updateValues():
-    global live, ended
+    global live, ended, blacklist
+    blacklist = utils.getBlacklist()
+
     with urllib.request.urlopen("https://api.holotools.app/v1/live") as url:
         holoapi = json.loads(url.read().decode())
         live = holoapi["live"]
@@ -45,7 +47,6 @@ if __name__ == "__main__":
     running = True
     checkedPs = False
     psCount = 0
-    blacklist = utils.getBlacklist()
 
     while running:
         main()
index 150e23d1f8909cd1f4599f581eacffd4c5732141..e76621b177992744789daf9900eea9837b4084f1 100644 (file)
--- a/utils.py
+++ b/utils.py
@@ -9,6 +9,8 @@ def getBlacklist():
             for x in f.read().splitlines():
                 if(x == "fubuki" or x == "shirakami"):
                     blacklist.append("フブキ")
+                elif(x == "mel"):
+                    blacklist.append("夜空メルチャンネル")
                 elif (x == "akirose" or x == "aki" or x == "rosenthal"):
                     blacklist.append("アキロゼ")
                 else:
@@ -118,7 +120,7 @@ def getIcon(name):
         return abspath + "amelia.jpg"
     elif ("irys" in name):
         return abspath + "irys.jpg"
-    elif ("tsukumoto" in name):
+    elif ("sana" in name):
         return abspath + "sana.jpg"
     elif ("fauna" in name):
         return abspath + "fauna.jpg"