@@ -283,12 +283,13 @@ This allows better integration into Remote Two, like default UI mappings and gro
283283Media browsing uses a dedicated command and is not part of the standard media-player entity commands.
284284
285285
286- | cmd_id | Parameters | Description |
287- | :-------------| :-----------| :--------------------------------------------------|
288- | browse_media | entity_id | Browse media from a media-player entity. |
289- | | media_id | Optional media content ID to restrict browsing. |
290- | | media_type | Optional media content type to restrict browsing. |
291- | | paging | Optional paging object to limit returned items. |
286+ | cmd_id | Parameters | Description |
287+ | :-------------| :-----------| :-----------------------------------------------------------------|
288+ | browse_media | entity_id | Browse media from a media-player entity. |
289+ | | media_id | Optional media content ID to restrict browsing. |
290+ | | media_type | Optional media content type to restrict browsing. |
291+ | | stable_ids | Optional hint that the client requires stable media identifiers. |
292+ | | paging | Optional paging object to limit returned items. |
292293
293294The ` media_id ` and ` media_type ` parameters are optional and can be used to restrict browsing to a specific media item
294295or content type. Both fields can be returned in the browse response on the root item and on every child item to describe
@@ -300,6 +301,15 @@ within that entity. This ensures that it can be reused in subsequent `play_media
300301calls. Integrations may use either one of the pre-defined semantic content types (see [ Media Content Types] ( #media-content-types ) )
301302or provider-specific URIs for ` media_type ` , as long as values are stable and reused consistently.
302303
304+ Certain media providers may not support stable identifiers, but the integration might be able to use a workaround
305+ generating stable identifiers on the client side. The ` stable_ids ` parameter is a hint that the client really requires
306+ stable media identifiers in the returned ` media_id ` and ` media_type ` fields, because the identifier won't be used right
307+ now to play a media item but sometime in the future.
308+ Roon is such an example, which generates new media keys for every new browse or search request. Use cases like
309+ "select an identifier of my favorite playlist, so I can still play it next month" aren't possible with changing
310+ identifiers. As a workaround, the integration driver can return a path structure (` Library/Playlists/Favorite Songs ` )
311+ or another sort of identifier that can be used to identify or resolve the item in the future.
312+
303313** Important:** When using ` media_id ` and ` media_type ` values in further calls, they must match the values returned in
304314the previous ` media_browse ` response exactly. If an integration returns an empty string (` "" ` ) as value, that exact
305315empty string will be sent back on later calls and does not mean "no value."
@@ -506,16 +516,17 @@ Media searching uses a dedicated command and is not part of the standard media-p
506516Note: The filter object is not yet formally defined in the Integration-API. The fields below are examples of possible
507517filters and are not required.
508518
509- | cmd_id | Parameters | Description |
510- | --------------| ----------------------| --------------------------------------------------------|
511- | search_media | entity_id | Search for media items in a media-player entity. |
512- | | query | Free-text search query. |
513- | | media_id | Optional media content ID to limit the search scope. |
514- | | media_type | Optional media content type to limit the search scope. |
515- | | filter.media_classes | Optional list of media classes to filter the results. |
516- | | filter.artist | 🚧 TBD if a set of well-known filters like ` artist ` |
517- | | filter.album | 🚧 and ` album ` , or dynamic |
518- | | paging | Optional paging object to limit returned items. |
519+ | cmd_id | Parameters | Description |
520+ | --------------| ----------------------| ------------------------------------------------------------------|
521+ | search_media | entity_id | Search for media items in a media-player entity. |
522+ | | query | Free-text search query. |
523+ | | media_id | Optional media content ID to limit the search scope. |
524+ | | media_type | Optional media content type to limit the search scope. |
525+ | | stable_ids | Optional hint that the client requires stable media identifiers. |
526+ | | filter.media_classes | Optional list of media classes to filter the results. |
527+ | | filter.artist | 🚧 TBD if a set of well-known filters like ` artist ` |
528+ | | filter.album | 🚧 and ` album ` , or dynamic |
529+ | | paging | Optional paging object to limit returned items. |
519530
520531The ` media_id ` and ` media_type ` parameters behave the same as in ` browse_media ` : they can be used to restrict the
521532search to a specific container or content type, and integrations should propagate and reuse the values consistently.
@@ -525,6 +536,7 @@ Empty strings must be preserved and echoed back as-is. Only omit a field if it w
525536- The optional ` filter.media_classes ` filter may only contain media classes that are supported by the integration.
526537 - Supported media classes must be specified in the ` search_media_classes ` attribute by the integration.
527538 - Only well-known [ Media Classes] ( #media-classes ) should be used without any custom media classes.
539+ - See [ Media Browsing] ( #media-browsing ) for a description of the ` stable_ids ` parameter.
528540- 🚧 The ` filter.artist ` and ` filter.album ` fields are examples of possible future filters and are not yet formally defined.
529541- The optional ` paging ` object can be used to retrieve a specific page of media items and to limit result size.
530542
0 commit comments