listeningSession

package
v0.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOrUpdatePlaylistMetadata

func AddOrUpdatePlaylistMetadata(playlist spotify.FullPlaylist) model.PlaylistMetadata

func AddOrUpdateTrackMetadataInTransaction added in v0.3.0

func AddOrUpdateTrackMetadataInTransaction(spotifyTrack spotify.FullTrack, tx *gorm.DB) (trackMetadata model.TrackMetadata, err error)

func ChangeFallbackPlaylist

func ChangeFallbackPlaylist(session model.SimpleListeningSession, user model.SimpleUser, playlistId string) *SpotifeteError

func Client

func Client(session model.FullListeningSession) *spotify.Client

func CloseSession

func CloseSession(user model.SimpleUser, joinId string) *SpotifeteError

func DeleteRequestFromQueue

func DeleteRequestFromQueue(session model.SimpleListeningSession, spotifyTrackId string) *SpotifeteError

func FindFullListeningSessions

func FindFullListeningSessions(filter model.SimpleListeningSession) []model.FullListeningSession

func FindSongRequest

func FindSongRequest(filter interface{}) (*model.SongRequest, error)

func FindSongRequestCount added in v0.3.0

func FindSongRequestCount(filter interface{}) (int64, error)

func FindSongRequestCountInTransaction added in v0.3.0

func FindSongRequestCountInTransaction(filter interface{}, tx *gorm.DB) (int64, error)

func FindSongRequests

func FindSongRequests(query *gorm.DB) ([]model.SongRequest, error)

func GetActiveSessionCount

func GetActiveSessionCount() uint

func GetDistinctRequestedTracks

func GetDistinctRequestedTracks(session model.SimpleListeningSession) (trackIds []spotify.ID)

func GetFullQueue added in v0.3.0

func GetFullQueue(session model.SimpleListeningSession) ([]model.SongRequest, error)

func GetFullQueueInTransaction added in v0.4.4

func GetFullQueueInTransaction(session model.SimpleListeningSession, tx *gorm.DB) ([]model.SongRequest, error)

func GetLimitedQueue added in v0.3.0

func GetLimitedQueue(session model.SimpleListeningSession, limit int) ([]model.SongRequest, error)

func GetLimitedQueueInTransaction added in v0.4.4

func GetLimitedQueueInTransaction(session model.SimpleListeningSession, limit int, tx *gorm.DB) ([]model.SongRequest, error)

func GetPlaylistMetadataBySpotifyPlaylistId

func GetPlaylistMetadataBySpotifyPlaylistId(playlistId string) *model.PlaylistMetadata

func GetQueueLastUpdated

func GetQueueLastUpdated(session model.SimpleListeningSession) time.Time

func GetTotalSessionCount

func GetTotalSessionCount() uint

func GetTrackMetadataBySpotifyTrackIdInTransaction added in v0.3.0

func GetTrackMetadataBySpotifyTrackIdInTransaction(trackId string, tx *gorm.DB) *model.TrackMetadata

func NewQueuePlaylist

func NewQueuePlaylist(session model.FullListeningSession) *SpotifeteError

func NewSession

func NewSession(user model.SimpleUser, title string) (*model.SimpleListeningSession, *SpotifeteError)

func QrCode

func QrCode(joinId string, disableBorder bool) (qrcode.QRCode, *SpotifeteError)

func QrCodeAsJpeg

func QrCodeAsJpeg(joinId string, disableBorder bool, size int) (*bytes.Buffer, *SpotifeteError)

func QrCodeAsPng

func QrCodeAsPng(joinId string, disableBorder bool, size int) (*bytes.Buffer, *SpotifeteError)

func RefollowQueuePlaylist

func RefollowQueuePlaylist(session model.FullListeningSession) *SpotifeteError

func RemoveFallbackPlaylist

func RemoveFallbackPlaylist(session model.SimpleListeningSession, user model.SimpleUser) *SpotifeteError

func RequestSong

func RequestSong(session model.FullListeningSession, trackId string, username string) (createdRequest model.SongRequest, spotifeteError *SpotifeteError)

func SearchPlaylist

func SearchPlaylist(listeningSession model.FullListeningSession, query string, limit int) ([]model.PlaylistMetadata, *SpotifeteError)

func SearchTrack

func SearchTrack(listeningSession model.FullListeningSession, query string, limit int) ([]model.TrackMetadata, *SpotifeteError)

func SetFallbackPlaylistShuffle

func SetFallbackPlaylistShuffle(session model.SimpleListeningSession, user model.SimpleUser, shuffle bool) *SpotifeteError

func StartPollSessionsLoop

func StartPollSessionsLoop()

func UpdateSessionIfNecessary

func UpdateSessionIfNecessary(session model.FullListeningSession) *SpotifeteError

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL