fetchforge 2.0.0__tar.gz → 2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. {fetchforge-2.0.0 → fetchforge-2.3.1}/LICENSE +1 -1
  2. {fetchforge-2.0.0 → fetchforge-2.3.1}/MANIFEST.in +2 -0
  3. {fetchforge-2.0.0 → fetchforge-2.3.1}/PKG-INFO +63 -21
  4. fetchforge-2.0.0/fetchforge.egg-info/PKG-INFO → fetchforge-2.3.1/README.md +51 -31
  5. {fetchforge-2.0.0 → fetchforge-2.3.1}/fetchforge/__init__.py +1 -1
  6. fetchforge-2.3.1/fetchforge/app.css +1340 -0
  7. fetchforge-2.3.1/fetchforge/app.js +2305 -0
  8. fetchforge-2.3.1/fetchforge/capabilities.py +417 -0
  9. {fetchforge-2.0.0 → fetchforge-2.3.1}/fetchforge/cli.py +1 -2
  10. fetchforge-2.3.1/fetchforge/config.py +99 -0
  11. fetchforge-2.3.1/fetchforge/cookies.py +272 -0
  12. fetchforge-2.3.1/fetchforge/encode.py +661 -0
  13. fetchforge-2.3.1/fetchforge/events.py +149 -0
  14. fetchforge-2.3.1/fetchforge/fonts/OFL-JetBrainsMono.txt +93 -0
  15. fetchforge-2.3.1/fetchforge/fonts/OFL-Outfit.txt +93 -0
  16. fetchforge-2.3.1/fetchforge/fonts/SOURCES.txt +82 -0
  17. fetchforge-2.3.1/fetchforge/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
  18. fetchforge-2.3.1/fetchforge/fonts/jetbrains-mono-latin.woff2 +0 -0
  19. fetchforge-2.3.1/fetchforge/fonts/outfit-latin-ext.woff2 +0 -0
  20. fetchforge-2.3.1/fetchforge/fonts/outfit-latin.woff2 +0 -0
  21. fetchforge-2.3.1/fetchforge/history.py +42 -0
  22. fetchforge-2.3.1/fetchforge/index.html +570 -0
  23. fetchforge-2.3.1/fetchforge/items.py +610 -0
  24. fetchforge-2.3.1/fetchforge/jobs.py +449 -0
  25. {fetchforge-2.0.0 → fetchforge-2.3.1}/fetchforge/provision.py +28 -2
  26. fetchforge-2.3.1/fetchforge/sections.py +141 -0
  27. fetchforge-2.3.1/fetchforge/server.py +920 -0
  28. fetchforge-2.3.1/fetchforge/ytdlp.py +501 -0
  29. fetchforge-2.0.0/README.md → fetchforge-2.3.1/fetchforge.egg-info/PKG-INFO +73 -15
  30. fetchforge-2.3.1/fetchforge.egg-info/SOURCES.txt +58 -0
  31. fetchforge-2.3.1/fetchforge.egg-info/requires.txt +11 -0
  32. fetchforge-2.3.1/pyproject.toml +43 -0
  33. fetchforge-2.3.1/tests/test_admission.py +285 -0
  34. fetchforge-2.3.1/tests/test_batch_pipeline.py +108 -0
  35. fetchforge-2.3.1/tests/test_capability_report.py +329 -0
  36. {fetchforge-2.0.0 → fetchforge-2.3.1}/tests/test_cli.py +10 -4
  37. fetchforge-2.3.1/tests/test_cookie_sources.py +228 -0
  38. fetchforge-2.3.1/tests/test_disconnect_subprocess.py +237 -0
  39. fetchforge-2.3.1/tests/test_download_fallback.py +124 -0
  40. fetchforge-2.3.1/tests/test_encode.py +171 -0
  41. fetchforge-2.3.1/tests/test_encode_overrides.py +669 -0
  42. fetchforge-2.3.1/tests/test_font_assets.py +187 -0
  43. {fetchforge-2.0.0 → fetchforge-2.3.1}/tests/test_history.py +11 -11
  44. fetchforge-2.3.1/tests/test_items_runner.py +261 -0
  45. fetchforge-2.3.1/tests/test_job.py +175 -0
  46. fetchforge-2.3.1/tests/test_nvenc_probe.py +369 -0
  47. fetchforge-2.3.1/tests/test_pipeline_sim.py +110 -0
  48. fetchforge-2.3.1/tests/test_port_conflict.py +126 -0
  49. {fetchforge-2.0.0 → fetchforge-2.3.1}/tests/test_provision.py +54 -2
  50. fetchforge-2.3.1/tests/test_sections.py +284 -0
  51. fetchforge-2.3.1/tests/test_server.py +703 -0
  52. fetchforge-2.3.1/tests/test_static_assets.py +126 -0
  53. fetchforge-2.3.1/tests/test_stream_errors.py +146 -0
  54. fetchforge-2.3.1/tests/test_tool_resolution.py +232 -0
  55. fetchforge-2.3.1/tests/test_wake_lock.py +198 -0
  56. fetchforge-2.0.0/fetchforge/index.html +0 -2978
  57. fetchforge-2.0.0/fetchforge/server.py +0 -2198
  58. fetchforge-2.0.0/fetchforge.egg-info/SOURCES.txt +0 -24
  59. fetchforge-2.0.0/fetchforge.egg-info/requires.txt +0 -4
  60. fetchforge-2.0.0/pyproject.toml +0 -33
  61. fetchforge-2.0.0/tests/test_batch_pipeline.py +0 -163
  62. fetchforge-2.0.0/tests/test_encode.py +0 -106
  63. fetchforge-2.0.0/tests/test_pipeline_sim.py +0 -153
  64. fetchforge-2.0.0/tests/test_server.py +0 -142
  65. fetchforge-2.0.0/tests/test_tool_resolution.py +0 -27
  66. {fetchforge-2.0.0 → fetchforge-2.3.1}/fetchforge/__main__.py +0 -0
  67. {fetchforge-2.0.0 → fetchforge-2.3.1}/fetchforge.egg-info/dependency_links.txt +0 -0
  68. {fetchforge-2.0.0 → fetchforge-2.3.1}/fetchforge.egg-info/entry_points.txt +0 -0
  69. {fetchforge-2.0.0 → fetchforge-2.3.1}/fetchforge.egg-info/top_level.txt +0 -0
  70. {fetchforge-2.0.0 → fetchforge-2.3.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Petur Bjarnason
3
+ Copyright (c) 2026 prekabreki
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,3 +1,5 @@
1
1
  include fetchforge/index.html
2
+ include fetchforge/app.css
3
+ include fetchforge/app.js
2
4
  include LICENSE
3
5
  include README.md
@@ -1,17 +1,23 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fetchforge
3
- Version: 2.0.0
3
+ Version: 2.3.1
4
4
  Summary: Download YouTube videos and transcode to H.265/HEVC with NVIDIA NVENC — a localhost web app.
5
- Author: Petur Bjarnason
5
+ Author-email: prekabreki <prekabreki@users.noreply.github.com>
6
6
  License: MIT
7
- Project-URL: Homepage, https://github.com/prekabreki/fetchforge
7
+ Project-URL: Homepage, https://github.com/prekabreki/FetchForge
8
8
  Requires-Python: >=3.12
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
- Requires-Dist: fastapi
12
- Requires-Dist: uvicorn
13
- Requires-Dist: python-multipart
11
+ Requires-Dist: fastapi>=0.143
12
+ Requires-Dist: uvicorn>=0.54
13
+ Requires-Dist: python-multipart>=0.0.32
14
14
  Requires-Dist: yt-dlp[default]
15
+ Provides-Extra: test
16
+ Requires-Dist: httpx; extra == "test"
17
+ Requires-Dist: ruff; extra == "test"
18
+ Requires-Dist: build; extra == "test"
19
+ Requires-Dist: setuptools>=68; extra == "test"
20
+ Requires-Dist: wheel; extra == "test"
15
21
  Dynamic: license-file
16
22
 
17
23
  # FetchForge
@@ -35,7 +41,8 @@ pip install fetchforge
35
41
  fetchforge
36
42
  ```
37
43
 
38
- The browser opens automatically at `http://localhost:8765`. On Windows, if an
44
+ The browser opens automatically at `http://localhost:8765` (or the next free
45
+ port, if another program already holds that one). On Windows, if an
39
46
  NVENC-capable ffmpeg isn't already present, FetchForge downloads one on first
40
47
  run. On Linux, install ffmpeg from your package manager first
41
48
  (`sudo dnf install ffmpeg` / `sudo apt install ffmpeg`) and make sure the NVIDIA
@@ -54,8 +61,20 @@ cd fetchforge
54
61
  ./launch.sh # Windows: launch.bat
55
62
  ```
56
63
 
57
- > "Update yt-dlp" in the UI is a no-op for pip installs — update with
58
- > `pip install -U fetchforge` (or `pip install -U "yt-dlp[default]"`).
64
+ > On Windows, `launch.bat` creates the `.venv` with `%PYTHON%` if you set it,
65
+ > otherwise with `python` from `PATH`, falling back to the `py -3` launcher when
66
+ > that one is older than 3.12 (apps that bundle their own Python tend to put it
67
+ > first on `PATH`). If the interpreter it picks is the Microsoft
68
+ > Store build of Python, the venv inherits its `%LOCALAPPDATA%` filesystem
69
+ > virtualization — relevant because the NVENC-ffmpeg auto-provision cache also
70
+ > lives under `%LOCALAPPDATA%\FetchForge\ffmpeg`. Prefer a python.org install
71
+ > (or set `PYTHON` to one) if you hit path-resolution oddities.
72
+
73
+ > The **Update yt-dlp** button adapts to how yt-dlp was installed: it runs
74
+ > `pip install -U "yt-dlp[default]"` when yt-dlp lives in the app's own
75
+ > environment (the normal pip/venv install), self-updates the bundled
76
+ > `yt-dlp.exe` on Windows, and otherwise points you at your system package
77
+ > manager. FetchForge itself updates with `pip install -U fetchforge`.
59
78
 
60
79
  ## Stack
61
80
 
@@ -94,27 +113,50 @@ cwd — the normal pip install path never needs them.
94
113
 
95
114
  Working from a clone instead: run `./launch.sh` (or `launch.bat` on Windows) — it sets up a `.venv`, installs the package in editable mode, and starts the server the same way.
96
115
 
116
+ ### Playing the output
117
+
118
+ Converted videos are H.265/HEVC in MP4, which Windows' built-in players refuse to play unless you've bought Microsoft's HEVC Video Extensions from the Store.
119
+ VLC and mpv play them with nothing extra installed.
120
+ Apple players (QuickTime, Safari, iOS) accept them too, since the files are tagged `hvc1`.
121
+ Audio-extract output (WAV/MP3) plays anywhere.
122
+
97
123
  ## Cookies
98
124
 
99
125
  Public videos need no cookies. Cookies are only necessary for age-restricted,
100
126
  private, or members-only videos, which require a logged-in YouTube session.
101
127
 
102
- To get a `cookies.txt`:
103
-
104
- 1. Install a cookies-export browser extension — **Get cookies.txt LOCALLY**
105
- for Chrome/Edge, or **cookies.txt** for Firefox.
106
- 2. Log in to YouTube in that browser.
107
- 3. Open the extension on a `youtube.com` tab and export in **Netscape**
108
- format — that's your `cookies.txt`.
109
- 4. Upload the file via the **Authentication** card in the FetchForge UI.
110
-
111
- The file grants access to your YouTube account, so treat it as a secret: it's
112
- gitignored and stays on your machine — don't share or commit it. Re-export it
113
- if it stops working; YouTube rotates cookies periodically.
128
+ The **Authentication** card (#01) gives you three ways to load them:
129
+
130
+ - **Attempt to fetch cookies** — one click; FetchForge reads cookies straight
131
+ from your installed browsers (Brave, Chrome, Chromium, Edge, Vivaldi, Opera,
132
+ Firefox) and *all* their profiles, picks the one with the most YouTube
133
+ cookies, and loads it. If more than one profile has cookies, it lists them so
134
+ you can switch. Best-effort — a locked keyring or missing browser is reported,
135
+ not fatal.
136
+ - **Load cookies.txt** — upload a Netscape-format file exported by a browser
137
+ extension (**Get cookies.txt LOCALLY** for Chrome/Edge, **cookies.txt** for
138
+ Firefox: log in to YouTube, open the extension on a `youtube.com` tab, export).
139
+ - **Paste cookies** — paste the Netscape text directly; it's masked, never
140
+ displayed, and saved server-side.
141
+
142
+ A **Clear cookies** button removes them for a cookie-free run. If YouTube rotates
143
+ your cookies mid-download (a common failure — see below), FetchForge notices,
144
+ drops them automatically for the rest of that run, and warns you, so one stale
145
+ jar doesn't sink a whole playlist.
146
+
147
+ The cookie file grants access to your YouTube account, so treat it as a secret:
148
+ it's gitignored and stays on your machine — don't share or commit it.
149
+
150
+ > **Cookie rotation:** cookies exported (or read) from a *running* browser can be
151
+ > invalidated by YouTube as a security measure, and stale cookies are worse than
152
+ > none. For durable auth, log in via a fresh private window and close it before
153
+ > loading, and re-fetch if downloads start failing.
114
154
 
115
155
  ## Features
116
156
 
117
157
  - **Sequential or pipelined playlist processing** — pipeline mode runs download and encode concurrently with a `maxsize=1` queue (downloader stays at most one video ahead of the encoder)
158
+ - **Per-video playlist selection** — a resolved playlist shows a checklist (all checked by default) with select all / none / invert, so you can grab just the parts you want
159
+ - **Robust playlist formats** — playlists take the highest-available stream per video (handles mixed 720p/1080p lists), and one video that can't be fetched is skipped so the rest of the playlist still completes
118
160
  - **Smart pre-download skip** — checks for existing `<title>_h265.mp4` before downloading, skips if ≥85% of expected size
119
161
  - **Two encode tunes** — `uhq` (Smart Auto, archival quality) and `hq` (NLE-friendly, ~4–6× speed, capped at source bitrate)
120
162
  - **HDR / 10-bit passthrough** — auto-detected; outputs `yuv420p10le` + `main10`
@@ -1,19 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: fetchforge
3
- Version: 2.0.0
4
- Summary: Download YouTube videos and transcode to H.265/HEVC with NVIDIA NVENC — a localhost web app.
5
- Author: Petur Bjarnason
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/prekabreki/fetchforge
8
- Requires-Python: >=3.12
9
- Description-Content-Type: text/markdown
10
- License-File: LICENSE
11
- Requires-Dist: fastapi
12
- Requires-Dist: uvicorn
13
- Requires-Dist: python-multipart
14
- Requires-Dist: yt-dlp[default]
15
- Dynamic: license-file
16
-
17
1
  # FetchForge
18
2
 
19
3
  > **Requires an NVIDIA GPU with NVENC.** The H.265 transcode uses hardware
@@ -35,7 +19,8 @@ pip install fetchforge
35
19
  fetchforge
36
20
  ```
37
21
 
38
- The browser opens automatically at `http://localhost:8765`. On Windows, if an
22
+ The browser opens automatically at `http://localhost:8765` (or the next free
23
+ port, if another program already holds that one). On Windows, if an
39
24
  NVENC-capable ffmpeg isn't already present, FetchForge downloads one on first
40
25
  run. On Linux, install ffmpeg from your package manager first
41
26
  (`sudo dnf install ffmpeg` / `sudo apt install ffmpeg`) and make sure the NVIDIA
@@ -54,8 +39,20 @@ cd fetchforge
54
39
  ./launch.sh # Windows: launch.bat
55
40
  ```
56
41
 
57
- > "Update yt-dlp" in the UI is a no-op for pip installs — update with
58
- > `pip install -U fetchforge` (or `pip install -U "yt-dlp[default]"`).
42
+ > On Windows, `launch.bat` creates the `.venv` with `%PYTHON%` if you set it,
43
+ > otherwise with `python` from `PATH`, falling back to the `py -3` launcher when
44
+ > that one is older than 3.12 (apps that bundle their own Python tend to put it
45
+ > first on `PATH`). If the interpreter it picks is the Microsoft
46
+ > Store build of Python, the venv inherits its `%LOCALAPPDATA%` filesystem
47
+ > virtualization — relevant because the NVENC-ffmpeg auto-provision cache also
48
+ > lives under `%LOCALAPPDATA%\FetchForge\ffmpeg`. Prefer a python.org install
49
+ > (or set `PYTHON` to one) if you hit path-resolution oddities.
50
+
51
+ > The **Update yt-dlp** button adapts to how yt-dlp was installed: it runs
52
+ > `pip install -U "yt-dlp[default]"` when yt-dlp lives in the app's own
53
+ > environment (the normal pip/venv install), self-updates the bundled
54
+ > `yt-dlp.exe` on Windows, and otherwise points you at your system package
55
+ > manager. FetchForge itself updates with `pip install -U fetchforge`.
59
56
 
60
57
  ## Stack
61
58
 
@@ -94,27 +91,50 @@ cwd — the normal pip install path never needs them.
94
91
 
95
92
  Working from a clone instead: run `./launch.sh` (or `launch.bat` on Windows) — it sets up a `.venv`, installs the package in editable mode, and starts the server the same way.
96
93
 
94
+ ### Playing the output
95
+
96
+ Converted videos are H.265/HEVC in MP4, which Windows' built-in players refuse to play unless you've bought Microsoft's HEVC Video Extensions from the Store.
97
+ VLC and mpv play them with nothing extra installed.
98
+ Apple players (QuickTime, Safari, iOS) accept them too, since the files are tagged `hvc1`.
99
+ Audio-extract output (WAV/MP3) plays anywhere.
100
+
97
101
  ## Cookies
98
102
 
99
103
  Public videos need no cookies. Cookies are only necessary for age-restricted,
100
104
  private, or members-only videos, which require a logged-in YouTube session.
101
105
 
102
- To get a `cookies.txt`:
103
-
104
- 1. Install a cookies-export browser extension — **Get cookies.txt LOCALLY**
105
- for Chrome/Edge, or **cookies.txt** for Firefox.
106
- 2. Log in to YouTube in that browser.
107
- 3. Open the extension on a `youtube.com` tab and export in **Netscape**
108
- format — that's your `cookies.txt`.
109
- 4. Upload the file via the **Authentication** card in the FetchForge UI.
110
-
111
- The file grants access to your YouTube account, so treat it as a secret: it's
112
- gitignored and stays on your machine — don't share or commit it. Re-export it
113
- if it stops working; YouTube rotates cookies periodically.
106
+ The **Authentication** card (#01) gives you three ways to load them:
107
+
108
+ - **Attempt to fetch cookies** — one click; FetchForge reads cookies straight
109
+ from your installed browsers (Brave, Chrome, Chromium, Edge, Vivaldi, Opera,
110
+ Firefox) and *all* their profiles, picks the one with the most YouTube
111
+ cookies, and loads it. If more than one profile has cookies, it lists them so
112
+ you can switch. Best-effort — a locked keyring or missing browser is reported,
113
+ not fatal.
114
+ - **Load cookies.txt** — upload a Netscape-format file exported by a browser
115
+ extension (**Get cookies.txt LOCALLY** for Chrome/Edge, **cookies.txt** for
116
+ Firefox: log in to YouTube, open the extension on a `youtube.com` tab, export).
117
+ - **Paste cookies** — paste the Netscape text directly; it's masked, never
118
+ displayed, and saved server-side.
119
+
120
+ A **Clear cookies** button removes them for a cookie-free run. If YouTube rotates
121
+ your cookies mid-download (a common failure — see below), FetchForge notices,
122
+ drops them automatically for the rest of that run, and warns you, so one stale
123
+ jar doesn't sink a whole playlist.
124
+
125
+ The cookie file grants access to your YouTube account, so treat it as a secret:
126
+ it's gitignored and stays on your machine — don't share or commit it.
127
+
128
+ > **Cookie rotation:** cookies exported (or read) from a *running* browser can be
129
+ > invalidated by YouTube as a security measure, and stale cookies are worse than
130
+ > none. For durable auth, log in via a fresh private window and close it before
131
+ > loading, and re-fetch if downloads start failing.
114
132
 
115
133
  ## Features
116
134
 
117
135
  - **Sequential or pipelined playlist processing** — pipeline mode runs download and encode concurrently with a `maxsize=1` queue (downloader stays at most one video ahead of the encoder)
136
+ - **Per-video playlist selection** — a resolved playlist shows a checklist (all checked by default) with select all / none / invert, so you can grab just the parts you want
137
+ - **Robust playlist formats** — playlists take the highest-available stream per video (handles mixed 720p/1080p lists), and one video that can't be fetched is skipped so the rest of the playlist still completes
118
138
  - **Smart pre-download skip** — checks for existing `<title>_h265.mp4` before downloading, skips if ≥85% of expected size
119
139
  - **Two encode tunes** — `uhq` (Smart Auto, archival quality) and `hq` (NLE-friendly, ~4–6× speed, capped at source bitrate)
120
140
  - **HDR / 10-bit passthrough** — auto-detected; outputs `yuv420p10le` + `main10`
@@ -1,3 +1,3 @@
1
1
  """FetchForge — download YouTube videos and transcode to H.265/HEVC with NVIDIA NVENC."""
2
2
 
3
- __version__ = "2.0.0"
3
+ __version__ = "2.3.1"