@nitrimandylis/flick 0.2.0 → 0.2.1

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/dist/flick.js CHANGED
@@ -614,6 +614,10 @@ function parseYifyEnglish(html) {
614
614
  }
615
615
  return null;
616
616
  }
617
+ function parseYifyZip(html) {
618
+ const link = html.match(/href="(\/subtitle\/[^"]+\.zip)"/);
619
+ return link ? link[1] : null;
620
+ }
617
621
  async function fromYify(imdbId) {
618
622
  const srt = join3(SUBS_DIR, `${imdbId}.srt`);
619
623
  if (existsSync3(srt))
@@ -628,8 +632,15 @@ async function fromYify(imdbId) {
628
632
  const slug = parseYifyEnglish(await page.text());
629
633
  if (!slug)
630
634
  return null;
631
- const zip = await fetch(`${YIFY}/subtitle/${slug}.zip`, {
632
- headers: { "User-Agent": UA, Referer: `${YIFY}/subtitles/${slug}` },
635
+ const subPage = `${YIFY}/subtitles/${slug}`;
636
+ const detail = await fetch(subPage, { headers: { "User-Agent": UA }, signal: AbortSignal.timeout(15000) });
637
+ if (!detail.ok)
638
+ return null;
639
+ const zipLink = parseYifyZip(await detail.text());
640
+ if (!zipLink)
641
+ return null;
642
+ const zip = await fetch(`${YIFY}${zipLink}`, {
643
+ headers: { "User-Agent": UA, Referer: subPage },
633
644
  signal: AbortSignal.timeout(20000)
634
645
  });
635
646
  if (!zip.ok)
@@ -1109,7 +1120,7 @@ class Couch {
1109
1120
  touchFilm(stream.folder);
1110
1121
  trimCache(loadConfig().cacheGB ?? 10, stream.folder);
1111
1122
  this.room.setFilm({ id: title.id, title: title.name, year: title.year ?? undefined }, stream.urlOf(video), subs?.vtt ?? null);
1112
- onStatus(`on in the room${subs ? ", English subtitles available" : ""}`);
1123
+ onStatus(`on in the room${subs ? ", English subtitles available" : ", no English subtitles found"}`);
1113
1124
  }
1114
1125
  async progress() {
1115
1126
  return this.stream ? this.stream.progress() : null;
@@ -1956,7 +1967,7 @@ async function watch(options) {
1956
1967
  }
1957
1968
  touchFilm(stream.folder);
1958
1969
  trimCache(options.cacheGB, stream.folder);
1959
- onStatus(`playing in ${options.player}${subs ? ", English subtitles on" : ""}`);
1970
+ onStatus(`playing in ${options.player}${subs ? ", English subtitles on" : ", no English subtitles found"}`);
1960
1971
  const playing = play(options.player, { url: stream.urlOf(video), title: options.name, subtitle: subs?.path ?? null, vtt: subs?.vtt ?? null });
1961
1972
  const timer = setInterval(async () => options.onProgress(await stream.progress()), 2000);
1962
1973
  const closed = playing.closed.then(async () => {
@@ -3686,7 +3697,7 @@ function Help() {
3686
3697
 
3687
3698
  // src/cli.tsx
3688
3699
  import { jsx as jsx3 } from "react/jsx-runtime";
3689
- var VERSION = "0.2.0";
3700
+ var VERSION = "0.2.1";
3690
3701
  var HELP = `flick ${VERSION}: search a film, pick a torrent, watch it now
3691
3702
 
3692
3703
  usage:
package/man/flick.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH FLICK 1 "2026-11-17" "flick 0.2.0" "User Commands"
1
+ .TH FLICK 1 "2026-11-23" "flick 0.2.1" "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.0",
3
+ "version": "0.2.1",
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",