StreamusChromeExtension
StreamusChromeExtension copied to clipboard
Permanent playlist - history
Implement a permanent playlist which acts as a 'history' for all songs played. #116 should be considered when implementing this as the logic for writing to Last.FM will be the same as logging to this history. Songs should probably need to be played for N% of their time to trigger logging.
User comments:
It appears YoutubePlayer.loadVideoById()
is the call that is made to play the next video in the stream. This can hooked into to send a song over to a the library playlist
It appears playlists are saved on Streamus.com: https://streamus.com/share/playlist/xxxxxxx, where xxxxxxx
is some ID which is randomly generated each time Copy URL is clicked.
So there would have to be an endpoint such as /library/xxxxxxx
that handles a user's library. Now since the user doesn't have an account it might be tricky to have this in sync.
I believe the simplest solution depends on #432. The user can have a setting called library_key
which contains the xxxxxxx
that points to their library playlist. There might be a better way.
My biggest concern regarding this is hammering my server. A user's stream is sandboxed to their local PC where playlists are synced with my server. If a user spam clicks 'next' on radio mode with each 'next' causing this playlist to need to be updated then that will greatly increase the number of requests received by my server.
I think it might be possible if I keep this playlist saved locally and then send periodic bursts of updates to the server, but that's obviously more complex. I'll keep it in mind, though! Some sort of 'history' would indeed be nice. It'd probably happen alongside Last.FM support since that is essentially history.