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 +8 -1
- package/dist/publish.js +1 -1
- package/dist/server.js +3 -3
- package/package.json +1 -1
- package/src/publish.ts +9 -2
- package/src/server.ts +3 -3
- package/web/dist/sw.js +1 -1
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
|
-
|
|
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
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
|
|
2941
|
-
//
|
|
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
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
|
-
|
|
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
|
|
3398
|
-
//
|
|
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