home
·
contact
·
privacy
projects
/
ytplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
965e54a
)
Ensure thumbnail directory exists when retrieving on query.
master
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 24 Nov 2024 23:21:18 +0000
(
00:21
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 24 Nov 2024 23:21:18 +0000
(
00:21
+0100)
install_to_share/ytplom/misc.py
patch
|
blob
|
history
diff --git
a/install_to_share/ytplom/misc.py
b/install_to_share/ytplom/misc.py
index 647ad3901c98a5b924d47c3ea124924ad711e83b..0c2777ec939557485da6bea96e8b4b8a649d0f15 100644
(file)
--- a/
install_to_share/ytplom/misc.py
+++ b/
install_to_share/ytplom/misc.py
@@
-83,7
+83,7
@@
QUOTA_COST_YOUTUBE_DETAILS = QuotaCost(1)
TIMESTAMP_FMT = '%Y-%m-%d %H:%M:%S.%f'
LEGAL_EXTENSIONS = {'webm', 'mp4', 'mkv'}
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'))
EXPECTED_DB_VERSION = 0
SQL_DB_VERSION = SqlText('PRAGMA user_version')
PATH_MIGRATIONS = PathStr(path_join(PATH_APP_DATA, 'migrations'))
@@
-91,7
+91,7
@@
PATH_DB_SCHEMA = PathStr(path_join(PATH_MIGRATIONS,
f'init_{EXPECTED_DB_VERSION}.sql'))
# other
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)
}
VIDEO_FLAGS: dict[FlagName, FlagsInt] = {
FlagName('delete'): FlagsInt(1 << 62)
}
@@
-658,6
+658,7
@@
class TaskHandler(BaseHTTPRequestHandler):
conn = DatabaseConnection()
def collect_results(query_txt: QueryText) -> list[YoutubeVideo]:
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)
youtube = googleapiclient.discovery.build('youtube', 'v3',
developerKey=API_KEY)
QuotaLog.update(conn, QUOTA_COST_YOUTUBE_SEARCH)