Enum mpris_server::TrackListSignal
source · pub enum TrackListSignal {
TrackListReplaced {
tracks: Vec<TrackId>,
current_track: TrackId,
},
TrackAdded {
metadata: Metadata,
after_track: TrackId,
},
TrackRemoved {
track_id: TrackId,
},
TrackMetadataChanged {
track_id: TrackId,
metadata: Metadata,
},
}
Expand description
Used for emitting signals on Server::track_list_emit
and
LocalServer::track_list_emit
, if T
implements TrackListInterface
or LocalTrackListInterface
.
Variants§
TrackListReplaced
Indicates that the entire tracklist has been replaced.
It is left up to the implementation to decide when a change to the track
list is invasive enough that this signal should be emitted instead of a
series of TrackAdded
and TrackRemoved
signals.
Fields
current_track: TrackId
The identifier of the track to be considered as current.
/org/mpris/MediaPlayer2/TrackList/NoTrack
indicates that there
is no current track.
This should correspond to the mpris:trackid
field of the
Metadata
property of the Player interface
.
TrackAdded
Indicates that a track has been added to the track list.
Fields
metadata: Metadata
The metadata of the newly added item.
This must include a mpris:trackid
entry.
after_track: TrackId
The identifier of the track after which the new track was inserted.
The path /org/mpris/MediaPlayer2/TrackList/NoTrack
indicates
that the track was inserted at the start of the track list.
TrackRemoved
Indicates that a track has been removed from the track list.
Fields
track_id: TrackId
The identifier of the track being removed.
/org/mpris/MediaPlayer2/TrackList/NoTrack
is not a valid value
for this argument.
TrackMetadataChanged
Indicates that the metadata of a track in the tracklist has changed.
This may indicate that a track has been replaced, in which case the
mpris:trackid
metadata entry is different from the track_id
argument.
Fields
track_id: TrackId
The id of the track which metadata has changed.
If the track id has changed, this will be the old value.
/org/mpris/MediaPlayer2/TrackList/NoTrack
is not a valid value
for this argument.
metadata: Metadata
The new track metadata.
This must include a mpris:trackid
entry. If the track id has
changed, this will be the new value.