From 801bb22f63fb9aec9d97ae70f9a940c61f0a4e7e Mon Sep 17 00:00:00 2001 From: Markus Zehnder Date: Mon, 30 Mar 2026 15:00:11 +0200 Subject: [PATCH 1/3] feat: add media-player stable_id_support option Bit-field indicating if the `browse` and `search` commands support stable media IDs: - Bit 0: `browse` always returns stable ids. - Bit 1: `browse` supports stable ids with the `stable_ids` parameter. - Bit 2: `search` always returns stable ids. - Bit 3: `search` returns stable ids with the `stable_ids` parameter. Default if not provided: `browse` and `search` always return stable IDs (Bit 0 | Bit 2) --- CHANGELOG.md | 4 ++++ lib/entities/media_player.ts | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d296115..727878b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 _Changes in the next release_ +### Added + +- media-player stable_id_support option. + ### Changed - Update entity documentation ([#61](https://github.com/unfoldedcircle/integration-node-library/pull/61)). diff --git a/lib/entities/media_player.ts b/lib/entities/media_player.ts index 63f37b2..0a009f1 100644 --- a/lib/entities/media_player.ts +++ b/lib/entities/media_player.ts @@ -336,7 +336,18 @@ export enum MediaPlayerOptions { /** Additional commands the media-player supports, which are not covered in the feature list. */ SimpleCommands = "simple_commands", /** Number of available volume steps for the set volume command and UI controls. */ - VolumeSteps = "volume_steps" + VolumeSteps = "volume_steps", + /** + * Bit-field indicating if the `browse` and `search` commands support stable media IDs: + * + * - Bit 0: `browse` always returns stable ids. + * - Bit 1: `browse` supports stable ids with the `stable_ids` parameter. + * - Bit 2: `search` always returns stable ids. + * - Bit 3: `search` returns stable ids with the `stable_ids` parameter. + * + * Default if not provided: `browse` and `search` always return stable IDs (Bit 0 | Bit 2) + */ + StableIdSupport = "stable_id_support" } /** From 6e3d6a375fe744ab03495e9588595e7e0bbe234e Mon Sep 17 00:00:00 2001 From: Markus Zehnder Date: Mon, 30 Mar 2026 16:38:17 +0200 Subject: [PATCH 2/3] fixup! feat: add media-player stable_id_support option --- lib/entities/media_player.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/entities/media_player.ts b/lib/entities/media_player.ts index 0a009f1..1d655c4 100644 --- a/lib/entities/media_player.ts +++ b/lib/entities/media_player.ts @@ -350,6 +350,17 @@ export enum MediaPlayerOptions { StableIdSupport = "stable_id_support" } +/** + * Bit-field indicating if the `browse` and `search` commands support stable media IDs. + */ +export const StableIdSupport = { + BrowseAlwaysStableIds: 1 << 0, + BrowseSupportsStableIdsParam: 1 << 1, + SearchAlwaysStableIds: 1 << 2, + SearchSupportsStableIdsParam: 1 << 3 +} as const; + +export type StableIdSupportMask = number; /** * Pre-defined media content types. * From d9014bd34dc051d62094e035413e8428d87dff35 Mon Sep 17 00:00:00 2001 From: Markus Zehnder Date: Mon, 30 Mar 2026 16:44:18 +0200 Subject: [PATCH 3/3] fixup! feat: add media-player stable_id_support option --- lib/entities/media_player.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/entities/media_player.ts b/lib/entities/media_player.ts index 1d655c4..0e69835 100644 --- a/lib/entities/media_player.ts +++ b/lib/entities/media_player.ts @@ -360,7 +360,6 @@ export const StableIdSupport = { SearchSupportsStableIdsParam: 1 << 3 } as const; -export type StableIdSupportMask = number; /** * Pre-defined media content types. *