Documentation
¶
Overview ¶
Package odmobile is the OpenDeezer engine exposed for gomobile (gobind), so a native Android (or iOS) app can drive the same login/decrypt/decode/playback pipeline the desktop GUIs use. Build it with:
gomobile bind -target=android -androidapi 24 -o gui/android/app/libs/odmobile.aar ./mobile
Every browse/list call returns a JSON string (the wire shape the GUIs already use); mutations return bool/string. The caller polls FinishedCount to drive auto-advance, mirroring the C-archive frontends.
Index ¶
- Constants
- func Account() string
- func AddFavorite(id string) bool
- func AddToPlaylist(playlistID, trackID string) bool
- func AlbumTracks(id string) string
- func ArtistProfile(id string) string
- func ArtistTop(id string) string
- func Charts() string
- func ConnectDevice(addr string) bool
- func ConnectedDevice() string
- func CreatePlaylist(title string) string
- func CrossfadeMS() int
- func DeletePlaylist(id string) bool
- func DisconnectDevice()
- func DiscoverDevices(timeoutMS int) string
- func DurationMS() int64
- func Favorites() string
- func Fetch(url string) []byte
- func FinishedCount() int
- func Flow() string
- func Format() string
- func Gapless() bool
- func Init(arl string) bool
- func LoggedIn() bool
- func Lyrics(id string) string
- func NowPlaying() string
- func Pause()
- func Play(trackID string, durationMS int64) bool
- func PlayEpisode(id string) bool
- func PlaylistTracks(id string) string
- func Playlists() string
- func PodcastEpisodes(id string) string
- func PositionMS() int64
- func Quality() int
- func RemoveFavorite(id string) bool
- func RemoveFromPlaylist(playlistID, trackID string) bool
- func RenamePlaylist(id, title string) bool
- func ReplayGain() bool
- func Resume()
- func Search(q string) string
- func SearchPodcasts(q string) string
- func Seek(ms int64)
- func SetClientInfo(clientName, device string)
- func SetCrossfadeMS(ms int)
- func SetGapless(on bool)
- func SetQuality(level int)
- func SetReplayGain(on bool)
- func SetVolume(v float64)
- func State() int
- func Stop()
- func TogglePause()
- func UserID() string
- func Volume() float64
Constants ¶
const Version = "1.0.0"
Version is the engine/app version.
Variables ¶
This section is empty.
Functions ¶
func AddFavorite ¶
func AddToPlaylist ¶
func AlbumTracks ¶
func ArtistProfile ¶
func ConnectDevice ¶
ConnectDevice routes playback to the device at addr (host:port). Stops local playback (audio moves to the device). Returns true on success.
func ConnectedDevice ¶
func ConnectedDevice() string
ConnectedDevice returns the connected device address ("" if local).
func CreatePlaylist ¶
func CrossfadeMS ¶
func CrossfadeMS() int
func DeletePlaylist ¶
func DiscoverDevices ¶
DiscoverDevices returns LAN + configured Connect devices as a JSON array.
func DurationMS ¶
func DurationMS() int64
func FinishedCount ¶
func FinishedCount() int
func NowPlaying ¶
func NowPlaying() string
NowPlaying returns the track actually playing (remote when routed, else local).
func PlayEpisode ¶
PlayEpisode resolves + plays a podcast episode (plain stream).
func PlaylistTracks ¶
func PodcastEpisodes ¶
func PositionMS ¶
func PositionMS() int64
func RemoveFavorite ¶
func RemoveFromPlaylist ¶
func RenamePlaylist ¶
func ReplayGain ¶
func ReplayGain() bool
func SearchPodcasts ¶
func SetClientInfo ¶
func SetClientInfo(clientName, device string)
SetClientInfo overrides the advertised client id + device label (before Init).
func SetCrossfadeMS ¶
func SetCrossfadeMS(ms int)
func SetGapless ¶
func SetGapless(on bool)
func SetQuality ¶
func SetQuality(level int)
func SetReplayGain ¶
func SetReplayGain(on bool)
func TogglePause ¶
func TogglePause()
Types ¶
This section is empty.