aboutsummaryrefslogtreecommitdiff
path: root/modules/artists.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-21 09:14:27 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-21 09:14:27 +0300
commit6d805b669e86233432f56ee1892d062103abe501 (patch)
treee76ace1a20b959f3a647740bc08085d4c82898aa /modules/artists.py
parent40ff6db5325fc34ad4fa35e80cb1e7768d9f7e75 (diff)
make CLIP interrogator download original text files if the directory does not exist
remove random artist built-in extension (to re-added as a normal extension on demand) remove artists.csv (but what does it mean????????????????????) make interrogate buttons show Loading... when you click them
Diffstat (limited to 'modules/artists.py')
-rw-r--r--modules/artists.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/modules/artists.py b/modules/artists.py
deleted file mode 100644
index 3612758b..00000000
--- a/modules/artists.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import os.path
-import csv
-from collections import namedtuple
-
-Artist = namedtuple("Artist", ['name', 'weight', 'category'])
-
-
-class ArtistsDatabase:
- def __init__(self, filename):
- self.cats = set()
- self.artists = []
-
- if not os.path.exists(filename):
- return
-
- with open(filename, "r", newline='', encoding="utf8") as file:
- reader = csv.DictReader(file)
-
- for row in reader:
- artist = Artist(row["artist"], float(row["score"]), row["category"])
- self.artists.append(artist)
- self.cats.add(artist.category)
-
- def categories(self):
- return sorted(self.cats)