odmobile

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

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

View Source
const Version = "1.0.0"

Version is the engine/app version.

Variables

This section is empty.

Functions

func Account

func Account() string

func AddFavorite

func AddFavorite(id string) bool

func AddToPlaylist

func AddToPlaylist(playlistID, trackID string) bool

func AlbumTracks

func AlbumTracks(id string) string

func ArtistProfile

func ArtistProfile(id string) string

func ArtistTop

func ArtistTop(id string) string

func Charts

func Charts() string

func ConnectDevice

func ConnectDevice(addr string) bool

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 CreatePlaylist(title string) string

func CrossfadeMS

func CrossfadeMS() int

func DeletePlaylist

func DeletePlaylist(id string) bool

func DisconnectDevice

func DisconnectDevice()

DisconnectDevice returns control to local playback.

func DiscoverDevices

func DiscoverDevices(timeoutMS int) string

DiscoverDevices returns LAN + configured Connect devices as a JSON array.

func DurationMS

func DurationMS() int64

func Favorites

func Favorites() string

func Fetch

func Fetch(url string) []byte

Fetch downloads raw bytes (e.g. cover art) using a browser User-Agent.

func FinishedCount

func FinishedCount() int

func Flow

func Flow() string

func Format

func Format() string

func Gapless

func Gapless() bool

func Init

func Init(arl string) bool

Init logs in with the ARL and starts the engine. Returns true on success.

func LoggedIn

func LoggedIn() bool

LoggedIn reports whether Init succeeded.

func Lyrics

func Lyrics(id string) string

func NowPlaying

func NowPlaying() string

NowPlaying returns the track actually playing (remote when routed, else local).

func Pause

func Pause()

func Play

func Play(trackID string, durationMS int64) bool

Play resolves + plays a track. When routed to a Connect device, it plays there.

func PlayEpisode

func PlayEpisode(id string) bool

PlayEpisode resolves + plays a podcast episode (plain stream).

func PlaylistTracks

func PlaylistTracks(id string) string

func Playlists

func Playlists() string

func PodcastEpisodes

func PodcastEpisodes(id string) string

func PositionMS

func PositionMS() int64

func Quality

func Quality() int

func RemoveFavorite

func RemoveFavorite(id string) bool

func RemoveFromPlaylist

func RemoveFromPlaylist(playlistID, trackID string) bool

func RenamePlaylist

func RenamePlaylist(id, title string) bool

func ReplayGain

func ReplayGain() bool

func Resume

func Resume()
func Search(q string) string

func SearchPodcasts

func SearchPodcasts(q string) string

func Seek

func Seek(ms int64)

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 SetVolume

func SetVolume(v float64)

func State

func State() int

func Stop

func Stop()

func TogglePause

func TogglePause()

func UserID

func UserID() string

func Volume

func Volume() float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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