weed-cli 1.7.4__tar.gz → 1.7.5__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.
- {weed_cli-1.7.4/weed_cli.egg-info → weed_cli-1.7.5}/PKG-INFO +1 -1
- {weed_cli-1.7.4 → weed_cli-1.7.5}/node.py +20 -2
- {weed_cli-1.7.4 → weed_cli-1.7.5}/pyproject.toml +1 -1
- {weed_cli-1.7.4 → weed_cli-1.7.5/weed_cli.egg-info}/PKG-INFO +1 -1
- {weed_cli-1.7.4 → weed_cli-1.7.5}/LICENSE +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/README.md +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/dht.py +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/discovery_relay.py +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/lightning_settle.py +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/poc_reputation.py +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/setup.cfg +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/shell.py +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/tunnel_relay.py +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/web_ui.py +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/weed.py +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/weed_cli.egg-info/SOURCES.txt +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/weed_cli.egg-info/dependency_links.txt +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/weed_cli.egg-info/entry_points.txt +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/weed_cli.egg-info/requires.txt +0 -0
- {weed_cli-1.7.4 → weed_cli-1.7.5}/weed_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: weed-cli
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.5
|
|
4
4
|
Summary: Censorship-resistant video PoC — discovery/hosting/download over signed relay events, a real Kademlia DHT, or a TLS-capable NAT-traversal tunnel
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: p2p,video,censorship-resistant,discovery,dht,kademlia,nat-traversal
|
|
@@ -232,7 +232,18 @@ def load_manifest_entries(archive_dir, file_name=None):
|
|
|
232
232
|
"""Every distinct file in the archive, not just one — find_manifest_entry
|
|
233
233
|
collapses to a single entries[-1], which is exactly why `host <dir>` with
|
|
234
234
|
no --file only ever served the single most-recently-added file out of a
|
|
235
|
-
45-video archive. Dedupes by name (last-write-wins, same convention).
|
|
235
|
+
45-video archive. Dedupes by name (last-write-wins, same convention).
|
|
236
|
+
|
|
237
|
+
Only 'video' entries are returned. Hosting depends on chunk data
|
|
238
|
+
(load_leaves) and per-chunk byte math (entry['chunk_size']), and ott
|
|
239
|
+
only ever writes either for video-type entries — everything else
|
|
240
|
+
(photos, or any file whose extension ott's is_video() doesn't
|
|
241
|
+
recognize, which is also where a plain .mp3 lands, since ott only has
|
|
242
|
+
two types) has chunk_size: None and no .ott/chunks/<hash>.json at all.
|
|
243
|
+
Filtering here, the one function every hosting path (weed.py,
|
|
244
|
+
shell.py, web_ui.py) goes through, means one non-video file sitting
|
|
245
|
+
in an archive_dir no longer poison-pills hosting everything else in
|
|
246
|
+
it with 'no chunks file at ...'."""
|
|
236
247
|
archive_dir = os.path.expanduser(archive_dir)
|
|
237
248
|
manifest_path = os.path.join(archive_dir, '.ott', 'manifest.jsonl')
|
|
238
249
|
if not os.path.exists(manifest_path):
|
|
@@ -244,8 +255,15 @@ def load_manifest_entries(archive_dir, file_name=None):
|
|
|
244
255
|
by_name = {}
|
|
245
256
|
for e in raw:
|
|
246
257
|
by_name[e['name']] = e
|
|
247
|
-
|
|
258
|
+
all_entries = list(by_name.values())
|
|
259
|
+
entries = [e for e in all_entries if e.get('type') == 'video']
|
|
248
260
|
if not entries:
|
|
261
|
+
if all_entries:
|
|
262
|
+
n = len(all_entries)
|
|
263
|
+
sys.exit(f"no hostable video file found in {archive_dir}" +
|
|
264
|
+
(f" matching {file_name}" if file_name else "") +
|
|
265
|
+
f" — found {n} non-video entr{'y' if n == 1 else 'ies'} "
|
|
266
|
+
f"(only video files can be hosted; see ott's is_video())")
|
|
249
267
|
sys.exit(f"no archived file found in {archive_dir}" + (f" matching {file_name}" if file_name else ""))
|
|
250
268
|
return entries
|
|
251
269
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "weed-cli"
|
|
7
|
-
version = "1.7.
|
|
7
|
+
version = "1.7.5"
|
|
8
8
|
description = "Censorship-resistant video PoC — discovery/hosting/download over signed relay events, a real Kademlia DHT, or a TLS-capable NAT-traversal tunnel"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: weed-cli
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.5
|
|
4
4
|
Summary: Censorship-resistant video PoC — discovery/hosting/download over signed relay events, a real Kademlia DHT, or a TLS-capable NAT-traversal tunnel
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: p2p,video,censorship-resistant,discovery,dht,kademlia,nat-traversal
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|