weed-cli 1.2.7__tar.gz → 1.2.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: weed-cli
3
- Version: 1.2.7
3
+ Version: 1.2.8
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "weed-cli"
7
- version = "1.2.7"
7
+ version = "1.2.8"
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" }
@@ -137,7 +137,7 @@ def _rehydrate_jobs_from_library():
137
137
  'status': 'done', 'idx': 0, 'n_chunks': None,
138
138
  'content_hash': content_hash, 'path': rec['path'],
139
139
  'title': rec.get('title'), 'size': rec.get('size'), 'bps': rec.get('bps'),
140
- 'error': None,
140
+ 'signer_pubkey': rec.get('signer_pubkey'), 'error': None,
141
141
  }
142
142
  _lan_url = None # set once in run_web_ui() -- the base URL a phone on the
143
143
  # same LAN can actually reach this server at, or None if
@@ -211,7 +211,8 @@ def _run_host_job(host_id, archive_dir, file_name, port, price, relay_urls, adve
211
211
  _hosts[host_id].update(status='error', error=f'{type(e).__name__}: {e}')
212
212
 
213
213
 
214
- def _run_download_job(job_id, content_hash, relay_urls, out_path, k, use_lightning, title=None):
214
+ def _run_download_job(job_id, content_hash, relay_urls, out_path, k, use_lightning, title=None,
215
+ signer_pubkey=None):
215
216
  def on_progress(idx, n_chunks):
216
217
  with _lock:
217
218
  _jobs[job_id].update(idx=idx, n_chunks=n_chunks)
@@ -229,6 +230,7 @@ def _run_download_job(job_id, content_hash, relay_urls, out_path, k, use_lightni
229
230
  _library['downloads'][content_hash] = {
230
231
  'content_hash': content_hash, 'job_id': job_id, 'path': path,
231
232
  'title': title, 'downloaded_at': time.time(), 'size': size, 'bps': bps,
233
+ 'signer_pubkey': signer_pubkey,
232
234
  }
233
235
  _save_library()
234
236
  except SystemExit as e:
@@ -356,13 +358,16 @@ class Handler(BaseHTTPRequestHandler):
356
358
  k = int(body.get('k') or 3)
357
359
  use_lightning = bool(body.get('lightning'))
358
360
  title = body.get('title')
361
+ signer_pubkey = body.get('signer_pubkey')
359
362
 
360
363
  job_id = uuid.uuid4().hex[:12]
361
364
  with _lock:
362
365
  _jobs[job_id] = {'status': 'running', 'idx': 0, 'n_chunks': None,
363
- 'content_hash': content_hash, 'path': None, 'title': title, 'error': None}
366
+ 'content_hash': content_hash, 'path': None, 'title': title,
367
+ 'signer_pubkey': signer_pubkey, 'error': None}
364
368
  threading.Thread(target=_run_download_job,
365
- args=(job_id, content_hash, relay_urls, out_path, k, use_lightning, title),
369
+ args=(job_id, content_hash, relay_urls, out_path, k, use_lightning, title,
370
+ signer_pubkey),
366
371
  daemon=True).start()
367
372
  self._json({'job_id': job_id})
368
373
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: weed-cli
3
- Version: 1.2.7
3
+ Version: 1.2.8
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