nixamp 0.7.17 → 0.7.18

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/publish.d.ts CHANGED
@@ -12,7 +12,14 @@ export interface PublishTarget {
12
12
  * gets a 401 in JSON, which is a caller hearing nothing.
13
13
  */
14
14
  audio?: string;
15
- tracks: number;
15
+ /**
16
+ * How many tracks there are, asked at every heartbeat rather than once.
17
+ *
18
+ * Taken as a number, it was read before the library had finished loading --
19
+ * the port opens first now -- so a server with five thousand tracks
20
+ * advertised nought of them for as long as it stayed up.
21
+ */
22
+ tracks: () => number;
16
23
  nowPlaying: () => string;
17
24
  /**
18
25
  * The account this stream belongs to, from `nixamp login`.
package/dist/publish.js CHANGED
@@ -58,7 +58,7 @@ export class Publisher {
58
58
  name: this.target.name,
59
59
  url: this.target.url,
60
60
  ...(this.target.audio ? { audio: this.target.audio } : {}),
61
- tracks: this.target.tracks,
61
+ tracks: this.target.tracks(),
62
62
  nowPlaying: this.target.nowPlaying(),
63
63
  }),
64
64
  });
package/dist/server.js CHANGED
@@ -2937,9 +2937,9 @@ export async function serve(argv, version = "0.1.0") {
2937
2937
  name: options.name || hostname(),
2938
2938
  url: listen,
2939
2939
  audio,
2940
- // Asked of the engine rather than a variable, because the library is
2941
- // now read after the port opens and may still be arriving.
2942
- tracks: engine.snapshot(false).trackCount,
2940
+ // Asked at every heartbeat rather than once, because the library is
2941
+ // read after the port opens and is still arriving when this is made.
2942
+ tracks: () => engine.snapshot(false).trackCount,
2943
2943
  // From `nixamp login`. The directory will not list a stream it cannot
2944
2944
  // attribute to somebody, because a listing is now a phone code that
2945
2945
  // costs money to answer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nixamp",
3
- "version": "0.7.17",
3
+ "version": "0.7.18",
4
4
  "description": "It really whips the terminal's ass. A Winamp-shaped audio player for your terminal.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/publish.ts CHANGED
@@ -21,7 +21,14 @@ export interface PublishTarget {
21
21
  * gets a 401 in JSON, which is a caller hearing nothing.
22
22
  */
23
23
  audio?: string;
24
- tracks: number;
24
+ /**
25
+ * How many tracks there are, asked at every heartbeat rather than once.
26
+ *
27
+ * Taken as a number, it was read before the library had finished loading --
28
+ * the port opens first now -- so a server with five thousand tracks
29
+ * advertised nought of them for as long as it stayed up.
30
+ */
31
+ tracks: () => number;
25
32
  nowPlaying: () => string;
26
33
  /**
27
34
  * The account this stream belongs to, from `nixamp login`.
@@ -92,7 +99,7 @@ export class Publisher {
92
99
  name: this.target.name,
93
100
  url: this.target.url,
94
101
  ...(this.target.audio ? { audio: this.target.audio } : {}),
95
- tracks: this.target.tracks,
102
+ tracks: this.target.tracks(),
96
103
  nowPlaying: this.target.nowPlaying(),
97
104
  }),
98
105
  });
package/src/server.ts CHANGED
@@ -3394,9 +3394,9 @@ export async function serve(argv: string[], version = "0.1.0"): Promise<void> {
3394
3394
  name: options.name || hostname(),
3395
3395
  url: listen,
3396
3396
  audio,
3397
- // Asked of the engine rather than a variable, because the library is
3398
- // now read after the port opens and may still be arriving.
3399
- tracks: engine.snapshot(false).trackCount,
3397
+ // Asked at every heartbeat rather than once, because the library is
3398
+ // read after the port opens and is still arriving when this is made.
3399
+ tracks: () => engine.snapshot(false).trackCount,
3400
3400
  // From `nixamp login`. The directory will not list a stream it cannot
3401
3401
  // attribute to somebody, because a listing is now a phone code that
3402
3402
  // costs money to answer.
package/web/dist/sw.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* nixamp service worker — generated, do not edit */
2
- const CACHE = "nixamp-1788962802424";
2
+ const CACHE = "nixamp-1788963208633";
3
3
  const PRECACHE = [
4
4
  "/",
5
5
  "/apple-touch-icon.png",