sconsify

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NormalMode = iota
	ShuffleMode
	ShuffleAllMode
	SequentialMode
)

Variables

This section is empty.

Functions

func StartMainLoop

func StartMainLoop(events *Events, ui UserInterface, askForFirstTrack bool) error

Types

type Events

type Events struct {
	// contains filtered or unexported fields
}

func InitialiseEvents

func InitialiseEvents() *Events

func (*Events) NewPlaylist

func (events *Events) NewPlaylist(playlists *Playlists)

func (*Events) NextPlay

func (events *Events) NextPlay()

func (*Events) NextPlayUpdates

func (events *Events) NextPlayUpdates() <-chan bool

func (*Events) Pause

func (events *Events) Pause()

func (*Events) PauseUpdates

func (events *Events) PauseUpdates() <-chan bool

func (*Events) Play

func (events *Events) Play(track *Track)

func (*Events) PlayTokenLost

func (events *Events) PlayTokenLost()

func (*Events) PlayTokenLostUpdates

func (events *Events) PlayTokenLostUpdates() <-chan bool

func (*Events) PlayUpdates

func (events *Events) PlayUpdates() <-chan *Track

func (*Events) PlaylistsUpdates

func (events *Events) PlaylistsUpdates() <-chan Playlists

func (*Events) Replay

func (events *Events) Replay()

func (*Events) ReplayUpdates

func (events *Events) ReplayUpdates() <-chan bool

func (*Events) Search

func (events *Events) Search(query string)

func (*Events) SearchUpdates

func (events *Events) SearchUpdates() <-chan string

func (*Events) ShutdownEngine

func (events *Events) ShutdownEngine()

func (*Events) ShutdownEngineUpdates

func (events *Events) ShutdownEngineUpdates() <-chan bool

func (*Events) ShutdownSpotify

func (events *Events) ShutdownSpotify()

func (*Events) ShutdownSpotifyUpdates

func (events *Events) ShutdownSpotifyUpdates() <-chan bool

func (*Events) TrackNotAvailable

func (events *Events) TrackNotAvailable(track *Track)

func (*Events) TrackNotAvailableUpdates

func (events *Events) TrackNotAvailableUpdates() <-chan *Track

func (*Events) TrackPaused

func (events *Events) TrackPaused(track *Track)

func (*Events) TrackPausedUpdates

func (events *Events) TrackPausedUpdates() <-chan *Track

func (*Events) TrackPlaying

func (events *Events) TrackPlaying(track *Track)

func (*Events) TrackPlayingUpdates

func (events *Events) TrackPlayingUpdates() <-chan *Track

type Playlist

type Playlist struct {
	// contains filtered or unexported fields
}

func InitFolder added in v0.2.0

func InitFolder(id string, name string, playlists []*Playlist) *Playlist

func InitPlaylist

func InitPlaylist(id string, name string, tracks []*Track) *Playlist

func InitSearchPlaylist

func InitSearchPlaylist(id string, name string, tracks []*Track) *Playlist

func InitSubPlaylist added in v0.2.0

func InitSubPlaylist(id string, name string, tracks []*Track) *Playlist

func (*Playlist) AddPlaylist added in v0.2.0

func (playlist *Playlist) AddPlaylist(subPlaylist *Playlist) bool

func (*Playlist) GetNextTrack

func (playlist *Playlist) GetNextTrack(currentIndexTrack int) (int, bool)

func (*Playlist) HasSameNameIncludingSubPlaylists added in v0.2.0

func (playlist *Playlist) HasSameNameIncludingSubPlaylists(otherPlaylist *Playlist) bool

func (*Playlist) Id

func (playlist *Playlist) Id() string

func (*Playlist) IndexByUri

func (playlist *Playlist) IndexByUri(uri string) int

func (*Playlist) InvertOpenClose added in v0.2.0

func (playlist *Playlist) InvertOpenClose()

func (*Playlist) IsFolder added in v0.2.0

func (playlist *Playlist) IsFolder() bool

func (*Playlist) IsFolderOpen added in v0.2.0

func (playlist *Playlist) IsFolderOpen() bool

func (*Playlist) IsSearch

func (playlist *Playlist) IsSearch() bool

func (*Playlist) Name

func (playlist *Playlist) Name() string

func (*Playlist) OpenFolder added in v0.2.0

func (playlist *Playlist) OpenFolder()

func (*Playlist) OriginalName added in v0.2.0

func (playlist *Playlist) OriginalName() string

func (*Playlist) Playlist added in v0.2.0

func (playlist *Playlist) Playlist(index int) *Playlist

func (*Playlist) Playlists added in v0.2.0

func (playlist *Playlist) Playlists() int

func (*Playlist) RemovePlaylist added in v0.2.0

func (playlist *Playlist) RemovePlaylist(playlistName string) bool

func (*Playlist) Track

func (playlist *Playlist) Track(index int) *Track

func (*Playlist) Tracks

func (playlist *Playlist) Tracks() int

type PlaylistByName

type PlaylistByName []Playlist

func (PlaylistByName) Len

func (p PlaylistByName) Len() int

sort Interface

func (PlaylistByName) Less

func (p PlaylistByName) Less(i, j int) bool

func (PlaylistByName) Swap

func (p PlaylistByName) Swap(i, j int)

type Playlists

type Playlists struct {
	// contains filtered or unexported fields
}

func InitPlaylists

func InitPlaylists() *Playlists

func (*Playlists) AddPlaylist

func (playlists *Playlists) AddPlaylist(playlist *Playlist)

func (*Playlists) Get

func (playlists *Playlists) Get(name string) *Playlist

func (*Playlists) GetById

func (playlists *Playlists) GetById(id string) *Playlist

func (*Playlists) GetModeAsString

func (playlists *Playlists) GetModeAsString() string

func (*Playlists) GetNext

func (playlists *Playlists) GetNext() (*Track, bool)

func (*Playlists) GetPlayingPlaylist

func (playlists *Playlists) GetPlayingPlaylist() *Playlist

func (*Playlists) GetPlayingTrack

func (playlists *Playlists) GetPlayingTrack() *Track

func (*Playlists) HasPlaylistSelected

func (playlists *Playlists) HasPlaylistSelected() bool

func (*Playlists) InvertMode

func (playlists *Playlists) InvertMode(mode int) int

func (*Playlists) Merge

func (playlists *Playlists) Merge(newPlaylists *Playlists)

func (*Playlists) Names

func (playlists *Playlists) Names() []string

func (*Playlists) Playlists

func (playlists *Playlists) Playlists() int

func (*Playlists) PremadeTracks

func (playlists *Playlists) PremadeTracks() int

func (*Playlists) Remove

func (playlists *Playlists) Remove(playlistName string)

func (*Playlists) SetCurrents

func (playlists *Playlists) SetCurrents(currentPlaylist string, currentIndexTrack int) error

func (*Playlists) SetMode

func (playlists *Playlists) SetMode(mode int)

func (*Playlists) Tracks

func (playlists *Playlists) Tracks() int

type Track

type Track struct {
	Uri      string
	Artist   string
	Name     string
	Duration string
}

func InitPartialTrack

func InitPartialTrack(uri string) *Track

func InitTrack

func InitTrack(uri string, artist string, name string, duration string) *Track

func ToSconsifyTrack

func ToSconsifyTrack(track *sp.Track) *Track

func (*Track) GetFullTitle

func (track *Track) GetFullTitle() string

func (*Track) GetTitle

func (track *Track) GetTitle() string

func (*Track) IsPartial

func (track *Track) IsPartial() bool

type UserInterface

type UserInterface interface {
	TrackPaused(track *Track)
	TrackPlaying(track *Track)
	TrackNotAvailable(track *Track)
	PlayTokenLost() error
	GetNextToPlay() *Track
	NewPlaylists(playlists Playlists) error
	Shutdown()
}

Jump to

Keyboard shortcuts

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