@torrent-tv/proxy 2.87.5 → 2.87.6

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.87.6
2
+
3
+ - **Chore**: Move torrent infohash key derivation into a shared utility so the source registry does not depend on the torrent service layer.
4
+
1
5
  ## 2.87.5
2
6
 
3
7
  - **Fix**: Identify registered torrent sources by infohash so magnet links with different names or tracker lists share the same produced output.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.87.5",
3
+ "version": "2.87.6",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "publishConfig": {
@@ -24,7 +24,7 @@
24
24
  * @returns {Promise<void>}
25
25
  */
26
26
 
27
- import { deriveSourceKey } from "../../../services/torrent/torrent-source-key.js";
27
+ import { deriveSourceKey } from "../../../utils/torrent-source-key.js";
28
28
  import { spawn } from "node:child_process";
29
29
  import { TextSubtitleTrack } from "../../../services/media/tracks/TextSubtitleTrack.js";
30
30
  import { SubtitleController } from "../../../services/server/controllers/SubtitleController.js";
@@ -200,7 +200,7 @@ export class OutputSpec {
200
200
  * @param {object} params
201
201
  * @param {string} params.sourceKey - `torrent:<infohash>`, the canonical
202
202
  * identity of the torrent itself: a magnet and a `.torrent` file for the
203
- * same content produce the same one (`torrent/torrent-source-key.js`). Nothing
203
+ * same content produce the same one (`utils/torrent-source-key.js`). Nothing
204
204
  * further is needed to say WHICH film this is.
205
205
  * @param {string} params.segmentFormatId - fMP4 or MPEG-TS. Two viewers
206
206
  * asking for different containers cannot share one ffmpeg.
@@ -2,7 +2,7 @@
2
2
  * @file WebTorrent client pool.
3
3
  *
4
4
  * Manages a shared WebTorrent client instance and a map of active torrents
5
- * keyed by their own infohash (see `torrent/torrent-source-key.js`), so a magnet and
5
+ * keyed by their own infohash (see `utils/torrent-source-key.js`), so a magnet and
6
6
  * a `.torrent` file for the same content share one entry. Tracks file-level
7
7
  * usage so that only the pieces needed by active streams are selected for
8
8
  * download.
@@ -20,7 +20,7 @@ import { Urgency, urgencyName } from "./demand/index.js";
20
20
  import { demandFor, forgetTorrent, reconcileAll, hasUnmetDemand } from "./download/registry.js";
21
21
  import { withdrawClaim } from "./download/withdraw-claim.js";
22
22
  import { isAtAWatchingViewer, isBehindEverybody, isNobodyComingNow } from "../viewer/PriorityMap.js";
23
- import { deriveSourceKey } from "./torrent-source-key.js";
23
+ import { deriveSourceKey } from "../../utils/torrent-source-key.js";
24
24
 
25
25
  /** How a window stated from the priority map names itself. */
26
26
  const MAP_CLAIMANT = "priority-map";
@@ -21,7 +21,7 @@
21
21
  */
22
22
 
23
23
  import { TorrentWorkerClient } from "./client.js";
24
- import { deriveSourceKey } from "../torrent-source-key.js";
24
+ import { deriveSourceKey } from "../../../utils/torrent-source-key.js";
25
25
 
26
26
  /**
27
27
  * A torrent pool whose work happens on another thread.
@@ -7,7 +7,7 @@
7
7
  * are evicted to keep memory usage predictable.
8
8
  */
9
9
 
10
- import { deriveSourceKey } from "../services/torrent/torrent-source-key.js";
10
+ import { deriveSourceKey } from "../utils/torrent-source-key.js";
11
11
 
12
12
  /**
13
13
  * @typedef {Object} SourceRecord
@@ -10,8 +10,8 @@
10
10
  * The infohash is the one thing both forms carry for the same content, and
11
11
  * both carry it synchronously — a magnet's `btih` needs no network, and a
12
12
  * `.torrent` file's SHA-1 of its own `info` dictionary needs no metadata
13
- * exchange either. `parse-torrent` (already in the dependency tree via
14
- * `webtorrent`) reads either form without touching the network.
13
+ * exchange either. `parse-torrent` reads either form without touching the
14
+ * network.
15
15
  */
16
16
 
17
17
  import parseTorrent from "parse-torrent";