deep-roon-mcp 0.5.5 → 0.5.6

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.
@@ -15457,7 +15457,7 @@ var require_lib2 = __commonJS({
15457
15457
  var version2;
15458
15458
  var init_package = __esm({
15459
15459
  "package.json"() {
15460
- version2 = "0.5.5";
15460
+ version2 = "0.5.6";
15461
15461
  }
15462
15462
  });
15463
15463
 
@@ -16649,6 +16649,8 @@ async function focusMembers(c, f, people = ["artist", "composer", "producer"]) {
16649
16649
  m.push({ name: "RequireRatings", propType: 23, value: intList(Array.from({ length: 11 - min }, (_, i) => min + i)) });
16650
16650
  }
16651
16651
  if (f.favorites) m.push(yes("RequireIsFavorite"));
16652
+ if (f.hidden) m.push(yes("IncludeHidden"));
16653
+ if (f.hidden === "only") m.push(yes("RequireHidden"));
16652
16654
  if (f.text) m.push(text("TextFilter", f.text));
16653
16655
  if (f.genre) m.push({ name: "RequireGenres", propType: 23, value: textList(names(f.genre)) });
16654
16656
  if (f.label) m.push({ name: "RequireLabels", propType: 23, value: textList(names(f.label)) });
@@ -49731,8 +49733,8 @@ function playParams(c, p, shuffle = false) {
49731
49733
  return c.structArg("Sooloos.Broker.Api.PlayParameters", members2);
49732
49734
  }
49733
49735
  __name(playParams, "playParams");
49734
- function playAlbum(c, zone3, album2, p, shuffle) {
49735
- const args = Buffer.concat([buildArgs([Arg.ref(zone3), Arg.sooid(c.profile())]), playParams(c, p, shuffle), buildArgs([Arg.ref(album2), Arg.bool(false), Arg.bool(false)])]);
49736
+ function playAlbum(c, zone3, album2, p, shuffle, includeHidden = false) {
49737
+ const args = Buffer.concat([buildArgs([Arg.ref(zone3), Arg.sooid(c.profile())]), playParams(c, p, shuffle), buildArgs([Arg.ref(album2), Arg.bool(false), Arg.bool(includeHidden)])]);
49736
49738
  return c.call(
49737
49739
  "Transport",
49738
49740
  "PlayAlbum",
@@ -49782,12 +49784,12 @@ async function started2(zoneName, p) {
49782
49784
  return { started: false, state };
49783
49785
  }
49784
49786
  __name(started2, "started");
49785
- async function play(key, zoneName, how, shuffle) {
49787
+ async function play(key, zoneName, how, shuffle, includeHidden = false) {
49786
49788
  const p = PRIORITY[how];
49787
49789
  const r = await withCore(async (c) => {
49788
49790
  const z2 = findZone(c, zoneName);
49789
49791
  const album2 = await findAlbum(c, key);
49790
- const res = await playAlbum(c, z2.oid, album2.oid, p, shuffle);
49792
+ const res = await playAlbum(c, z2.oid, album2.oid, p, shuffle, includeHidden);
49791
49793
  log(`play (${how}${shuffle ? ", shuffled" : ""}): ${field2(album2, "Title")} on ${z2.name} \u2192 ${res.success ? "ok" : res.status}`);
49792
49794
  if (!res.success) throw new RoonError(`Roon refused to play it (${res.status})`);
49793
49795
  return { zone: z2.name, how, shuffle: shuffle || void 0, title: field2(album2, "Title"), artist: clean(field2(album2, "PerformedBy")) };
@@ -50132,19 +50134,27 @@ async function cover(zoneName) {
50132
50134
  const tr = obj(c, field2(items(c, field2(obj(c, field2(z2, "NowPlaying")), "Tracks"))[0], "Track"));
50133
50135
  const al = obj(c, field2(tr, "Album"));
50134
50136
  const url2 = String(field2(obj(c, field2(al, "Image")), "Url") ?? field2(obj(c, field2(tr, "Image")), "Url") ?? "");
50135
- const key2 = /^broker:\/\/\/image\/([^.]+)\./.exec(url2)?.[1];
50136
- return { key: key2, title: field2(tr, "Title"), album: field2(al, "Title"), artist: clean(field2(al, "PerformedBy")), zone: pick2?.name };
50137
- });
50138
- const off = zoneName ? officialZone(zoneName) : void 0;
50139
- const key = info.key ?? off?.now_playing?.image_key;
50137
+ const key = /^broker:\/\/\/image\/([^.]+)\./.exec(url2)?.[1];
50138
+ return { key, title: field2(tr, "Title"), album: field2(al, "Title"), artist: clean(field2(al, "PerformedBy")), zone: pick2?.name ?? zoneNames(c).get(String(z2.oid)) };
50139
+ });
50140
+ const off = info.zone ? officialZone(info.zone) : void 0;
50141
+ const urls = [
50142
+ off?.now_playing?.image_key && `/api/image/${off.now_playing.image_key}?scale=fit&width=600&height=600`,
50143
+ info.key && `/image/${info.key}.jpg?scale=fit&width=600&height=600`
50144
+ ].filter(Boolean);
50140
50145
  const lines = off?.now_playing?.three_line;
50141
50146
  if (!info.title && lines?.line1) {
50142
50147
  info.title = lines.line1;
50143
50148
  info.artist = lines.line2 ?? "";
50144
50149
  info.album = lines.line3;
50145
50150
  }
50146
- if (!key) throw new RoonError("Roon has no cover for what plays", "not_found");
50147
- const r = await fetch(`http://${t.host}:${t.port}/api/image/${key}?scale=fit&width=600&height=600`).catch(() => null);
50151
+ if (!urls.length) throw new RoonError("Roon has no cover for what plays", "not_found");
50152
+ let r = null;
50153
+ for (const u of urls) {
50154
+ r = await fetch(`http://${t.host}:${t.port}${u}`).catch(() => null);
50155
+ if (r?.ok) break;
50156
+ log(`cover: ${u.split("?")[0]} \u2192 ${r ? r.status : "no answer"}`);
50157
+ }
50148
50158
  if (!r?.ok) throw new RoonError("Roon doesn't hand over the cover right now", "unavailable");
50149
50159
  return {
50150
50160
  info: { zone: info.zone, title: info.title, album: info.album, artist: info.artist },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deep-roon-mcp",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "An MCP server for Roon that reaches the parts the official API doesn't: reviews, biographies, Qobuz's and TIDAL's shelves, TIDAL's playlists, your history, search across your library and the streaming services",
5
5
  "license": "Apache-2.0",
6
6
  "author": "René Bouwmeester <21277119+renebouwmeester@users.noreply.github.com>",