gerdur 2.2.0 → 2.3.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/CHANGELOG.md +17 -0
- package/README.md +39 -10
- package/dist/package.json +2 -2
- package/dist/src/gerdur.js +20 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +17 -1
- package/dist/src/lib/session.d.ts +21 -1
- package/dist/src/lib/session.js +41 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.3.0 - 2026-08-31
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`gerdur-core@^2.2.0`** — the browse / discovery surface is re-exported:
|
|
8
|
+
`getGenres`, `getChart`, `getChartTracks`, `getGenreArtists`,
|
|
9
|
+
`getEditorialList` / `getEditorialReleases` / `getEditorialSelection` /
|
|
10
|
+
`getEditorialCharts`, `getArtistTopTracks`, `getRelatedArtists`,
|
|
11
|
+
`getArtistAlbums`, `getArtistPlaylists`, `getArtistRadioTracks`,
|
|
12
|
+
`getTrackByISRC`, `getAlbumByUPC`, plus their types.
|
|
13
|
+
- **`Session` browse methods**: `genres`, `chart`, `chartTracks`,
|
|
14
|
+
`editorialSections`, `artistTopTracks`, `relatedArtists`, `artistAlbums`,
|
|
15
|
+
`artistRadio`, `trackByISRC`, `albumByUPC`.
|
|
16
|
+
- **CLI `isrc:` / `upc:` prefixes** — `gerdur -u isrc:GBDUW0000059` downloads the
|
|
17
|
+
exact track for an ISRC; `gerdur -u upc:0724384960650` downloads the album for
|
|
18
|
+
a barcode. Both work in `--headless` mode and from the interactive prompt.
|
|
19
|
+
|
|
3
20
|
## 2.2.0 - 2026-08-31
|
|
4
21
|
|
|
5
22
|
### Added
|
package/README.md
CHANGED
|
@@ -147,7 +147,7 @@ All options are optional. You can suppress prompts via providing `quality` and `
|
|
|
147
147
|
|
|
148
148
|
### From the interactive prompt
|
|
149
149
|
|
|
150
|
-
When `gerdur` asks for
|
|
150
|
+
When `gerdur` asks for a URL, a search term, or a prefixed query:
|
|
151
151
|
|
|
152
152
|
| Input | Does |
|
|
153
153
|
| :--- | :--- |
|
|
@@ -156,6 +156,10 @@ When `gerdur` asks for *"a URL, a search term, or `search:<advanced query>`"*:
|
|
|
156
156
|
| `album:discovery` | album search — pick an album |
|
|
157
157
|
| `playlist:deep focus` | playlist search — pick a playlist |
|
|
158
158
|
| `search:artist:"daft punk" bpm_min:120` | advanced track search (see operators below) |
|
|
159
|
+
| `isrc:GBDUW0000059` | download the exact track for an ISRC |
|
|
160
|
+
| `upc:0724384960650` | download the album for a UPC / EAN barcode |
|
|
161
|
+
|
|
162
|
+
`isrc:` and `upc:` also work in `--headless` mode (`-u isrc:…` / `-u upc:…`).
|
|
159
163
|
|
|
160
164
|
### From flags (works headless)
|
|
161
165
|
|
|
@@ -235,10 +239,18 @@ const hits = await session.searchAdvanced(
|
|
|
235
239
|
const suggestions = await session.suggest('daft'); // autocomplete
|
|
236
240
|
```
|
|
237
241
|
|
|
238
|
-
Session methods:
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
+
Session methods:
|
|
243
|
+
|
|
244
|
+
- **resolve / search** — `parseUrl`, `search`, `searchAdvanced`, `suggest`
|
|
245
|
+
- **browse** — `genres`, `chart`, `chartTracks`, `editorialSections`,
|
|
246
|
+
`artistTopTracks`, `relatedArtists`, `artistAlbums`, `artistRadio`,
|
|
247
|
+
`trackByISRC`, `albumByUPC`
|
|
248
|
+
- **user / download** — `getUser`, `getTrackBuffer`, `downloadTrack`,
|
|
249
|
+
`downloadTracks`, `downloadUrl`
|
|
250
|
+
|
|
251
|
+
Every download call is silent; `downloadTracks` / `downloadUrl` accept
|
|
252
|
+
`concurrency` and an `onProgress` callback and return one `{path, written} | null`
|
|
253
|
+
per track.
|
|
242
254
|
|
|
243
255
|
`searchAdvanced(filters, options?)` builds a Deezer advanced-search query from
|
|
244
256
|
`{query?, artist?, album?, track?, label?, durMin?, durMax?, bpmMin?, bpmMax?}`
|
|
@@ -247,6 +259,17 @@ unreliable, so an empty result is retried as a plain free-text query unless
|
|
|
247
259
|
`fallback: false`. It returns public-API track objects — fetch a hit's gw track
|
|
248
260
|
with `getTrackInfo(id)` before downloading it.
|
|
249
261
|
|
|
262
|
+
```ts
|
|
263
|
+
// Browse: this week's electro chart, download the top 5
|
|
264
|
+
const {tracks} = await session.chart(106, 5); // 106 = "Dance" genre
|
|
265
|
+
const full = await Promise.all(tracks.data.map((t) => getTrackInfo(String(t.id))));
|
|
266
|
+
await session.downloadTracks(full, 'flac');
|
|
267
|
+
|
|
268
|
+
// Find & grab an exact recording by barcode
|
|
269
|
+
const t = await session.trackByISRC('GBDUW0000059');
|
|
270
|
+
await session.downloadTrack(await getTrackInfo(String(t.id)), '320');
|
|
271
|
+
```
|
|
272
|
+
|
|
250
273
|
### Low-level: primitives
|
|
251
274
|
|
|
252
275
|
```ts
|
|
@@ -269,11 +292,17 @@ const {path, written} = (await downloadTrackToFile(track, 'flac', {output: '{ART
|
|
|
269
292
|
So you don't need `gerdur-core` as a second dependency (call after `initDeezerApi`
|
|
270
293
|
or `createSession`):
|
|
271
294
|
|
|
272
|
-
`parseInfo`, `
|
|
273
|
-
`
|
|
274
|
-
`
|
|
275
|
-
`
|
|
276
|
-
`
|
|
295
|
+
- **Query** — `parseInfo`, `getUser`, `getTrackInfo`, `getAlbumInfo`,
|
|
296
|
+
`getAlbumTracks`, `getPlaylistInfo`, `getPlaylistTracks`, `getArtistInfo`,
|
|
297
|
+
`getDiscography`, `getLyrics`
|
|
298
|
+
- **Search** — `searchMusic`, `searchPublicApi`, `searchTracks`, `searchAlbums`,
|
|
299
|
+
`searchArtists`, `searchPlaylists`, `buildAdvancedQuery`, `suggest`
|
|
300
|
+
- **Browse** — `getGenres`, `getChart`, `getChartTracks`, `getGenreArtists`,
|
|
301
|
+
`getEditorialList`, `getEditorialReleases`, `getEditorialSelection`,
|
|
302
|
+
`getEditorialCharts`, `getArtistTopTracks`, `getRelatedArtists`,
|
|
303
|
+
`getArtistAlbums`, `getArtistPlaylists`, `getArtistRadioTracks`,
|
|
304
|
+
`getTrackByISRC`, `getAlbumByUPC`
|
|
305
|
+
- **Download** — `getTrackDownloadUrl`, `resolveDownloadUrls`, `GeoBlocked`
|
|
277
306
|
|
|
278
307
|
### Auth & config helpers
|
|
279
308
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gerdur",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "The crucial streaming module for dabox systems.",
|
|
5
5
|
"author": "Christian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"adm-zip": "^0.5.16",
|
|
49
49
|
"chalk": "^4.1.2",
|
|
50
50
|
"commander": "^9.5.0",
|
|
51
|
-
"gerdur-core": "^2.
|
|
51
|
+
"gerdur-core": "^2.2.0",
|
|
52
52
|
"dot-prop": "^6.0.1",
|
|
53
53
|
"got": "^11.8.6",
|
|
54
54
|
"gradient-string": "^2.0.2",
|
package/dist/src/gerdur.js
CHANGED
|
@@ -189,7 +189,7 @@ const startDownload = async (saveLayout, url, skipPrompt) => {
|
|
|
189
189
|
{
|
|
190
190
|
type: 'text',
|
|
191
191
|
name: 'query',
|
|
192
|
-
message: 'Enter a URL, a search term, or `search
|
|
192
|
+
message: 'Enter a URL, a search term, or a `search:` / `isrc:` / `upc:` query:',
|
|
193
193
|
validate: (value) => (value ? true : false),
|
|
194
194
|
},
|
|
195
195
|
], { onCancel });
|
|
@@ -202,6 +202,25 @@ const startDownload = async (saveLayout, url, skipPrompt) => {
|
|
|
202
202
|
throw new Error('No tracks matched that search.');
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
+
// `isrc:` / `upc:` — resolve a barcode to a Deezer track / album (works headless).
|
|
206
|
+
if (!searchData && url && url.startsWith('isrc:')) {
|
|
207
|
+
const code = url.slice('isrc:'.length).trim();
|
|
208
|
+
const found = await (0, gerdur_core_1.getTrackByISRC)(code).catch(() => null);
|
|
209
|
+
if (!found) {
|
|
210
|
+
throw new Error(`No Deezer track for ISRC ${code}`);
|
|
211
|
+
}
|
|
212
|
+
const track = await (0, gerdur_core_1.getTrackInfo)(String(found.id));
|
|
213
|
+
searchData = { info: { type: 'track', id: code }, linktype: 'track', linkinfo: {}, tracks: [stampVersion(track)] };
|
|
214
|
+
}
|
|
215
|
+
if (!searchData && url && url.startsWith('upc:')) {
|
|
216
|
+
const code = url.slice('upc:'.length).trim();
|
|
217
|
+
const found = await (0, gerdur_core_1.getAlbumByUPC)(code).catch(() => null);
|
|
218
|
+
if (!found) {
|
|
219
|
+
throw new Error(`No Deezer album for UPC ${code}`);
|
|
220
|
+
}
|
|
221
|
+
console.log(signale_1.default.info(`UPC ${code} → ${found.title} (${found.nb_tracks} tracks)`));
|
|
222
|
+
url = `https://www.deezer.com/album/${found.id}`;
|
|
223
|
+
}
|
|
205
224
|
if (!searchData && !url.match(urlRegex)) {
|
|
206
225
|
if (options.headless) {
|
|
207
226
|
throw new Error('Please provide a valid URL. Unknown URL: ' + url);
|
package/dist/src/index.d.ts
CHANGED
|
@@ -59,6 +59,6 @@ export type { SessionOptions, DownloadTracksOptions, SearchType } from './lib/se
|
|
|
59
59
|
export { getTrackBuffer, getTaggedTrack, downloadTrackToFile } from './lib/api-download';
|
|
60
60
|
export type { Quality, GetTrackBufferOptions, DownloadTrackOptions, DownloadResult } from './lib/api-download';
|
|
61
61
|
export { default as Config, globalConfigPath, resolveConfigFile } from './lib/config';
|
|
62
|
-
export { initDeezerApi, parseInfo, searchMusic, searchPublicApi, searchTracks, searchAlbums, searchArtists, searchPlaylists, buildAdvancedQuery, suggest, getUser, getTrackInfo, getAlbumInfo, getAlbumTracks, getPlaylistInfo, getPlaylistTracks, getArtistInfo, getDiscography, getLyrics, getTrackDownloadUrl, resolveDownloadUrls, addTrackTags, getRichAlbum, normalizeContributors, toLrc, GeoBlocked, } from 'gerdur-core';
|
|
62
|
+
export { initDeezerApi, parseInfo, searchMusic, searchPublicApi, searchTracks, searchAlbums, searchArtists, searchPlaylists, buildAdvancedQuery, suggest, getGenres, getChart, getChartTracks, getGenreArtists, getEditorialList, getEditorialReleases, getEditorialSelection, getEditorialCharts, getArtistTopTracks, getRelatedArtists, getArtistAlbums, getArtistPlaylists, getArtistRadioTracks, getTrackByISRC, getAlbumByUPC, getUser, getTrackInfo, getAlbumInfo, getAlbumTracks, getPlaylistInfo, getPlaylistTracks, getArtistInfo, getDiscography, getLyrics, getTrackDownloadUrl, resolveDownloadUrls, addTrackTags, getRichAlbum, normalizeContributors, toLrc, GeoBlocked, } from 'gerdur-core';
|
|
63
63
|
export type { AddTrackTagsOptions, TaggedTrack, TrackTagModel, RichAlbum, ResolvedUrl, NormalizedContributors, } from 'gerdur-core';
|
|
64
|
-
export type { advancedSearchFilters, searchOrder, searchEntity, publicApiSearchOptions, publicApiSearchResponse, searchResultTrack, searchResultAlbum, searchResultArtist, searchResultPlaylist, suggestResult, } from 'gerdur-core/types';
|
|
64
|
+
export type { advancedSearchFilters, searchOrder, searchEntity, publicApiSearchOptions, publicApiSearchResponse, searchResultTrack, searchResultAlbum, searchResultArtist, searchResultPlaylist, suggestResult, publicApiList, chartType, chartTrack, chartAlbum, chartArtist, chartPlaylist, chartPodcast, genreType, editorialType, artistAlbumResult, } from 'gerdur-core/types';
|
package/dist/src/index.js
CHANGED
|
@@ -33,7 +33,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
33
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
34
|
};
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.normalizeContributors = exports.getRichAlbum = exports.addTrackTags = exports.resolveDownloadUrls = exports.getTrackDownloadUrl = exports.getLyrics = exports.getDiscography = exports.getArtistInfo = exports.getPlaylistTracks = exports.getPlaylistInfo = exports.getAlbumTracks = exports.getAlbumInfo = exports.getTrackInfo = exports.getUser = exports.getAlbumByUPC = exports.getTrackByISRC = exports.getArtistRadioTracks = exports.getArtistPlaylists = exports.getArtistAlbums = exports.getRelatedArtists = exports.getArtistTopTracks = exports.getEditorialCharts = exports.getEditorialSelection = exports.getEditorialReleases = exports.getEditorialList = exports.getGenreArtists = exports.getChartTracks = exports.getChart = exports.getGenres = exports.suggest = exports.buildAdvancedQuery = exports.searchPlaylists = exports.searchArtists = exports.searchAlbums = exports.searchTracks = exports.searchPublicApi = exports.searchMusic = exports.parseInfo = exports.initDeezerApi = exports.resolveConfigFile = exports.globalConfigPath = exports.Config = exports.downloadTrackToFile = exports.getTaggedTrack = exports.getTrackBuffer = exports.Session = exports.createSession = exports.getArl = exports.LoginError = exports.loginWithEmail = void 0;
|
|
37
|
+
exports.GeoBlocked = exports.toLrc = void 0;
|
|
37
38
|
// ─── Authentication ────────────────────────────────────────────────────────
|
|
38
39
|
const email_login_1 = require("./lib/email-login");
|
|
39
40
|
Object.defineProperty(exports, "loginWithEmail", { enumerable: true, get: function () { return email_login_1.loginWithEmail; } });
|
|
@@ -96,6 +97,21 @@ Object.defineProperty(exports, "searchArtists", { enumerable: true, get: functio
|
|
|
96
97
|
Object.defineProperty(exports, "searchPlaylists", { enumerable: true, get: function () { return gerdur_core_1.searchPlaylists; } });
|
|
97
98
|
Object.defineProperty(exports, "buildAdvancedQuery", { enumerable: true, get: function () { return gerdur_core_1.buildAdvancedQuery; } });
|
|
98
99
|
Object.defineProperty(exports, "suggest", { enumerable: true, get: function () { return gerdur_core_1.suggest; } });
|
|
100
|
+
Object.defineProperty(exports, "getGenres", { enumerable: true, get: function () { return gerdur_core_1.getGenres; } });
|
|
101
|
+
Object.defineProperty(exports, "getChart", { enumerable: true, get: function () { return gerdur_core_1.getChart; } });
|
|
102
|
+
Object.defineProperty(exports, "getChartTracks", { enumerable: true, get: function () { return gerdur_core_1.getChartTracks; } });
|
|
103
|
+
Object.defineProperty(exports, "getGenreArtists", { enumerable: true, get: function () { return gerdur_core_1.getGenreArtists; } });
|
|
104
|
+
Object.defineProperty(exports, "getEditorialList", { enumerable: true, get: function () { return gerdur_core_1.getEditorialList; } });
|
|
105
|
+
Object.defineProperty(exports, "getEditorialReleases", { enumerable: true, get: function () { return gerdur_core_1.getEditorialReleases; } });
|
|
106
|
+
Object.defineProperty(exports, "getEditorialSelection", { enumerable: true, get: function () { return gerdur_core_1.getEditorialSelection; } });
|
|
107
|
+
Object.defineProperty(exports, "getEditorialCharts", { enumerable: true, get: function () { return gerdur_core_1.getEditorialCharts; } });
|
|
108
|
+
Object.defineProperty(exports, "getArtistTopTracks", { enumerable: true, get: function () { return gerdur_core_1.getArtistTopTracks; } });
|
|
109
|
+
Object.defineProperty(exports, "getRelatedArtists", { enumerable: true, get: function () { return gerdur_core_1.getRelatedArtists; } });
|
|
110
|
+
Object.defineProperty(exports, "getArtistAlbums", { enumerable: true, get: function () { return gerdur_core_1.getArtistAlbums; } });
|
|
111
|
+
Object.defineProperty(exports, "getArtistPlaylists", { enumerable: true, get: function () { return gerdur_core_1.getArtistPlaylists; } });
|
|
112
|
+
Object.defineProperty(exports, "getArtistRadioTracks", { enumerable: true, get: function () { return gerdur_core_1.getArtistRadioTracks; } });
|
|
113
|
+
Object.defineProperty(exports, "getTrackByISRC", { enumerable: true, get: function () { return gerdur_core_1.getTrackByISRC; } });
|
|
114
|
+
Object.defineProperty(exports, "getAlbumByUPC", { enumerable: true, get: function () { return gerdur_core_1.getAlbumByUPC; } });
|
|
99
115
|
Object.defineProperty(exports, "getUser", { enumerable: true, get: function () { return gerdur_core_1.getUser; } });
|
|
100
116
|
Object.defineProperty(exports, "getTrackInfo", { enumerable: true, get: function () { return gerdur_core_1.getTrackInfo; } });
|
|
101
117
|
Object.defineProperty(exports, "getAlbumInfo", { enumerable: true, get: function () { return gerdur_core_1.getAlbumInfo; } });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { parseInfo, searchMusic } from 'gerdur-core';
|
|
3
3
|
import type { AdvancedSearchOptions } from './search';
|
|
4
4
|
import type { Quality, DownloadTrackOptions, DownloadResult } from './api-download';
|
|
5
|
-
import type { trackType, userType, advancedSearchFilters, publicApiSearchResponse, searchResultTrack, suggestResult } from 'gerdur-core/types';
|
|
5
|
+
import type { trackType, userType, advancedSearchFilters, publicApiSearchResponse, searchResultTrack, suggestResult, chartType, genreType, editorialType, artistAlbumResult, searchResultArtist, publicApiList, trackTypePublicApi, albumTypePublicApi } from 'gerdur-core/types';
|
|
6
6
|
/** Search result categories accepted by {@link Session.search}. */
|
|
7
7
|
export type SearchType = 'ALBUM' | 'ARTIST' | 'TRACK' | 'PLAYLIST' | 'RADIO' | 'SHOW' | 'USER' | 'LIVESTREAM' | 'CHANNEL';
|
|
8
8
|
export interface SessionOptions {
|
|
@@ -65,6 +65,26 @@ export declare class Session {
|
|
|
65
65
|
searchAdvanced(filters: advancedSearchFilters, options?: AdvancedSearchOptions): Promise<publicApiSearchResponse<searchResultTrack>>;
|
|
66
66
|
/** `deezer.suggest` autocomplete — for "as you type" UIs. `nb` caps items per type. */
|
|
67
67
|
suggest(query: string, nb?: number): Promise<suggestResult>;
|
|
68
|
+
/** Deezer's genre list (`id` `0` = "All"). */
|
|
69
|
+
genres(): Promise<publicApiList<genreType>>;
|
|
70
|
+
/** The five ranked lists for a genre (`0` = all): `{tracks, albums, artists, playlists, podcasts}`. */
|
|
71
|
+
chart(genreId?: number | string, limit?: number): Promise<chartType>;
|
|
72
|
+
/** Just the track chart for a genre — a ready-to-download list. */
|
|
73
|
+
chartTracks(genreId?: number | string, limit?: number, index?: number): Promise<publicApiList<searchResultTrack>>;
|
|
74
|
+
/** Deezer's editorial sections. */
|
|
75
|
+
editorialSections(): Promise<publicApiList<editorialType>>;
|
|
76
|
+
/** An artist's most popular tracks (public-API shape). */
|
|
77
|
+
artistTopTracks(artistId: number | string, limit?: number): Promise<publicApiList<searchResultTrack>>;
|
|
78
|
+
/** Artists Deezer considers related / similar. */
|
|
79
|
+
relatedArtists(artistId: number | string, limit?: number): Promise<publicApiList<searchResultArtist>>;
|
|
80
|
+
/** An artist's discography (public-API album shape). */
|
|
81
|
+
artistAlbums(artistId: number | string, limit?: number, index?: number): Promise<publicApiList<artistAlbumResult>>;
|
|
82
|
+
/** A ready-made radio (track list) seeded from an artist. */
|
|
83
|
+
artistRadio(artistId: number | string): Promise<publicApiList<searchResultTrack>>;
|
|
84
|
+
/** Resolve an ISRC to the public-API track. Pass `.id` to `getTrackInfo` to download. */
|
|
85
|
+
trackByISRC(isrc: string): Promise<trackTypePublicApi>;
|
|
86
|
+
/** Resolve a UPC/EAN barcode to the public-API album (with its `tracks`). */
|
|
87
|
+
albumByUPC(upc: string): Promise<albumTypePublicApi>;
|
|
68
88
|
/** Return a fully tagged audio Buffer for a track (nothing written to disk). */
|
|
69
89
|
getTrackBuffer(track: trackType, quality?: Quality, options?: {}): Promise<Buffer | null>;
|
|
70
90
|
/** Download a single track to disk. */
|
package/dist/src/lib/session.js
CHANGED
|
@@ -75,6 +75,47 @@ class Session {
|
|
|
75
75
|
suggest(query, nb) {
|
|
76
76
|
return (0, gerdur_core_1.suggest)(query, nb);
|
|
77
77
|
}
|
|
78
|
+
// ─── Browse & discovery (public REST) ──────────────────────────────────────
|
|
79
|
+
/** Deezer's genre list (`id` `0` = "All"). */
|
|
80
|
+
genres() {
|
|
81
|
+
return (0, gerdur_core_1.getGenres)();
|
|
82
|
+
}
|
|
83
|
+
/** The five ranked lists for a genre (`0` = all): `{tracks, albums, artists, playlists, podcasts}`. */
|
|
84
|
+
chart(genreId = 0, limit = 10) {
|
|
85
|
+
return (0, gerdur_core_1.getChart)(genreId, limit);
|
|
86
|
+
}
|
|
87
|
+
/** Just the track chart for a genre — a ready-to-download list. */
|
|
88
|
+
chartTracks(genreId = 0, limit = 100, index = 0) {
|
|
89
|
+
return (0, gerdur_core_1.getChartTracks)(genreId, limit, index);
|
|
90
|
+
}
|
|
91
|
+
/** Deezer's editorial sections. */
|
|
92
|
+
editorialSections() {
|
|
93
|
+
return (0, gerdur_core_1.getEditorialList)();
|
|
94
|
+
}
|
|
95
|
+
/** An artist's most popular tracks (public-API shape). */
|
|
96
|
+
artistTopTracks(artistId, limit = 50) {
|
|
97
|
+
return (0, gerdur_core_1.getArtistTopTracks)(artistId, limit);
|
|
98
|
+
}
|
|
99
|
+
/** Artists Deezer considers related / similar. */
|
|
100
|
+
relatedArtists(artistId, limit = 20) {
|
|
101
|
+
return (0, gerdur_core_1.getRelatedArtists)(artistId, limit);
|
|
102
|
+
}
|
|
103
|
+
/** An artist's discography (public-API album shape). */
|
|
104
|
+
artistAlbums(artistId, limit = 50, index = 0) {
|
|
105
|
+
return (0, gerdur_core_1.getArtistAlbums)(artistId, limit, index);
|
|
106
|
+
}
|
|
107
|
+
/** A ready-made radio (track list) seeded from an artist. */
|
|
108
|
+
artistRadio(artistId) {
|
|
109
|
+
return (0, gerdur_core_1.getArtistRadioTracks)(artistId);
|
|
110
|
+
}
|
|
111
|
+
/** Resolve an ISRC to the public-API track. Pass `.id` to `getTrackInfo` to download. */
|
|
112
|
+
trackByISRC(isrc) {
|
|
113
|
+
return (0, gerdur_core_1.getTrackByISRC)(isrc);
|
|
114
|
+
}
|
|
115
|
+
/** Resolve a UPC/EAN barcode to the public-API album (with its `tracks`). */
|
|
116
|
+
albumByUPC(upc) {
|
|
117
|
+
return (0, gerdur_core_1.getAlbumByUPC)(upc);
|
|
118
|
+
}
|
|
78
119
|
/** Return a fully tagged audio Buffer for a track (nothing written to disk). */
|
|
79
120
|
getTrackBuffer(track, quality = '320', options = {}) {
|
|
80
121
|
return (0, api_download_1.getTrackBuffer)(track, quality, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gerdur",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "The crucial streaming module for dabox systems.",
|
|
5
5
|
"author": "Christian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"adm-zip": "^0.5.16",
|
|
49
49
|
"chalk": "^4.1.2",
|
|
50
50
|
"commander": "^9.5.0",
|
|
51
|
-
"gerdur-core": "^2.
|
|
51
|
+
"gerdur-core": "^2.2.0",
|
|
52
52
|
"dot-prop": "^6.0.1",
|
|
53
53
|
"got": "^11.8.6",
|
|
54
54
|
"gradient-string": "^2.0.2",
|