Documentation
¶
Index ¶
- func InitManager()
- func SupportsMediaType(s Source, mediaType string) bool
- type LocalFileSource
- func (s *LocalFileSource) CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
- func (s *LocalFileSource) GetContent(playable types.SourcePlayable) ([]byte, error)
- func (s *LocalFileSource) GetID() string
- func (s *LocalFileSource) GetLyrics(playable types.LyricsPlayable) (map[string]string, error)
- func (*LocalFileSource) GetMediaTypes() []string
- func (s *LocalFileSource) GetName() string
- func (*LocalFileSource) GetSourceTypes() []string
- func (*LocalFileSource) GetVersion() types.Version
- func (s *LocalFileSource) Search(_ string, _ int, _ int, filters map[string]interface{}) ([]types.SourcePlayable, error)
- type Manager
- type Source
- type SpotifySource
- func (s *SpotifySource) CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
- func (*SpotifySource) GetContent(_ types.SourcePlayable) ([]byte, error)
- func (*SpotifySource) GetID() string
- func (s *SpotifySource) GetLyrics(playable types.LyricsPlayable) (map[string]string, error)
- func (*SpotifySource) GetMediaTypes() []string
- func (*SpotifySource) GetName() string
- func (*SpotifySource) GetSourceTypes() []string
- func (*SpotifySource) GetVersion() types.Version
- func (*SpotifySource) Search(_ string, _ int, _ int, _ map[string]interface{}) ([]types.SourcePlayable, error)
- type WebSource
- func (s *WebSource) CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
- func (s *WebSource) GetContent(playable types.SourcePlayable) ([]byte, error)
- func (*WebSource) GetID() string
- func (s *WebSource) GetLyrics(playable types.LyricsPlayable) (map[string]string, error)
- func (*WebSource) GetMediaTypes() []string
- func (*WebSource) GetName() string
- func (*WebSource) GetSourceTypes() []string
- func (*WebSource) GetVersion() types.Version
- func (*WebSource) Search(_ string, _ int, _ int, _ map[string]interface{}) ([]types.SourcePlayable, error)
- type YouTubeSource
- func (s *YouTubeSource) CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
- func (s *YouTubeSource) GetContent(playable types.SourcePlayable) ([]byte, error)
- func (*YouTubeSource) GetID() string
- func (s *YouTubeSource) GetLyrics(playable types.LyricsPlayable) (map[string]string, error)
- func (*YouTubeSource) GetMediaTypes() []string
- func (*YouTubeSource) GetName() string
- func (*YouTubeSource) GetSourceTypes() []string
- func (*YouTubeSource) GetVersion() types.Version
- func (s *YouTubeSource) Search(query string, limit int, _ int, filters map[string]interface{}) ([]types.SourcePlayable, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitManager ¶
func InitManager()
func SupportsMediaType ¶
Types ¶
type LocalFileSource ¶
type LocalFileSource struct {
Path string
}
func InitLocalFileSource ¶
func InitLocalFileSource(filepath string) (*LocalFileSource, error)
func (*LocalFileSource) CompleteMetadata ¶
func (s *LocalFileSource) CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
func (*LocalFileSource) GetContent ¶
func (s *LocalFileSource) GetContent(playable types.SourcePlayable) ([]byte, error)
func (*LocalFileSource) GetID ¶
func (s *LocalFileSource) GetID() string
func (*LocalFileSource) GetLyrics ¶
func (s *LocalFileSource) GetLyrics(playable types.LyricsPlayable) (map[string]string, error)
func (*LocalFileSource) GetMediaTypes ¶
func (*LocalFileSource) GetMediaTypes() []string
func (*LocalFileSource) GetName ¶
func (s *LocalFileSource) GetName() string
func (*LocalFileSource) GetSourceTypes ¶
func (*LocalFileSource) GetSourceTypes() []string
func (*LocalFileSource) GetVersion ¶
func (*LocalFileSource) GetVersion() types.Version
func (*LocalFileSource) Search ¶
func (s *LocalFileSource) Search(_ string, _ int, _ int, filters map[string]interface{}) ([]types.SourcePlayable, error)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
var SM Manager
func (*Manager) EnableSource ¶
func (*Manager) EnableSources ¶
func (sm *Manager) EnableSources()
type Source ¶
type Source interface {
GetID() string
GetName() string
GetVersion() types.Version
GetSourceTypes() []string
GetMediaTypes() []string
Search(query string, limit int, page int, filters map[string]interface{}) ([]types.SourcePlayable, error)
GetContent(playable types.SourcePlayable) ([]byte, error)
GetLyrics(playable types.LyricsPlayable) (map[string]string, error)
CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
}
type SpotifySource ¶
type SpotifySource struct {
}
func InitSpotifySource ¶
func InitSpotifySource() (*SpotifySource, error)
func (*SpotifySource) CompleteMetadata ¶
func (s *SpotifySource) CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
func (*SpotifySource) GetContent ¶
func (*SpotifySource) GetContent(_ types.SourcePlayable) ([]byte, error)
func (*SpotifySource) GetID ¶
func (*SpotifySource) GetID() string
func (*SpotifySource) GetLyrics ¶
func (s *SpotifySource) GetLyrics(playable types.LyricsPlayable) (map[string]string, error)
func (*SpotifySource) GetMediaTypes ¶
func (*SpotifySource) GetMediaTypes() []string
func (*SpotifySource) GetName ¶
func (*SpotifySource) GetName() string
func (*SpotifySource) GetSourceTypes ¶
func (*SpotifySource) GetSourceTypes() []string
func (*SpotifySource) GetVersion ¶
func (*SpotifySource) GetVersion() types.Version
func (*SpotifySource) Search ¶
func (*SpotifySource) Search(_ string, _ int, _ int, _ map[string]interface{}) ([]types.SourcePlayable, error)
type WebSource ¶
type WebSource struct {
URL string
}
func InitWebSource ¶
func (*WebSource) CompleteMetadata ¶
func (s *WebSource) CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
func (*WebSource) GetContent ¶
func (s *WebSource) GetContent(playable types.SourcePlayable) ([]byte, error)
func (*WebSource) GetMediaTypes ¶
func (*WebSource) GetSourceTypes ¶
func (*WebSource) GetVersion ¶
type YouTubeSource ¶
type YouTubeSource struct {
}
func InitYouTubeSource ¶
func InitYouTubeSource() (*YouTubeSource, error)
func (*YouTubeSource) CompleteMetadata ¶
func (s *YouTubeSource) CompleteMetadata(playable types.SourcePlayable) (types.SourcePlayable, error)
func (*YouTubeSource) GetContent ¶
func (s *YouTubeSource) GetContent(playable types.SourcePlayable) ([]byte, error)
func (*YouTubeSource) GetID ¶
func (*YouTubeSource) GetID() string
func (*YouTubeSource) GetLyrics ¶
func (s *YouTubeSource) GetLyrics(playable types.LyricsPlayable) (map[string]string, error)
func (*YouTubeSource) GetMediaTypes ¶
func (*YouTubeSource) GetMediaTypes() []string
func (*YouTubeSource) GetName ¶
func (*YouTubeSource) GetName() string
func (*YouTubeSource) GetSourceTypes ¶
func (*YouTubeSource) GetSourceTypes() []string
func (*YouTubeSource) GetVersion ¶
func (*YouTubeSource) GetVersion() types.Version
func (*YouTubeSource) Search ¶
func (s *YouTubeSource) Search(query string, limit int, _ int, filters map[string]interface{}) ([]types.SourcePlayable, error)
Click to show internal directories.
Click to hide internal directories.