feat: Add file_size column to videos table

This commit is contained in:
Peifan Li
2025-11-26 16:02:31 -05:00
parent cac5338fef
commit 0f36b4b050
13 changed files with 692 additions and 10 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE `videos` ADD `file_size` text;

View File

@@ -0,0 +1,485 @@
{
"version": "6",
"dialect": "sqlite",
"id": "a4f15b55-7d41-46eb-a976-c89e80c42797",
"prevId": "4ad1e3d4-fd4b-431a-b4ed-8e74842fa726",
"tables": {
"collection_videos": {
"name": "collection_videos",
"columns": {
"collection_id": {
"name": "collection_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"video_id": {
"name": "video_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"order": {
"name": "order",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"collection_videos_collection_id_collections_id_fk": {
"name": "collection_videos_collection_id_collections_id_fk",
"tableFrom": "collection_videos",
"tableTo": "collections",
"columnsFrom": [
"collection_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"collection_videos_video_id_videos_id_fk": {
"name": "collection_videos_video_id_videos_id_fk",
"tableFrom": "collection_videos",
"tableTo": "videos",
"columnsFrom": [
"video_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"collection_videos_collection_id_video_id_pk": {
"columns": [
"collection_id",
"video_id"
],
"name": "collection_videos_collection_id_video_id_pk"
}
},
"uniqueConstraints": {},
"checkConstraints": {}
},
"collections": {
"name": "collections",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"download_history": {
"name": "download_history",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"author": {
"name": "author",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"source_url": {
"name": "source_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"finished_at": {
"name": "finished_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"error": {
"name": "error",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"video_path": {
"name": "video_path",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thumbnail_path": {
"name": "thumbnail_path",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"total_size": {
"name": "total_size",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"downloads": {
"name": "downloads",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"timestamp": {
"name": "timestamp",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"filename": {
"name": "filename",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"total_size": {
"name": "total_size",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"downloaded_size": {
"name": "downloaded_size",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"progress": {
"name": "progress",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"speed": {
"name": "speed",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'active'"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"settings": {
"name": "settings",
"columns": {
"key": {
"name": "key",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"videos": {
"name": "videos",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"author": {
"name": "author",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"date": {
"name": "date",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"source_url": {
"name": "source_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"video_filename": {
"name": "video_filename",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thumbnail_filename": {
"name": "thumbnail_filename",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"video_path": {
"name": "video_path",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thumbnail_path": {
"name": "thumbnail_path",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thumbnail_url": {
"name": "thumbnail_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"added_at": {
"name": "added_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"part_number": {
"name": "part_number",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"total_parts": {
"name": "total_parts",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"series_title": {
"name": "series_title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"rating": {
"name": "rating",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"view_count": {
"name": "view_count",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"duration": {
"name": "duration",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"tags": {
"name": "tags",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"progress": {
"name": "progress",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"file_size": {
"name": "file_size",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}

View File

@@ -0,0 +1,27 @@
{
"version": "7",
"dialect": "sqlite",
"entries": [
{
"idx": 0,
"version": "6",
"when": 1764043254513,
"tag": "0000_known_guardsmen",
"breakpoints": true
},
{
"idx": 1,
"version": "6",
"when": 1764182291372,
"tag": "0001_worthless_blur",
"breakpoints": true
},
{
"idx": 2,
"version": "6",
"when": 1764190450949,
"tag": "0002_romantic_colossus",
"breakpoints": true
}
]
}

View File

@@ -26,6 +26,7 @@ export const videos = sqliteTable('videos', {
duration: text('duration'), duration: text('duration'),
tags: text('tags'), // JSON stringified array of strings tags: text('tags'), // JSON stringified array of strings
progress: integer('progress'), // Playback progress in seconds progress: integer('progress'), // Playback progress in seconds
fileSize: text('file_size'),
}); });
export const collections = sqliteTable('collections', { export const collections = sqliteTable('collections', {

View File

@@ -224,5 +224,26 @@ export const ar = {
allPartsAddedToCollection: "سيتم إضافة جميع الأجزاء إلى هذه المجموعة", allPartsAddedToCollection: "سيتم إضافة جميع الأجزاء إلى هذه المجموعة",
allVideosAddedToCollection: "سيتم إضافة جميع الفيديوهات إلى هذه المجموعة", allVideosAddedToCollection: "سيتم إضافة جميع الفيديوهات إلى هذه المجموعة",
queued: "في الانتظار", queued: "في الانتظار",
waitingInQueue: "في قائمة الانتظار" waitingInQueue: "في قائمة الانتظار",
// Downloads
downloads: "التنزيلات",
activeDownloads: "التنزيلات النشطة",
manageDownloads: "إدارة التنزيلات",
queuedDownloads: "التنزيلات في الانتظار",
downloadHistory: "سجل التنزيلات",
clearQueue: "مسح قائمة الانتظار",
clearHistory: "مسح السجل",
noActiveDownloads: "لا توجد تنزيلات نشطة",
noQueuedDownloads: "لا توجد تنزيلات في قائمة الانتظار",
noDownloadHistory: "لا يوجد سجل تنزيلات",
downloadCancelled: "تم إلغاء التنزيل",
queueCleared: "تم مسح قائمة الانتظار",
historyCleared: "تم مسح السجل",
removedFromQueue: "تمت الإزالة من قائمة الانتظار",
removedFromHistory: "تمت الإزالة من السجل",
status: "الحالة",
progress: "التقدم",
speed: "السرعة",
finishedAt: "انتهى في",
failed: "فشل",
}; };

View File

@@ -93,5 +93,26 @@ export const de = {
processing: "Verarbeiten...", wouldYouLikeToDownloadAllParts: "Möchten Sie alle Teile herunterladen?", processing: "Verarbeiten...", wouldYouLikeToDownloadAllParts: "Möchten Sie alle Teile herunterladen?",
wouldYouLikeToDownloadAllVideos: "Möchten Sie alle Videos herunterladen?", wouldYouLikeToDownloadAllVideos: "Möchten Sie alle Videos herunterladen?",
allPartsAddedToCollection: "Alle Teile werden dieser Sammlung hinzugefügt", allPartsAddedToCollection: "Alle Teile werden dieser Sammlung hinzugefügt",
allVideosAddedToCollection: "Alle Videos werden dieser Sammlung hinzugefügt", queued: "In Warteschlange", waitingInQueue: "Warten in Warteschlange" allVideosAddedToCollection: "Alle Videos werden dieser Sammlung hinzugefügt", queued: "In Warteschlange", waitingInQueue: "Warten in Warteschlange",
// Downloads
downloads: "Downloads",
activeDownloads: "Aktive Downloads",
manageDownloads: "Downloads Verwalten",
queuedDownloads: "Warteschlange",
downloadHistory: "Download-Verlauf",
clearQueue: "Warteschlange Leeren",
clearHistory: "Verlauf Löschen",
noActiveDownloads: "Keine aktiven Downloads",
noQueuedDownloads: "Keine Downloads in der Warteschlange",
noDownloadHistory: "Kein Download-Verlauf",
downloadCancelled: "Download abgebrochen",
queueCleared: "Warteschlange geleert",
historyCleared: "Verlauf gelöscht",
removedFromQueue: "Aus der Warteschlange entfernt",
removedFromHistory: "Aus dem Verlauf entfernt",
status: "Status",
progress: "Fortschritt",
speed: "Geschwindigkeit",
finishedAt: "Beendet am",
failed: "Fehlgeschlagen",
}; };

View File

@@ -91,5 +91,26 @@ export const es = {
processing: "Procesando...", wouldYouLikeToDownloadAllParts: "¿Le gustaría descargar todas las partes?", processing: "Procesando...", wouldYouLikeToDownloadAllParts: "¿Le gustaría descargar todas las partes?",
wouldYouLikeToDownloadAllVideos: "¿Le gustaría descargar todos los videos?", wouldYouLikeToDownloadAllVideos: "¿Le gustaría descargar todos los videos?",
allPartsAddedToCollection: "Todas las partes se agregarán a esta colección", allPartsAddedToCollection: "Todas las partes se agregarán a esta colección",
allVideosAddedToCollection: "Todos los videos se agregarán a esta colección", queued: "En cola", waitingInQueue: "Esperando en cola" allVideosAddedToCollection: "Todos los videos se agregarán a esta colección", queued: "En cola", waitingInQueue: "Esperando en cola",
// Downloads
downloads: "Descargas",
activeDownloads: "Descargas Activas",
manageDownloads: "Gestionar Descargas",
queuedDownloads: "Descargas en Cola",
downloadHistory: "Historial de Descargas",
clearQueue: "Limpiar Cola",
clearHistory: "Limpiar Historial",
noActiveDownloads: "No hay descargas activas",
noQueuedDownloads: "No hay descargas en cola",
noDownloadHistory: "No hay historial de descargas",
downloadCancelled: "Descarga cancelada",
queueCleared: "Cola limpiada",
historyCleared: "Historial limpiado",
removedFromQueue: "Eliminado de la cola",
removedFromHistory: "Eliminado del historial",
status: "Estado",
progress: "Progreso",
speed: "Velocidad",
finishedAt: "Finalizado en",
failed: "Fallido",
}; };

View File

@@ -224,5 +224,26 @@ export const fr = {
allPartsAddedToCollection: "Toutes les parties seront ajoutées à cette collection", allPartsAddedToCollection: "Toutes les parties seront ajoutées à cette collection",
allVideosAddedToCollection: "Toutes les vidéos seront ajoutées à cette collection", allVideosAddedToCollection: "Toutes les vidéos seront ajoutées à cette collection",
queued: "En file d'attente", queued: "En file d'attente",
waitingInQueue: "En attente dans la file" waitingInQueue: "En attente dans la file",
// Downloads
downloads: "Téléchargements",
activeDownloads: "Téléchargements Actifs",
manageDownloads: "Gérer les Téléchargements",
queuedDownloads: "Téléchargements en File d'Attente",
downloadHistory: "Historique des Téléchargements",
clearQueue: "Vider la File d'Attente",
clearHistory: "Effacer l'Historique",
noActiveDownloads: "Aucun téléchargement actif",
noQueuedDownloads: "Aucun téléchargement en file d'attente",
noDownloadHistory: "Aucun historique de téléchargement",
downloadCancelled: "Téléchargement annulé",
queueCleared: "File d'attente vidée",
historyCleared: "Historique effacé",
removedFromQueue: "Retiré de la file d'attente",
removedFromHistory: "Retiré de l'historique",
status: "Statut",
progress: "Progression",
speed: "Vitesse",
finishedAt: "Terminé à",
failed: "Échoué",
}; };

View File

@@ -224,5 +224,26 @@ export const ja = {
allPartsAddedToCollection: "すべてのパートがこのコレクションに追加されます", allPartsAddedToCollection: "すべてのパートがこのコレクションに追加されます",
allVideosAddedToCollection: "すべての動画がこのコレクションに追加されます", allVideosAddedToCollection: "すべての動画がこのコレクションに追加されます",
queued: "キューに追加済み", queued: "キューに追加済み",
waitingInQueue: "待機中" waitingInQueue: "待機中",
// Downloads
downloads: "ダウンロード",
activeDownloads: "アクティブなダウンロード",
manageDownloads: "ダウンロードの管理",
queuedDownloads: "待機中のダウンロード",
downloadHistory: "ダウンロード履歴",
clearQueue: "キューをクリア",
clearHistory: "履歴をクリア",
noActiveDownloads: "アクティブなダウンロードはありません",
noQueuedDownloads: "待機中のダウンロードはありません",
noDownloadHistory: "ダウンロード履歴はありません",
downloadCancelled: "ダウンロードがキャンセルされました",
queueCleared: "キューがクリアされました",
historyCleared: "履歴がクリアされました",
removedFromQueue: "キューから削除されました",
removedFromHistory: "履歴から削除されました",
status: "ステータス",
progress: "進捗",
speed: "速度",
finishedAt: "完了日時",
failed: "失敗",
}; };

View File

@@ -224,5 +224,26 @@ export const ko = {
allPartsAddedToCollection: "모든 파트가 이 컬렉션에 추가됩니다", allPartsAddedToCollection: "모든 파트가 이 컬렉션에 추가됩니다",
allVideosAddedToCollection: "모든 동영상이 이 컬렉션에 추가됩니다", allVideosAddedToCollection: "모든 동영상이 이 컬렉션에 추가됩니다",
queued: "대기열에 추가됨", queued: "대기열에 추가됨",
waitingInQueue: "대기 중" waitingInQueue: "대기 중",
// Downloads
downloads: "다운로드",
activeDownloads: "진행 중인 다운로드",
manageDownloads: "다운로드 관리",
queuedDownloads: "대기 중인 다운로드",
downloadHistory: "다운로드 기록",
clearQueue: "대기열 지우기",
clearHistory: "기록 지우기",
noActiveDownloads: "진행 중인 다운로드 없음",
noQueuedDownloads: "대기 중인 다운로드 없음",
noDownloadHistory: "다운로드 기록 없음",
downloadCancelled: "다운로드 취소됨",
queueCleared: "대기열 지워짐",
historyCleared: "기록 지워짐",
removedFromQueue: "대기열에서 제거됨",
removedFromHistory: "기록에서 제거됨",
status: "상태",
progress: "진행률",
speed: "속도",
finishedAt: "완료 시간",
failed: "실패",
}; };

View File

@@ -224,5 +224,26 @@ export const pt = {
allPartsAddedToCollection: "Todas as partes serão adicionadas a esta coleção", allPartsAddedToCollection: "Todas as partes serão adicionadas a esta coleção",
allVideosAddedToCollection: "Todos os vídeos serão adicionados a esta coleção", allVideosAddedToCollection: "Todos os vídeos serão adicionados a esta coleção",
queued: "Na fila", queued: "Na fila",
waitingInQueue: "Aguardando na fila" waitingInQueue: "Aguardando na fila",
// Downloads
downloads: "Downloads",
activeDownloads: "Downloads Ativos",
manageDownloads: "Gerenciar Downloads",
queuedDownloads: "Downloads na Fila",
downloadHistory: "Histórico de Downloads",
clearQueue: "Limpar Fila",
clearHistory: "Limpar Histórico",
noActiveDownloads: "Nenhum download ativo",
noQueuedDownloads: "Nenhum download na fila",
noDownloadHistory: "Nenhum histórico de download",
downloadCancelled: "Download cancelado",
queueCleared: "Fila limpa",
historyCleared: "Histórico limpo",
removedFromQueue: "Removido da fila",
removedFromHistory: "Removido do histórico",
status: "Status",
progress: "Progresso",
speed: "Velocidade",
finishedAt: "Terminado em",
failed: "Falhou",
}; };

View File

@@ -224,5 +224,26 @@ export const ru = {
allPartsAddedToCollection: "Все части будут добавлены в эту коллекцию", allPartsAddedToCollection: "Все части будут добавлены в эту коллекцию",
allVideosAddedToCollection: "Все видео будут добавлены в эту коллекцию", allVideosAddedToCollection: "Все видео будут добавлены в эту коллекцию",
queued: "В очереди", queued: "В очереди",
waitingInQueue: "Ожидание в очереди" waitingInQueue: "Ожидание в очереди",
// Downloads
downloads: "Загрузки",
activeDownloads: "Активные загрузки",
manageDownloads: "Управление загрузками",
queuedDownloads: "Загрузки в очереди",
downloadHistory: "История загрузок",
clearQueue: "Очистить очередь",
clearHistory: "Очистить историю",
noActiveDownloads: "Нет активных загрузок",
noQueuedDownloads: "Нет загрузок в очереди",
noDownloadHistory: "История загрузок пуста",
downloadCancelled: "Загрузка отменена",
queueCleared: "Очередь очищена",
historyCleared: "История очищена",
removedFromQueue: "Удалено из очереди",
removedFromHistory: "Удалено из истории",
status: "Статус",
progress: "Прогресс",
speed: "Скорость",
finishedAt: "Завершено в",
failed: "Ошибка",
}; };

View File

@@ -228,9 +228,9 @@ export const zh = {
// Downloads // Downloads
downloads: "下载", downloads: "下载",
activeDownloads: "进行中", activeDownloads: "进行中的下载",
manageDownloads: "管理下载", manageDownloads: "管理下载",
queuedDownloads: "排队中", queuedDownloads: "排队中的下载",
downloadHistory: "下载历史", downloadHistory: "下载历史",
clearQueue: "清空队列", clearQueue: "清空队列",
clearHistory: "清空历史", clearHistory: "清空历史",