@nitrimandylis/flick 0.2.1 → 0.2.3

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/README.md CHANGED
@@ -116,6 +116,6 @@ flick's list of torrent sources follows the one curated by [torlink](https://git
116
116
 
117
117
  `THE FILM STARTS WHEN YOU DO`
118
118
 
119
- MIT licensed.
119
+ MIT licensed. The room art (`room/art/`) was generated with FLUX 3 Image Klein under the FLUX Kommunity licence.
120
120
 
121
121
  </div>
package/dist/flick.js CHANGED
@@ -308,7 +308,8 @@ var TYPES = {
308
308
  ".js": "text/javascript; charset=utf-8",
309
309
  ".css": "text/css; charset=utf-8",
310
310
  ".svg": "image/svg+xml",
311
- ".woff2": "font/woff2"
311
+ ".woff2": "font/woff2",
312
+ ".webp": "image/webp"
312
313
  };
313
314
  function emptyState() {
314
315
  return { film: null, src: null, playing: false, time: 0, at: 0, ended: false, ratings: {}, last: null };
@@ -547,7 +548,7 @@ class Room {
547
548
  res.writeHead(200, { "content-type": "application/json" });
548
549
  return res.end(JSON.stringify(await filmDetails(details[1])));
549
550
  }
550
- if (/^\/(style\.css|room\.js|favicon\.svg|fonts\/[a-z0-9-]+\.woff2)$/.test(path))
551
+ if (/^\/(style\.css|room\.js|favicon\.svg|fonts\/[a-z0-9-]+\.woff2|art\/[a-z]+\.webp)$/.test(path))
551
552
  return this.file(res, path.slice(1));
552
553
  } catch {
553
554
  if (!res.headersSent)
@@ -1168,7 +1169,7 @@ class Rqbit {
1168
1169
  if (await rqbitUp())
1169
1170
  return;
1170
1171
  mkdirSync4(FILMS_DIR, { recursive: true });
1171
- this.child = spawn3("rqbit", ["--http-api-listen-addr", "127.0.0.1:3041", "--listen-port", "4247", "--disable-dht-persistence", "server", "start", "--disable-persistence", FILMS_DIR], { stdio: "ignore" });
1172
+ this.child = spawn3("rqbit", ["--http-api-listen-addr", "127.0.0.1:3041", "--listen-port", "4247", "--ratelimit-upload", "1", "--disable-dht-persistence", "server", "start", "--disable-persistence", FILMS_DIR], { stdio: "ignore" });
1172
1173
  for (let i = 0;i < 25; i++) {
1173
1174
  if (await rqbitUp())
1174
1175
  return;
@@ -1240,7 +1241,7 @@ class Webtorrent {
1240
1241
  } catch {
1241
1242
  throw new Error("the built-in engine's native parts aren't installed. Install rqbit (brew install rqbit), or reinstall flick with npm, or run: bun pm -g trust --all");
1242
1243
  }
1243
- this.client = new WebTorrent;
1244
+ this.client = new WebTorrent({ uploadLimit: 0 });
1244
1245
  const server = this.client.createServer({ hostname: "127.0.0.1" });
1245
1246
  await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
1246
1247
  this.base = `http://127.0.0.1:${server.server.address().port}/webtorrent`;
@@ -3697,7 +3698,7 @@ function Help() {
3697
3698
 
3698
3699
  // src/cli.tsx
3699
3700
  import { jsx as jsx3 } from "react/jsx-runtime";
3700
- var VERSION = "0.2.1";
3701
+ var VERSION = "0.2.3";
3701
3702
  var HELP = `flick ${VERSION}: search a film, pick a torrent, watch it now
3702
3703
 
3703
3704
  usage:
package/man/flick.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH FLICK 1 "2026-11-23" "flick 0.2.1" "User Commands"
1
+ .TH FLICK 1 "2026-12-06" "flick 0.2.3" "User Commands"
2
2
  .SH NAME
3
3
  flick \- search a film or a show, pick a torrent, watch it now
4
4
  .SH SYNOPSIS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitrimandylis/flick",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Search a film or a show, pick a torrent, watch it now in a full-screen terminal UI. Or watch together, in sync, from two places.",
5
5
  "keywords": [
6
6
  "torrent",
Binary file
Binary file
Binary file
package/room/room.js CHANGED
@@ -10,6 +10,7 @@ const DRIFT_LIMIT = 3; // seconds apart before the pill turns magenta
10
10
  const CURTAIN_CAP = 10000; // ms before the loading curtain gives up and lifts
11
11
  const SEEK_LEAD = 1.5; // seconds: a jump while playing re-buffers through the tunnel, so land ahead
12
12
  const FOLLOW_SLACK = 2; // seconds a playing film may differ from the room before we seek
13
+ const CATCH_UP_MAX = 15; // seconds: under this, a drifted player catches up by speed, not by seeking
13
14
 
14
15
  const roomId = location.pathname.split("/")[2];
15
16
  const $ = (id) => document.getElementById(id);
@@ -272,8 +273,16 @@ setInterval(() => {
272
273
  // Right after our own seek the room hasn't heard about it yet, and its clock
273
274
  // still shows the old spot. Don't drag the person back to it.
274
275
  if (Date.now() - lastLocalAction < 3000) return;
276
+ // Still loading data: we fall behind while we wait, and seeking now would
277
+ // throw away what is arriving and start a new request through the tunnel,
278
+ // which stalls again. That loop stopped one seat every few seconds.
279
+ if (video.readyState < 3) return;
275
280
  const behind = roomTime() - video.currentTime;
276
- if (Math.abs(behind) > FOLLOW_SLACK) follow();
281
+ // A few seconds off: catch up by speed. The film keeps reading the same
282
+ // stretch of file, so nothing has to reload.
283
+ if (Math.abs(behind) > CATCH_UP_MAX) follow();
284
+ else if (behind > FOLLOW_SLACK) video.playbackRate = 1.5;
285
+ else if (behind < -FOLLOW_SLACK) video.playbackRate = 0.75;
277
286
  else if (behind > 0.3) video.playbackRate = 1.05;
278
287
  else if (behind < -0.3) video.playbackRate = 0.95;
279
288
  else video.playbackRate = 1;
package/room/style.css CHANGED
@@ -108,6 +108,23 @@ button { cursor: pointer; }
108
108
  var(--void);
109
109
  }
110
110
 
111
+ /* Screenprint art behind the two waiting screens (room/art/, FLUX 3 Klein).
112
+ The upscaler smooths the print grain away, so the grain layer puts it back.
113
+ The radial wash is darkest where the centred text sits. */
114
+ #gate, #empty {
115
+ --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
116
+ --wash: radial-gradient(55% 45% at 50% 50%, rgba(6, 10, 18, 0.72), rgba(6, 10, 18, 0.3) 100%);
117
+ }
118
+ /* The couch fills the lower half, so the gate's content sits up on the wall. */
119
+ #gate {
120
+ --wash: radial-gradient(60% 40% at 50% 28%, rgba(6, 10, 18, 0.75), rgba(6, 10, 18, 0.2) 100%);
121
+ place-content: start center;
122
+ padding-top: 10vh;
123
+ background: var(--grain), var(--wash), url("/art/couch.webp") center bottom / cover no-repeat, var(--void);
124
+ }
125
+ /* An empty marquee board: literally nothing on yet. */
126
+ #empty { background: var(--grain), var(--wash), url("/art/lobby.webp") center / cover no-repeat, var(--void); }
127
+
111
128
  .panel p { margin: 0; max-width: 34ch; color: var(--mute); }
112
129
  .panel .lead { color: var(--ink); font-size: 20px; }
113
130
 
@@ -310,6 +327,9 @@ button { cursor: pointer; }
310
327
  position: absolute;
311
328
  inset: 0 0 auto 0;
312
329
  height: 78vh;
330
+ /* The fallback when Wikidata has no art for the film; room.js sets the
331
+ film's own image inline over it. */
332
+ background-image: url("/art/projector.webp");
313
333
  background-size: cover;
314
334
  background-position: center 30%;
315
335
  opacity: 0.38;