@deadair/plugin-sdk 0.9.0 → 0.11.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.
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ A plugin extends deadair by declaring capabilities:
|
|
|
18
18
|
| `analysis` | measure a track's audio: bytes in, cue points and loudness out |
|
|
19
19
|
| `mixer` | make one piece of audio out of several: parts in, audio out |
|
|
20
20
|
| `charts` | say what is popular: a chart id in, ranked names out |
|
|
21
|
-
| `similarity` | say
|
|
21
|
+
| `similarity` | say what sounds like this: an artist or a record in, names out |
|
|
22
22
|
| `news` | say what happened outside the station: a feed in, entries out |
|
|
23
23
|
| `podcast` | carry somebody else's programme: a show in, episodes out |
|
|
24
24
|
| `search` | ask the open web a question: words in, pages out |
|
|
@@ -686,6 +686,13 @@ ones it implements in `manifest.capabilities`:
|
|
|
686
686
|
size: page internally if your upstream's own ceiling is lower, since a
|
|
687
687
|
short answer is indistinguishable from a genuinely thin search.
|
|
688
688
|
|
|
689
|
+
`listPlaylists` follows the same rule from the other side: never leave a
|
|
690
|
+
playlist out of a page. The host reads a short page as the end of the list,
|
|
691
|
+
so one playlist dropped takes every playlist after it along. Report what you
|
|
692
|
+
know about each one instead (`permissions` for what the source will let the
|
|
693
|
+
account do, `madeByProvider` for a playlist the service made itself, such as
|
|
694
|
+
an editorial list or Discover Weekly) and the host decides what to show.
|
|
695
|
+
|
|
689
696
|
- **`stream`** — `resolveStreamUrl`: hand back a complete URL the audio consumer
|
|
690
697
|
can fetch directly, carrying its own authentication, because it is fetched
|
|
691
698
|
with no headers from us. A provider that cannot answer it plays its own audio
|
|
@@ -126,6 +126,19 @@ export interface ProviderPlaylist {
|
|
|
126
126
|
* API changes only the owned half can be read at all.
|
|
127
127
|
*/
|
|
128
128
|
permissions?: ProviderPlaylistPermission[];
|
|
129
|
+
/**
|
|
130
|
+
* Whether the SERVICE made this playlist itself rather than a person: an
|
|
131
|
+
* editorial list, or one generated for the account like Discover Weekly or a
|
|
132
|
+
* Daily Mix. A console folds these away so a listing full of what the
|
|
133
|
+
* service pushes at the account does not bury what the operator chose.
|
|
134
|
+
*
|
|
135
|
+
* `true` or absent, never `false`: absent means the provider did not say,
|
|
136
|
+
* and most have no such concept. It is a fact about the playlist and never a
|
|
137
|
+
* reason to leave it out of `listPlaylists`, because the host reads a short
|
|
138
|
+
* page as the end of the list and a playlist dropped from one takes every
|
|
139
|
+
* playlist after it with it. Report it and let the host decide.
|
|
140
|
+
*/
|
|
141
|
+
madeByProvider?: boolean;
|
|
129
142
|
}
|
|
130
143
|
/** A playable stream, plus how long the URL stays good for. */
|
|
131
144
|
export interface ProviderStream {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"music.provider.d.ts","sourceRoot":"","sources":["../../src/capabilities/music.provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,4FAA4F;AAC5F,MAAM,WAAW,aAAa;IAC1B,sDAAsD;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,0BAA0B;AAClC,oDAAoD;AAClD,MAAM;AACR,8DAA8D;GAC5D,MAAM,CAAC;AAEb,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CAAC,EAAE,0BAA0B,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"music.provider.d.ts","sourceRoot":"","sources":["../../src/capabilities/music.provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,4FAA4F;AAC5F,MAAM,WAAW,aAAa;IAC1B,sDAAsD;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,0BAA0B;AAClC,oDAAoD;AAClD,MAAM;AACR,8DAA8D;GAC5D,MAAM,CAAC;AAEb,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CA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
2
2
|
/**
|
|
3
3
|
* The `similarity` kind. A similarity plugin answers "who else sounds like this",
|
|
4
4
|
* and optionally "what should I play by them".
|
|
@@ -97,5 +97,19 @@ export interface SimilarityProvider {
|
|
|
97
97
|
* is its own id coming back.
|
|
98
98
|
*/
|
|
99
99
|
artistTopTracks?(ref: ArtistRef, limit: number): Promise<ArtistTrack[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Records that sound like this one record, best first.
|
|
102
|
+
*
|
|
103
|
+
* Optional, and a finer question than {@link similarArtists}: that one answers who sounds
|
|
104
|
+
* like an ARTIST, and a record chosen from the answer is only as close as the artist's best
|
|
105
|
+
* known track happens to be. This answers from the record itself, which is what the host wants
|
|
106
|
+
* when it is putting something straight after a record a listener has just heard.
|
|
107
|
+
*
|
|
108
|
+
* `ref` is the enrichment capability's {@link TrackRef}; a source that matches on a
|
|
109
|
+
* MusicBrainz recording id should prefer `mbid` when it is there. Every record answered must
|
|
110
|
+
* carry its own LEAD artist, which is usually not the one asked about. An empty array is an
|
|
111
|
+
* ordinary answer, and the host falls back to the artist-level walk when it gets one.
|
|
112
|
+
*/
|
|
113
|
+
similarTracks?(ref: TrackRef, limit: number): Promise<ArtistTrack[]>;
|
|
100
114
|
}
|
|
101
115
|
//# sourceMappingURL=similarity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"similarity.d.ts","sourceRoot":"","sources":["../../src/capabilities/similarity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"similarity.d.ts","sourceRoot":"","sources":["../../src/capabilities/similarity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mGAAmG;IACnG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;;;;;;OASG;IACH,cAAc,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IAExE;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAExE;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CACxE"}
|
package/package.json
CHANGED