API for package: cl-scrobbler
Homepage: Github
-Variables
*config-dir*: "" variable
The directory to store the session key, scrobble cache and log in.
*scrobble-count*: 5 variable
The number of songs needed in the queue before an attempt to scrobble is
made.
*song-info-fn*: NIL variable
This is a lambda or named function intended to take no arguments and return
a list where the first element is the track name, the second is the artist and
the third is the track length in seconds.
*song-time-fn*: NIL variable
This is a lambda or named function intended to take no arguments and return
the current position in the track in seconds.
-Functions
cache-contents function
Get a copy of the contents of the *SCROBBLE-CACHE*.
When valid (as determined by VALID-SCROBBLE-P), add a song to the queue to be
scrobbled. If there is a network failure, the track will be stored for later
scrobbling when a connection is reestablished.
scrobbler-init function
Ensure needed variables are set, restore the cache and settings if present
and, if scrobbling is enabled, restore or acquire a session key.
scrobbler-loop function
Loop indefinitely. If there are at least *SCROBBLE-COUNT* songs queued,
scrobble until the queue is empty or errors occur. Sleep 2 minutes and repeat.
set-now-playing function
Update the now playing status when *NOW-PLAYING-P* is non-NIL.
Toggle whether or not the Now Playing status is updated with each song.
Toggle whether or not new songs are added to the queue.
Set *LAST-SEEK* to the current track position via *SONG-TIME-FN*.
update-skipped function
Set *SKIPPED* to the current track position via *SONG-TIME-FN*.
Set *SONG-INFO* to a list of (track artist duration timestamp) via
*SONG-INFO-FN* and UNIX-TIMESTAMP.