You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
976 B
Python

# app.py — Streamaster, DB-Only, Clean
from flask import Flask
import os
# ───────── CONFIG ───────── #
app = Flask(__name__)
THUMB_DIR = "static/thumbnails"
VIDEOS_PER_PAGE = 40
DASHBOARD_PER_PAGE = 100
THUMB_WIDTH = 640
FF_QUALITY = "80"
os.makedirs(THUMB_DIR, exist_ok=True)
VIDEO_DIRS = [
"U:/encoded",
"U:/count_sorted",
"E:/streamaster/downloaded"
]
def find_video_file(filename: str) -> str | None:
for directory in VIDEO_DIRS:
candidate = os.path.join(directory, filename)
if os.path.exists(candidate):
return candidate
return None
# ───────── BLUEPRINTS ───────── #
from routes.web import web
from routes.api import api
from helpers.favorites import db_init_favorites_table
app.register_blueprint(web)
app.register_blueprint(api)
if __name__ == "__main__":
db_init_favorites_table()
app.run(debug=True)