bosesoundtouchapi.models.nowplayingstatus

@export
class NowPlayingStatus:

SoundTouch device Now Playing Status configuration object.

This class contains the attributes and sub-items that represent the status of currently playing media of the device.

Some items are not relevant for certain types of media. For example, the ConnectionStatus property applies only to BLUETOOTH sources.

NowPlayingStatus( source: str = None, sourceAccount: str = None, album: str = None, artist: str = None, artistId: str = None, artUrl: str = None, description: str = None, duration: int = None, genre: str = None, playStatus: str = None, position: int = None, sessionId: str = None, stationLocation: str = None, stationName: str = None, track: str = None, trackId: str = None, root: xml.etree.ElementTree.Element = None)

Initializes a new instance of the class.

Arguments:
  • source (SoundTouchSources|str): Source input.
  • sourceAccount (str): Source account this content item is played with.
  • album (str): The album of the playing track (if present).
  • artist (str): The creator of the track (if present).
  • artistId (str): Unique identifier of the artist, as provided by the source music service (if present).
  • artUrl (str): A url link to the art image of the station (if present).
  • description (str): A brief description that was added to the track (if present).
  • duration (int): The track's duration (if present).
  • genre (str): The genre of the track (if present).
  • playStatus (str): Indicates whether the device is currently playing the embedded track.
  • position (int): The current position of the playing media (if present).
  • sessionId (str): Unique identifier of the session, as provided by the source music service (if present).
  • stationLocation (str): The station's location.
  • stationName (str): The station's name (if present).
  • track (str): The current media track name (if present).
  • trackId (str): Unique identifier of the track, as provided by the source music service (if present).
  • root (Element): xmltree Element item to load arguments from.
    If specified, then other passed arguments are ignored.
Album: str

The album of the playing track (if present).

ArtImageStatus: str

Contains "IMAGE_PRESENT" value if an art image url is present.

ArtUrl: str

A url link to the art image of the station (if present).

Note that this art image could be different from the ContentItem.ContainerArt image.

Artist: str

The creator of the track (if present).

ArtistId: str

Unique identifier of the artist, as provided by the source music service (if present).

ConnectionDeviceName: str

The staus of the bluetooth connection (if present).

This value only seems to be present for the "BLUETOOTH" source.

ConnectionStatus: str

The staus of the bluetooth connection (if present).

This value only seems to be present for the "BLUETOOTH" source.

ContainerArtUrl: str

A url link to the art image of the station or track that is playing. The following logic is implemented to return an image url:

  • the ArtUrl value is returned if present;
  • the ContentItem.ContainerArt url is returned if present;
  • if neither of the above, then null is returned.

This is a helper property, and not part of the SoundTouch Web Services specification.

ContentItem: <property object at 0x0000026FC3940450>

The selected ContentItem.

Description: str

A brief description that was added to the track (if present).

DeviceId: str

Device identifier the configuration information was obtained from.

Duration: int

The track's duration (if present).

Genre: str

The genre of the track (if present).

IsAdvertisement: bool

True if the currently playing track is an advertisement; otherwise, False.

Note that not all sources track advertisements.

  • TuneIn source does not track advertisements;
  • Pandora music service source tracks advertisements.
IsFavorite: bool

True if the track has been marked as a favorite; otherwise, False.

Note that not all sources track favorites.

IsFavoriteEnabled: bool

True if the track can be saved as a favorite; otherwise, False.

IsPlaying: bool

Returns true if the current PlayStatus is "PLAY_STATE", which indicates the content is fully playing (e.g. not buffered, etc); otherwise, False.

IsRatingEnabled: bool

True if track rating is enabled; otherwise, False.

If true, then the SoundTouchClient.ThumbsUp and

IsRepeatEnabled: bool

True if repeat play (one or all) is enabled; otherwise, False.

The RepeatSetting property contains the actual repeat setting.

IsSeekSupported: bool

True if the currently playing media supports seek functions; otherwise, False (if present).

IsShuffleEnabled: bool

True if shuffle play is enabled; otherwise, False.

IsSkipEnabled: bool

True if the currently playing media supports skip functions; otherwise, False (if present).

IsSkipPreviousEnabled: bool

True if the currently playing media skip previous functions are enabled; otherwise, False (if present).

IsSkipPreviousSupported: bool

True if the currently playing media supports skip previous functions; otherwise, False (if present).

PlayStatus: str

Indicates the current play status of the item (e.g. "PLAY_STATE", "BUFFERING_STATE", etc.)

Position: int

The current position of the playing media (if present).

Rating: str

Rating value (e.g. "NONE", "DOWN", "UP", etc).

RepeatSetting: str

Repeat setting value (e.g. "REPEAT_ALL", "REPEAT_ONE", "REPEAT_OFF", etc).

If null, then repeat functions are not enabled for the playing media.

SessionId: str

Unique identifier of the session, as provided by the source music service (if present).

ShuffleSetting: str

Shuffle setting value (e.g. "SHUFFLE_ON", "SHUFFLE_OFF", etc).

If null, then shuffle functions are not enabled for the playing media.

Source: str

The media source. This should be one of the sources defined in bosesoundtouchapi.soundtouchsources.SoundTouchSources.

SourceAccount: str

The account associated with the Source.

StationLocation: str

The station's location.

StationName: str

The station's name (if present).

StreamType: str

The stream type of the current track (e.g. "RADIO_STREAMING", "TRACK_ONDEMAND" when playing from an external resource, etc).

Track: str

The current media track name (if present).

TrackId: str

Unique identifier of the track, as provided by the source music service (if present).

def ToString(self) -> str:

Returns a displayable string representation of the class.