TIMESTAMP_FMT = '%Y-%m-%d %H:%M:%S.%f'
LEGAL_EXTENSIONS = {'webm', 'mp4', 'mkv'}
-# tables to create database with
+# database stuff
EXPECTED_DB_VERSION = 0
SQL_DB_VERSION = SqlText('PRAGMA user_version')
PATH_MIGRATIONS = PathStr(path_join(PATH_APP_DATA, 'migrations'))
f'init_{EXPECTED_DB_VERSION}.sql'))
# other
-NAME_INSTALLER = 'install.sh'
+NAME_INSTALLER = PathStr('install.sh')
VIDEO_FLAGS: dict[FlagName, FlagsInt] = {
FlagName('delete'): FlagsInt(1 << 62)
}
conn = DatabaseConnection()
def collect_results(query_txt: QueryText) -> list[YoutubeVideo]:
+ _ensure_expected_dirs([PATH_THUMBNAILS])
youtube = googleapiclient.discovery.build('youtube', 'v3',
developerKey=API_KEY)
QuotaLog.update(conn, QUOTA_COST_YOUTUBE_SEARCH)