]> git.example.dev Git - binbsis50-sm.git/commitdiff
update: gitignore, better setup script
author2weiEmu <saalbach.robert@outlook.de>
Sun, 15 Mar 2026 22:31:52 +0000 (23:31 +0100)
committer2weiEmu <saalbach.robert@outlook.de>
Sun, 15 Mar 2026 22:31:52 +0000 (23:31 +0100)
.gitignore
songmanager
testing/dummy_testing_data.py

index 26618f0855f101493b9dadb499f1592189625dba..6472b42238083046a52498c755ca8df0be116fab 100644 (file)
@@ -1 +1,4 @@
 log/sm.log
+go.mod
+go.sum
+song-map.csv
index fe6410779e0b77b3a063eaee7f2953037f099e10..5134469e98827506c06429e4924ab042f93dd537 100755 (executable)
Binary files a/songmanager and b/songmanager differ
index a80a69877efffeca5e4c30fe4e0ef7565efcd93e..09e06c1eb8b88f9aeeabaeb0f5c69b779a7ad0a4 100644 (file)
@@ -4,16 +4,20 @@ import redis
 def main():
     r = redis.Redis(host="localhost", port="6379", decode_responses=True)
 
+    with open("song-map.csv", "r") as mapcsv:
+        all = mapcsv.readlines()
+
     for i in range(0, 100):
+        line = all[i].split(",")
         r.hmset(f"song:{i}", {
-            "artistName": "firstartist~secondartist",
-            "trackName": "hot n cold",
+            "artistName": line[0],
+            "trackName": line[2],
             "trackViewUrl": "http:///somehwere",
             "previewUrl": "http://somewhere",
             "artworkUrl60": "http://somewhere",
             "artworkUrl100": "http://somewhere",
-            "displayArtistNames": "firstartist, secondartist",
-            "displayTrackName": "Hot n cold",
+            "displayArtistNames": line[1],
+            "displayTrackName": line[3],
         })
         r.zadd("hits", {i: i})