exparmental run_command in linux.py migrate_sql1.py

This commit is contained in:
2026-07-28 03:27:26 +00:00
parent 6882b7ae04
commit 9203b0f88c
6 changed files with 300 additions and 18 deletions
+2 -3
View File
@@ -5,11 +5,10 @@ from pathlib import Path
from typing import Any
class Database:
def __init__(self):
def __init__(self, db_path: str = "database.db"):
self.columns = "id, title, created_at, view_count, duration, url, thumbnail_url, game_id, game_name, stream_id, creator_name, clip_is, downloaded, uploaded_yt, uploaded_yt_chats, uploaded_yt_shorts"
# IMPORTANT Must check if database.db exists before connecting to it.
file_exists = Path("database.db").is_file()
file_exists = self.db_path.is_file()
self.conn = sqlite3.connect("database.db")
self.cursor = self.conn.cursor()