fluncle 0.253.0 → 0.254.0

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.
Files changed (2) hide show
  1. package/bin/fluncle.mjs +27 -9
  2. package/package.json +1 -1
package/bin/fluncle.mjs CHANGED
@@ -622,7 +622,7 @@ function parseVersion(version) {
622
622
  var currentVersion;
623
623
  var init_version = __esm(() => {
624
624
  init_output();
625
- currentVersion = "0.253.0".trim() ? "0.253.0".trim() : "0.1.0";
625
+ currentVersion = "0.254.0".trim() ? "0.254.0".trim() : "0.1.0";
626
626
  });
627
627
 
628
628
  // src/update-notifier.ts
@@ -2335,7 +2335,7 @@ function parseVersion2(version) {
2335
2335
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
2336
2336
  var init_version2 = __esm(() => {
2337
2337
  init_output();
2338
- currentVersion2 = "0.253.0".trim() ? "0.253.0".trim() : "0.1.0";
2338
+ currentVersion2 = "0.254.0".trim() ? "0.254.0".trim() : "0.1.0";
2339
2339
  });
2340
2340
 
2341
2341
  // ../../packages/registry/src/index.ts
@@ -4309,8 +4309,11 @@ async function trackRequeueVideoCommand(idOrLogId) {
4309
4309
  async function trackPurgeVideoCommand(idOrLogId) {
4310
4310
  return adminApiPost(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/video/purge`);
4311
4311
  }
4312
- async function trackPinSourceCommand(idOrLogId, youtube) {
4313
- return adminApiPut(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/capture-source`, { youtubeVideoId: youtube });
4312
+ async function trackPinSourceCommand(idOrLogId, youtube, options = {}) {
4313
+ return adminApiPut(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/capture-source`, {
4314
+ ...options.allowDurationMismatch === true ? { allowDurationMismatch: true } : {},
4315
+ youtubeVideoId: youtube
4316
+ });
4314
4317
  }
4315
4318
  async function trackClearSourcePinCommand(idOrLogId) {
4316
4319
  return adminApiDelete(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/capture-source`);
@@ -14835,7 +14838,12 @@ var init_admin_tracks = __esm(() => {
14835
14838
  strictObject({
14836
14839
  attemptedAt: string2().datetime({ offset: true }),
14837
14840
  bytes: number2().int().min(1),
14838
- captureVerification: _enum(["operator-verified", "preview-match", "unverified"]),
14841
+ captureVerification: _enum([
14842
+ "consensus-verified",
14843
+ "operator-verified",
14844
+ "preview-match",
14845
+ "unverified"
14846
+ ]),
14839
14847
  capturedAt: string2().datetime({ offset: true }),
14840
14848
  kind: literal("capture"),
14841
14849
  outcome: literal("done"),
@@ -14876,6 +14884,7 @@ var init_admin_tracks = __esm(() => {
14876
14884
  artists: array(string2().max(512)).max(64),
14877
14885
  bpm: number2().optional(),
14878
14886
  captureSourcePin: string2().max(64).optional(),
14887
+ captureSourcePinAllowDuration: boolean2().optional(),
14879
14888
  certified: boolean2(),
14880
14889
  durationMs: number2().int().min(1).optional(),
14881
14890
  label: string2().max(1024).optional(),
@@ -15164,6 +15173,7 @@ var init_admin_tracks = __esm(() => {
15164
15173
  }));
15165
15174
  CaptureSourcePinResultSchema = object({
15166
15175
  captureSourcePin: string2().nullable(),
15176
+ captureSourcePinAllowDuration: boolean2(),
15167
15177
  captureStatus: string2(),
15168
15178
  logId: string2().nullable(),
15169
15179
  ok: literal(true),
@@ -15176,6 +15186,7 @@ var init_admin_tracks = __esm(() => {
15176
15186
  summary: "Pin the YouTube upload the capture sweep must download for a track",
15177
15187
  tags: ["Admin"]
15178
15188
  }).input(object({
15189
+ allowDurationMismatch: boolean2().optional(),
15179
15190
  trackId: string2(),
15180
15191
  youtubeVideoId: string2().min(1).max(2048)
15181
15192
  })).output(CaptureSourcePinResultSchema);
@@ -15264,6 +15275,7 @@ var init_admin_tracks = __esm(() => {
15264
15275
  bpm: number2().optional(),
15265
15276
  capturePriority: number2().nullable(),
15266
15277
  captureSourcePin: string2().optional(),
15278
+ captureSourcePinAllowDuration: boolean2().optional(),
15267
15279
  certified: boolean2(),
15268
15280
  deezerQuery: string2().optional(),
15269
15281
  durationMs: number2(),
@@ -22218,7 +22230,7 @@ JSON field reference:
22218
22230
  await Promise.resolve().then(() => init_track());
22219
22231
  await runTrackPurgeVideo(idOrLogId, options, trackPurgeVideoCommand);
22220
22232
  });
22221
- adminTrack.command("pin-source").description("Pin the YouTube upload the capture sweep must download for a track (operator); --clear withdraws it").argument("[idOrLogId]").option("--clear", "Withdraw the pin (capture status and captured audio stay as they are)", false).option("--json", "Print JSON", false).option("--upload <url|id>", "The YouTube upload: a bare 11-char video id or a youtube.com / youtu.be URL").allowExcessArguments().action(async (idOrLogId, options) => {
22233
+ adminTrack.command("pin-source").description("Pin the YouTube upload the capture sweep must download for a track (operator); --clear withdraws it").argument("[idOrLogId]").option("--allow-duration-mismatch", "Waive the duration guard for this pin: a deliberately chosen different edit of the same recording (the finding keeps its store length)", false).option("--clear", "Withdraw the pin (capture status and captured audio stay as they are)", false).option("--json", "Print JSON", false).option("--upload <url|id>", "The YouTube upload: a bare 11-char video id or a youtube.com / youtu.be URL").allowExcessArguments().action(async (idOrLogId, options) => {
22222
22234
  await Promise.resolve().then(() => init_track());
22223
22235
  await runTrackPinSource(idOrLogId, options, {
22224
22236
  clear: trackClearSourcePinCommand,
@@ -24593,7 +24605,7 @@ async function runTrackRequeueVideo(idOrLogId, options, trackRequeueVideoCommand
24593
24605
  console.log(result.alreadyClear ? `${result.logId} already had no video. Nothing to clear.` : `Cleared the video for ${result.logId}. It's back on the render queue (and off radio until re-rendered).`);
24594
24606
  }
24595
24607
  async function runTrackPinSource(idOrLogId, options, commands) {
24596
- const usage = "Usage: fluncle admin tracks pin-source <track_id|log_id> --upload <url|id> [--json] | --clear";
24608
+ const usage = "Usage: fluncle admin tracks pin-source <track_id|log_id> --upload <url|id> [--allow-duration-mismatch] [--json] | --clear";
24597
24609
  if (!idOrLogId) {
24598
24610
  throw new Error(`Missing id. ${usage}`);
24599
24611
  }
@@ -24604,13 +24616,19 @@ async function runTrackPinSource(idOrLogId, options, commands) {
24604
24616
  if (!options.clear && !youtube) {
24605
24617
  throw new Error(`Missing --upload <url|id> (or --clear to withdraw the pin). ${usage}`);
24606
24618
  }
24607
- const result = options.clear ? await commands.clear(idOrLogId) : await commands.pin(idOrLogId, youtube ?? "");
24619
+ if (options.clear && options.allowDurationMismatch) {
24620
+ throw new Error(`--allow-duration-mismatch rides a pin, not --clear. ${usage}`);
24621
+ }
24622
+ const result = options.clear ? await commands.clear(idOrLogId) : await commands.pin(idOrLogId, youtube ?? "", {
24623
+ allowDurationMismatch: options.allowDurationMismatch
24624
+ });
24608
24625
  if (options.json) {
24609
24626
  printJson(result);
24610
24627
  return;
24611
24628
  }
24612
24629
  const who = result.logId ?? result.trackId;
24613
- console.log(result.captureSourcePin ? `Pinned ${who} to youtube ${result.captureSourcePin} \u2014 capture ${result.captureStatus.toUpperCase()}; the next capture tick downloads that upload, ladder skipped.` : `Cleared the capture-source pin on ${who} \u2014 capture ${result.captureStatus.toUpperCase()} untouched; the ladder runs again.`);
24630
+ const guard = result.captureSourcePinAllowDuration ? "any length accepted" : "duration guard applies";
24631
+ console.log(result.captureSourcePin ? `Pinned ${who} to youtube ${result.captureSourcePin} \u2014 capture ${result.captureStatus.toUpperCase()}; the next capture tick downloads that upload, ladder skipped, ${guard}.` : `Cleared the capture-source pin on ${who} \u2014 capture ${result.captureStatus.toUpperCase()} untouched; the ladder runs again.`);
24614
24632
  }
24615
24633
  async function runTrackPurgeVideo(idOrLogId, options, trackPurgeVideoCommand) {
24616
24634
  if (!idOrLogId) {
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  "url": "git+https://github.com/mauricekleine/fluncle.git"
32
32
  },
33
33
  "type": "module",
34
- "version": "0.253.0"
34
+ "version": "0.254.0"
35
35
  }