20 lines
434 B
Python
20 lines
434 B
Python
|
|
|
||
|
|
import sqlite3
|
||
|
|
import os
|
||
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
db_path = Path("C:/Media Machina/.downlow_library.db")
|
||
|
|
|
||
|
|
if not db_path.exists():
|
||
|
|
print(f"DB not found at {db_path}")
|
||
|
|
else:
|
||
|
|
conn = sqlite3.connect(db_path)
|
||
|
|
cursor = conn.cursor()
|
||
|
|
|
||
|
|
print("Files in DB:")
|
||
|
|
cursor.execute("SELECT id, file_path FROM files")
|
||
|
|
for row in cursor.fetchall():
|
||
|
|
print(f"ID: {row[0]}, Path: {row[1]}")
|
||
|
|
|
||
|
|
conn.close()
|