Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartServer ¶
func StartServer(m *ui.SafeModel, dbusMessageChan *chan types.DBusMessage)
Types ¶
type AddTrackToQueue ¶
type AddTrackToQueue struct {
Track types.PlaylistTrackObject `json:"track"`
Index int `json:"index"`
}
type PlayRequestBodyType ¶
type PlayRequestBodyType struct {
TrackID string `json:"trackID"`
//this is a flag that whether the user skips the track or not
// b/c during cache mode if the skip we need to remove the track from the cache to prevent saving it b/c it may not be fully downloaded
IsSkip bool `json:"isSkip"`
Queue *Queue `json:"queue"`
}
type Queue ¶
type Queue struct {
Tracks []*types.PlaylistTrackObject `json:"tracks"`
CurrentIndex int `json:"currentIndex"`
}
func NewMusicQueue ¶
func NewMusicQueue() *Queue
func (*Queue) RemoveTrack ¶
type RemoveTrackFromQueue ¶
type RemoveTrackFromQueue struct {
Track types.PlaylistTrackObject `json:"track"`
}
type SSEMessage ¶
type SSEMessage struct {
Player *struct {
IsPlaying bool `json:"isPlaying"`
CurrentIndex int `json:"currentIndex"`
SecondsPlayed float64 `json:"secondsPlayed"`
} `json:"player,omitempty"`
YtDlp *struct {
Message string `json:"message"`
LogType youtube.YtDlpLogs `json:"logType"`
} `json:"ytDlp,omitempty"`
}
type TracksResponse ¶
type TracksResponse struct {
Tracks []*types.PlaylistTrackObject `json:"tracks"`
}
type TracksType ¶
type TracksType string
const ( PlaylistType TracksType = "playlist" FollowedArtist TracksType = "followed_artist" LikedSongs TracksType = "saved_tracks" AlbumTracks TracksType = "album_tracks" )
Click to show internal directories.
Click to hide internal directories.