From e5ede625b3fc7e0b71736b42eb4f52a2f5d63378 Mon Sep 17 00:00:00 2001 From: Parker Date: Mon, 20 Jan 2025 20:44:23 -0600 Subject: Put database within data dir --- code/cogs/newaccount.py | 2 +- code/cogs/status.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'code/cogs') diff --git a/code/cogs/newaccount.py b/code/cogs/newaccount.py index b341147..54d53b6 100644 --- a/code/cogs/newaccount.py +++ b/code/cogs/newaccount.py @@ -20,7 +20,7 @@ class NewAccount(commands.Cog): async def newaccount(self, interaction: discord.Interaction) -> None: """Create a new temporary Jellyfin account""" # Make sure the user doesn't already have an account - db = sqlite3.connect("cordarr.db") + db = sqlite3.connect("data/cordarr.db") cursor = db.cursor() cursor.execute( "SELECT * FROM jellyfin_accounts WHERE user_id = ?", diff --git a/code/cogs/status.py b/code/cogs/status.py index abda84a..9e44bf6 100644 --- a/code/cogs/status.py +++ b/code/cogs/status.py @@ -19,7 +19,7 @@ class Status(commands.Cog): @app_commands.command() async def status(self, interaction: discord.Interaction) -> None: """Get the status of the movies you have requested""" - db = sqlite3.connect("cordarr.db") + db = sqlite3.connect("data/cordarr.db") cursor = db.cursor() cursor.execute( "SELECT title, release_year, local_id, tmdbid, tvdbid FROM" @@ -183,7 +183,7 @@ class Status(commands.Cog): # If the movie has a file, then it has finished downloading if data.get("hasFile", True): # Remove from database - db = sqlite3.connect("cordarr.db") + db = sqlite3.connect("data/cordarr.db") cursor = db.cursor() cursor.execute( "DELETE FROM requests WHERE user_id = ? AND" -- cgit v1.2.3-70-g09d2