Mppm.Tracklist (mppm v0.1.1)

GenServer taking care of servers tracklists. Also implements convenient functions about tracklist

Link to this section Summary

Functions

Adds a track to the tracklist. Downloads it if it doesn't exist yet.

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

Removes a track from the tracklist.

Persist a tracklist in DB, both insert or update.

Link to this section Functions

Link to this function

add_track(tracklist, track, index)

Adds a track to the tracklist. Downloads it if it doesn't exist yet.

Link to this function

changeset(tracklist, params \\ %{})

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

init(init_value)

Callback implementation for GenServer.init/1.

Link to this function

reindex_for_next_track(tracklist, uuid)

Link to this function

reindex_from_current_track(tracklist, uuid)

Link to this function

remove_track(tracklist, track_id)

Removes a track from the tracklist.

Link to this function

start_link(init_value)

Link to this function

upsert_tracklist(tracklist)

Persist a tracklist in DB, both insert or update.