Release 0.9.0
What's Changed
Fixed
url
is no longer quoted inplay_url
New
General
- Python 3.13 support
- Updates for HEOS CLI 1.21
const
module:
MediaType
added to represent media types.RepeatType
added to represent repeat options.AddCriteriaType
added to represent queue add criteria.PlayState
added to represent play state.MUSIC_SOURCE_CONNCECT
for Tidal/Sonos connectINPUT_SOURCE_1
throughINPUT_SOURCE_18
media
module:
- New class
Media
represents a common base-type for music sources and media items. MediaMusicSource
represents a root-level music source, returned fromHeos.get_music_sources
and includes functionbrowse
to enumerate child items.MediaItem
represents non-root sources, and all other media types (containers, playlists, albums, stations, etc...). Functionbrowse
is used to enumerate child items whenbrowsable=True
BrowseResult
represents the result of a browse operation and includes the items returned as well as record count information.
Heos
class:
- New
update_credential
parameter tosign_in
andsign_out
to indicate that the set credential should be updated and used on a reconnect attempt. Defaults toTrue
. current_credentials
property exposes the currently stored credentials, whether passed in through options, or updated as the result of a sign_in or sign_out call.browse
for browsing media item by identifiers.browse_media
for browsing aMediaMusicSource
orMediaItem
.play_media
for playing an instance ofMediaItem
. This function will call the correct underlying function to switch the input, play the stream, or add the item to the queue.play_input_source
to play an specific input source.play_station
to play a stationplay_preset_station
to play a favoriteplay_url
to play a URLadd_to_queue
to add an item to the queuereboot
to reboot the connected device.add_on_controller_event
,add_on_heos_event
,add_on_connected
,add_on_disconnected
,add_on_user_credentials_invalid
for connecting event handlers.
MediaItem
class:
play_media
for playing the current item on a player. This function will call the correct underlying function to switch the input, play the stream, or add the item to the queue.
HeosPlayer
class:
add_to_queue
to add an item to the player queueplay_media
for playing an instance ofMediaItem
. This function will call the correct underlying function to switch the input, play the stream, or add the item to the queue.add_on_player_event
for connecting event handlers
Breaking changes
The following items were changed or removed in the library and may represent a breaking change, depending on usage.
const
module:
SOURCE_CONTROLS
now uses enum values fromconst.MediaType
instead of discrete music source constants.- Removed music source constants:
TYPE_MUSIC_SERVICE
,TYPE_STATION
,TYPE_SONG
,TYPE_HEOS_SERVICE
,TYPE_PLAYLIST
. Useconst.MediaType
instead. - Removed repeat constants:
REPEAT_ON_ALL
,REPEAT_ON_ONE
,REPEAT_OFF
,VALID_REPEAT_MODES
. Useconst.RepeatType
instead. - Removed queue criteria constants:
ADD_QUEUE_PLAY_NOW
,ADD_QUEUE_PLAY_NEXT
,ADD_QUEUE_ADD_TO_END
,ADD_QUEUE_REPLACE_AND_PLAY
, andVALID_ADD_QUEUE_OPTIONS
. Use the new enumAddCriteriaType
. - Removed player state constants:
PLAY_STATE_PLAY
,PLAY_STATE_PAUSE
,PLAY_STATE_STOP
, andVALID_PLAY_STATES
. Use the new enumPlayState
.
Heos
class:
get_music_sources
now returnsdict[int, MediaMusicSource]
get_input_sources
now returnsSequence[MediaItem]
get_favorites
now returnsdict[int, MediaItem]
get_playlists
now returnsSequence[MediaItem]
music_sources
now returnsdict[int, MediaMusicSource]
HeosPlayer
class:
set_play_mode
method parameterrepeat
is now of typeconst.RepeatType
play_input_source
method parameterinput_source
is now of typeMediaItem
add_to_queue
method parametersource
renamed tomedia: MediaItem
repeat
property is now of typeconst.RepeatType
- Renamed
play_input
toplay_input_source
for consistency. - Renamed
play_favorite
toplay_preset_station
for consistency.
source
module:
This entire module has been removed. The functionality has been replaced by the media
module. In most cases, this represents a change to the class only -- property name and functions remain the same from their former counterparts.
- Removed
HeosSource
. Root level music sources are now represented byMediaMusicSource
. All other source and media types are now represented byMediaItem
- Removed
InputSource
. Now represented byMediaItem
.
Detailed changes
- Add ability to update credentials by @andrewsayre in #36
- Add media browsing support by @andrewsayre in #37
- Enhance play media commands by @andrewsayre in #39
- Improve test suite by @andrewsayre in #42
- Refactor player commands by @andrewsayre in #44
- Refactor system commands by @andrewsayre in #46
- Change message encoding to support URLs with ? by @Michcioperz in #47
- Refactor group commands by @andrewsayre in #49
- Allow controls for TIDAL Connect by @klada in #31
- Add Python 3.13 support by @andrewsayre in #50
- Updates for HEOS CLI 1.21 by @andrewsayre in #52
- Feature auth failure eventing by @andrewsayre in #54
- Enhance eventing by @andrewsayre in #56
- Version v0.9.0 by @andrewsayre in #57
New Contributors
- @Michcioperz made their first contribution in #47
- @klada made their first contribution in #31
Full Changelog: 0.8.0...0.9.0