@kud/qobuz-cli 0.4.0 → 0.5.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/dist/index.js +8 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -48,15 +48,17 @@ var formatDuration = (seconds) => {
48
48
  const remainder = String(seconds % 60).padStart(2, "0");
49
49
  return `${minutes}:${remainder}`;
50
50
  };
51
- var deepLinkFor = (client, type, id) => {
51
+ var linkFor = (links, type, id) => {
52
52
  const builders = {
53
- album: (value) => client.deepLink.album(value),
54
- track: (value) => client.deepLink.track(Number(value)),
55
- playlist: (value) => client.deepLink.playlist(Number(value)),
56
- artist: (value) => client.deepLink.artist(Number(value))
53
+ album: (value) => links.album(value),
54
+ track: (value) => links.track(Number(value)),
55
+ playlist: (value) => links.playlist(Number(value)),
56
+ artist: (value) => links.artist(Number(value))
57
57
  };
58
58
  return builders[type]?.(id);
59
59
  };
60
+ var deepLinkFor = (client, type, id) => linkFor(client.deepLink, type, id);
61
+ var appLinkFor = (client, type, id) => linkFor(client.appLink, type, id);
60
62
 
61
63
  // src/ui.ts
62
64
  var ESC2 = String.fromCharCode(27);
@@ -366,7 +368,7 @@ var open = defineCommand6({
366
368
  },
367
369
  run: async ({ args: args2 }) => {
368
370
  const client = await connect();
369
- const link2 = deepLinkFor(client, args2.type, args2.id);
371
+ const link2 = appLinkFor(client, args2.type, args2.id);
370
372
  if (!link2) {
371
373
  console.error("type must be one of: album, track, playlist, artist");
372
374
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/qobuz-cli",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Command-line interface for Qobuz — search, library, and quick-open in the app",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "node": ">=20"
26
26
  },
27
27
  "dependencies": {
28
- "@kud/qobuz": "0.4.0",
28
+ "@kud/qobuz": "0.5.0",
29
29
  "citty": "0.2.2"
30
30
  },
31
31
  "devDependencies": {