Save 'all songs saved on spotify account' to playlist. Set local tracklist on autoplay


#1

Correct me if I’m wrong, but playlists from spotify don’ t currently work with musicbox and are unlikely to work in the coming months.

As a workaround I have IFTTT hook that syncs ’ your library’ with the designated playlist. And ’ your library’ works just fine for me through musicbox-webclient.

(Use case: To have different people adding things to musicbox playlist through their own spotify accounts, without learning to use new interfaces. Doesn’ t need to be instant, delay of few hours is fine. Big red physical button on the box is fine too.)

However, this still requires manual interventions to :

1)Refresh current tracklist from current ‘all music’

2)Recreate tracklist after restarts.

Those might be two separate problems, or it might be one.

I’ve searched but failed to find a solution - but it feels like someone must have already tried to fix at least part of this before, so maybe someone could share your experiences?

*)Is there a currently compatible .sh that overwrites [designated] local playlist with contents of the current tracklist? (i.e. automate musicboxes ‘add to playist, enter name, overwrite, yes’ functionality?

*)What is the correct syntax for the local playlist to be added to autoplay upon restart anyway? And am I correct, no playlist from Spotify can be currently added to autoplay upon restart? I’ve tried few approaches describe din posts back from 2015, so I guess the recent changes have broken everything?

*)Anyone has come up with .sh to automate ‘spotify web browse->your music->songs->add all to queue/playlist’ workflow ? It seems that opening the list already fetches a tracklist, so looping through the results just to recapture it one track at a time seems superfluos - any way to capture it more upstream?

Note: I don’ t use any other source for music, so all library is spotify tracks only. Not sure how references to spotify tracks are kept in mopidy though.

I have read through Autoplay All Tracks random and repeat but that’ s 1)not recent and 2)seems to be for local trakcs, while I don’ t have any locally saved music files and rely entirely on spotify for the source instead.


#2

Yes Spotify playlists are broken and they will remain so for a few weeks more at the very least (I am away). You can’t autoplay a Spotify playlist right now for this reason.

You should be able to lookup the mpc commands to overwrite a stored local playlist with the contents of the current tracklist. You can add these commands to your own script or directly to the existing musicbox startup script.

Local m3u playlists can contain tracks from any backend. You can lookup the current track’s uri in the streams page and I think it’s also included in the track details popup.

To use a local playlist with autoplay you need to load it using its name as it appears to mpd clients. This name may match the actual playlist name or it may be mangled to make it compatible with mpd clients. The previous examples on here should still be valid.

I’m afraid I don’t understand the last question about adding all ‘My Music’ tracks to the queue.


#3

Thanks I can work with this. If I come up with good solution I’ll try to post it here as well.

As for the last question: In Spotify each account has it’ s own music library. I want to script the bit that does a ‘refresh the library and start playing it’ automatically, as opposed to going through web interface, so the project can function unsupervised. I was merely describing the workflow in musicbox-web interface.
But if it’ s all m3u playlists and mpc commands, and that part hasn’t changed in last 4 years or so, I can probably figure it out.

So for anyone stumbling upon this thread:

To use a local playlist with autoplay you need to load it using its name as it appears to mpd clients. This name may match the actual playlist name or it may be mangled to make it compatible with mpd clients. The previous examples on here should still be valid.

You can find out the names for your playlists by typing in your ssh:

mpc lsplaylists

Then follow instructions in thread I linked in first post, just replace the line ‘mpc ls “Local media/Tracks” |mpc add’ with ‘mpc load Queue’ where ‘Queue’ is the name of your playlist.

Remember, to make things easier, start by adding any track to as autoplay through settings, then restart. That creates the startup.sh area to edit.

‘Refresh current spotify library to the queue’ and ‘dump queue to playlist’ are wee bit more complex so stil WIP.