Commit graph

1419 commits

Author SHA1 Message Date
Jesse Bate
687c82cb32 feat: add YTP_MAX_HISTORY to cap history and prevent unbounded DB growth
Long-running instances accumulate history indefinitely. As the history
table grows, SQLite COUNT(*), paginated SELECT, and index scans degrade.

YTP_MAX_HISTORY (default: 0 = unlimited) caps the number of completed
download records kept. Enforcement is a hook in DataStore.put(): on
each insertion, the oldest excess entries are immediately evicted from
the in-memory OrderedDict and their deletes are enqueued to SQLite.
DataStore.load() also trims on startup in case the limit was lowered
between restarts. No background tasks, no DB reads needed for the check.
2026-06-10 20:29:18 +09:30
Jesse Bate
429f97a60c perf: exclude unused fields from ItemDTO list and WebSocket serialization
Every item_updated WebSocket event and every history/queue list response
was serializing the full ItemDTO including fields the UI never reads.

Add ItemDTO.serialize_for_list() which excludes: options,
template_chapter, temp_dir, total_bytes, total_bytes_estimate,
tmpfilename, archive_id. The global Encoder now uses serialize_for_list()
for all list/event contexts; the full serialize() remains available for
detail endpoints (GET /api/history/{id}).

Mark the excluded fields optional in the TypeScript StoreItem type.
2026-06-10 20:09:13 +09:30
Jesse Bate
38c120ce85 perf: lazy-load folders on demand; remove queue from config endpoint
Two startup cost reductions:

1. Folder enumeration is moved from /api/system/configuration to a new
   GET /api/system/folders endpoint. The frontend fetches it only when
   the user focuses a folder input field, and caches the result for the
   session. On large directory trees this was a noticeable startup delay.

2. The queue array is removed from /api/system/configuration. The queue
   is already loaded separately via /api/history/live on mount; including
   it in the config response was a double-load that inflated the initial
   payload for users with large queues.
2026-06-10 20:07:19 +09:30
Jesse Bate
e0dbc2d15d perf: throttle item_updated WebSocket events to 500ms intervals
yt-dlp fires progress hooks faster than the browser can usefully render
them. Previously every callback triggered a WebSocket emit → Vue
reactivity update → DOM re-render, causing unnecessary main-thread work
during active downloads.

Now status changes (e.g. downloading → finished) are always emitted
immediately, while progress-only updates are capped at one per 500ms
per download. A flush_pending() call at loop termination ensures the
final state is never dropped.
2026-06-10 19:32:31 +09:30
arabcoders
d6318fca0f refactor: fix loading older logs 2026-06-08 09:56:21 +03:00
arabcoders
4881fabb15 feat: add YTP_DISABLE_EXEC to strip dangerous yt-dlp options 2026-06-08 09:29:31 +03:00
arabcoders
7a3c41b6bc refactor: update other uselect to use uselectmenu 2026-06-08 09:00:56 +03:00
arabcoders
473e45c55b refactor: use list with filtering for preset menus 2026-06-08 08:55:08 +03:00
arabcoders
4319be36f6 fix: disable file logging during tests 2026-06-08 08:44:25 +03:00
arabcoders
2efc09d587 refactor: improve log details view 2026-06-08 08:38:12 +03:00
arabcoders
acca33a7dc rerfactor: add page transition toggle 2026-06-08 07:53:05 +03:00
arabcoders
e61df14ec0 refactor: improve how cards look 2026-06-08 07:11:31 +03:00
arabcoders
0482df2fec chore: update external packages 2026-06-04 09:31:43 +03:00
arabcoders
50dd2d336c docs: screenshots updates 2026-06-01 07:44:41 +03:00
arabcoders
c70b3a46bd chore: update dependancies 2026-05-31 16:15:31 +03:00
arabcoders
10c18ff5b9 refactor: minor UI update for diagnostics page 2026-05-31 16:08:45 +03:00
arabcoders
9259119227 docs: document security recommendations 2026-05-29 17:39:29 +03:00
arabcoders
ab56a7d8c9 fix: startup crash if access long was turned off 2026-05-28 22:21:56 +03:00
arabcoders
fa8ba1af34 feat: make log level runtime managable. 2026-05-28 21:26:23 +03:00
arabcoders
1267dbaf6b refactor: use single logger namespace 2026-05-28 19:07:11 +03:00
arabcoders
39ed3d0361 refactor: add more context to the actual log message. 2026-05-28 17:56:28 +03:00
arabcoders
cf90db3b4c refactor: update log mesages to take advantage of JSONL 2026-05-27 23:53:42 +03:00
arabcoders
434d3e981d feat: add system diagnostics endpoint. 2026-05-26 19:22:36 +03:00
arabcoders
376e439115 docs: add info about youtube rss feeds 2026-05-26 16:15:29 +03:00
arabcoders
64fdcac0f7 refactor: implement re-extraction logic and process-safe handling for non-picklable objects. 2026-05-25 20:06:34 +03:00
arabcoders
2e9684de5d refactor: standardize JSONL structure. 2026-05-24 21:19:25 +03:00
arabcoders
ca7227ffc5 refactor: adjust width and shrink behavior of filter input 2026-05-18 22:20:31 +03:00
arabcoders
3b3c8120b8 fix: recent change made fetch_info unpicklable 2026-05-18 22:12:13 +03:00
arabcoders
88db357b7f refactor: removed thumbnail proxying 2026-05-18 12:28:06 +03:00
arabcoders
854f5f4b42 refactor: use jsonl for loggng for better log view experience 2026-05-18 09:44:29 +03:00
arabcoders
d18145f1c5 refactor: make clear message more clear 2026-05-18 07:44:37 +03:00
arabcoders
3bd2a7bee7 refactor: minor ui cleanup 2026-05-17 20:21:58 +03:00
arabcoders
2146e51368 fix: flakey test 2026-05-15 19:00:06 +03:00
arabcoders
98dd77f004 refactor: rename button 2026-05-15 18:47:43 +03:00
arabcoders
ee8218764f fix: suppress task related archive logs 2026-05-15 18:45:56 +03:00
arabcoders
73b8d867a0 feat: add resume for videos 2026-05-15 18:24:52 +03:00
arabcoders
734ef1c53c refactor: use item guid as thumbnail name for easier cleanup 2026-05-15 16:50:13 +03:00
arabcoders
d9dbbb18ea feat: thumbnail generation 2026-05-14 23:22:27 +03:00
arabcoders
1d52ea61da refactor: do not log httpx related as exceptions but errors. 2026-05-13 08:39:22 +03:00
arabcoders
34e99951fc fix: tasks handler summary should reflect correct status. 2026-05-13 06:58:43 +03:00
arabcoders
56dbf6fc2d refactor: update test functions to use tmp_path for archive file handling 2026-05-08 21:56:41 +03:00
arabcoders
a0b50ac351 fix: use yt-dlp meta extractors methods instead of local rolled ones 2026-05-08 21:39:12 +03:00
arabcoders
12eb4de83d fix: update extractor options and improve media polling logic 2026-05-08 20:54:41 +03:00
arabcoders
928ddd5b9a feat: add generic browser extractor 2026-05-08 01:08:08 +03:00
arabcoders
9b3cc8b310 fix: respect sleep-requests arg in specific code paths. 2026-05-07 21:35:40 +03:00
arabcoders
ac3c666d32 fix: handle TimeoutError in fetch_info function to prevent double wait 2026-05-07 19:09:31 +03:00
arabcoders
691e37d279 fix: move dns lookup to thread 2026-05-07 18:34:50 +03:00
arabcoders
5951837ab9 fix: automatic fallback to hls.js 2026-05-07 18:01:05 +03:00
arabcoders
71f9a7bda4 fix: show add button on same row 2026-05-06 23:07:49 +03:00
arabcoders
8f436a7afb refactor: improve video player rendering 2026-05-05 23:01:50 +03:00