aboutsummaryrefslogtreecommitdiff
path: root/code/utils/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'code/utils/config.py')
-rw-r--r--code/utils/config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/code/utils/config.py b/code/utils/config.py
index f3fc971..9e1b687 100644
--- a/code/utils/config.py
+++ b/code/utils/config.py
@@ -153,7 +153,9 @@ def database_setup() -> None:
"""
Create the database if it does not exist
"""
- db = sqlite3.connect("cordarr.db")
+ if not os.path.exists("data"):
+ os.makedirs("data")
+ db = sqlite3.connect("data/cordarr.db")
cursor = db.cursor()
cursor.execute(
"CREATE TABLE IF NOT EXISTS requests (title TEXT, release_year TEXT,"