with current_track_id.get_lock():
current_track_id.value = 1
-audio_path = "../audio/"
-cover_path = "../cover/"
-icon_path = "../icon/"
-upload_path = "../upload/"
+audio_path = "/home/stream/critters/audio/"
+cover_path = "/home/stream/critters/cover/"
+icon_path = "/home/stream/critters/icon/"
+upload_path = "/home/stream/critters/upload/"
def check_files(track_id):
return {
"icon_path": url_for("get_icon", track_id=track_id)
}
-with open("../secrets.json", "r") as f:
+with open("/home/stream/critters/secrets.json", "r") as f:
users = json.loads(f.read())
users = {k: generate_password_hash(v) for (k, v) in users.items()}
@auth.login_required
def admin():
if request.method == "POST":
- con = sqlite3.connect("../../metadata.db")
+ con = sqlite3.connect("/home/stream/metadata.db")
cur = con.cursor()
try: commit_id = int(request.form["id"])
current_album = ""
current_artist = ""
- con = sqlite3.connect("../../metadata.db")
+ con = sqlite3.connect("/home/stream/metadata.db")
cur = con.cursor()
track = cur.execute(f"SELECT album, artist FROM critters WHERE id={track_id}").fetchone()
}
responce_data = [track_data]
- con = sqlite3.connect("../../metadata.db")
+ con = sqlite3.connect("/home/stream/metadata.db")
cur = con.cursor()
tracks = cur.execute(f"SELECT * FROM critters").fetchall()
if tracks is not None:
if track_id == 0:
with current_track_id.get_lock():
track_id = current_track_id.value
- con = sqlite3.connect("../../metadata.db")
+ con = sqlite3.connect("/home/stream/metadata.db")
cur = con.cursor()
track = cur.execute(f"SELECT * FROM critters WHERE id={track_id}").fetchone()
track_data = {
track_id = current_track_id.value
result = "Unknown"
if feild in db_keys:
- con = sqlite3.connect("../../metadata.db")
+ con = sqlite3.connect("/home/stream/metadata.db")
cur = con.cursor()
track = cur.execute(f"SELECT {feild} FROM critters WHERE id={track_id}").fetchone()
if track is not None: