Skip to main content

Status

Struct Status 

Source
pub struct Status {
Show 38 fields pub etag: String, pub volume: i64, pub volume_decibel: f64, pub mute: u8, pub muted_volume: Option<i64>, pub muted_decibel: Option<i64>, pub name: Option<String>, pub album: Option<String>, pub artist: Option<String>, pub total_length: Option<i64>, pub seconds_played: Option<i64>, pub repeat: u8, pub shuffle: u8, pub song_queue_position: i64, pub quality: Option<Quality>, pub filename: Option<String>, pub image: Option<String>, pub title1: Option<String>, pub title2: Option<String>, pub title3: Option<String>, pub twoline_title1: Option<String>, pub twoline_title2: Option<String>, pub current_image: Option<String>, pub group_name: Option<String>, pub group_volume: Option<String>, pub actions: Option<Actions>, pub can_seek: Option<u8>, pub can_move_playback: Option<bool>, pub mode: i64, pub pid: i64, pub prid: u8, pub sid: i64, pub state: String, pub stream_url: Option<String>, pub sync_stat: i64, pub cursor: Option<i64>, pub indexing: i64, pub mid: i64, /* private fields */
}

Fields§

§etag: String§volume: i64

The player volume level in percentage -1 means player volume fixed.

§volume_decibel: f64

Volume in decibel

§mute: u8

Mute state. Set to 1 if volume is muted

§muted_volume: Option<i64>

If the player is muted, then this contains the unmuted volume level. Values are from 0 to 100.

§muted_decibel: Option<i64>

If the player is muted, then this contains the unmuted volume in dB.

§name: Option<String>

The title of the current playing audio track. Also see title1 attribute.

§album: Option<String>

Album name of the current active track. Also see title1 attribute.

§artist: Option<String>

Artist name of the current active track. Also see title1 attribute.

§total_length: Option<i64>

Total length of the current track, in seconds

§seconds_played: Option<i64>

The number of seconds the current audio track has been played

§repeat: u8

0, 1, or 2. 0 means repeat play queue, 1 means repeat a track, and 2 means repeat off

§shuffle: u8

0 or 1. 0 means shuffle off and 1 means shuffle on

§song_queue_position: i64

The position of the current track in the play queue. Also see streamUrl.

§quality: Option<Quality>

Quality of the playing source audio:

• cd - losless audio at CD quality • hd – lossless audio with higher resolution that CD quality or samplerate of 88200 samples/s or more • dolbyAudio – DolbyDigital or AC3 • mqa – valid MQA audio decoded • mqaAuthored - valid MQA-Authored audio decoded A numeric value is the approximate bitrate of a compressed audio source quality of the file.

§filename: Option<String>§image: Option<String>

URL of image associated with the current audio (album, station, input, etc.)

§title1: Option<String>

The first line of information describing the current audio. title1, title2 and title3 MUST be used as the text of any UI that displays three lines of now-playing

§title2: Option<String>

The second line of information describing the current audio.

§title3: Option<String>

The third line of information describing the current audio.

§twoline_title1: Option<String>

The first of two lines describing the current audio. twoline_title1 & twoline_title2, if present, MUST be used as the text of any UI that displays two lines of now-playing metadata.

§twoline_title2: Option<String>

The second of two lines describing the current audio.

§current_image: Option<String>

What the player displays currently?

§group_name: Option<String>

Name of the group. The player must be the primary player in the group.

§group_volume: Option<String>

Volume level of the group. The player must be the primary player in the group

§actions: Option<Actions>§can_seek: Option<u8>§can_move_playback: Option<bool>§mode: i64§pid: i64

The unique play queue id. It matches the id attribute of the /Playlist response. If the play queue is changed this number will change

§prid: u8

The unique preset id. It matches the prid attribute in the /Presets response. If a preset is changed this number will change indicating that any cached response to /Presets should be purged.

§sid: i64§state: String

The current player state. It could be play, pause, stop, stream, connecting, etc. /Play can be used to resume when in a pause state but not when in stop state

§stream_url: Option<String>§sync_stat: i64§cursor: Option<i64>§indexing: i64

Most likely inidicating if the player is currently indexing

§mid: i64

Trait Implementations§

Source§

impl Debug for Status

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Status

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Status

Source§

fn eq(&self, other: &Status) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Status

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Status

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more