Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track/Album cache #193

Open
roosemberth opened this issue Jul 25, 2018 · 4 comments
Open

Track/Album cache #193

roosemberth opened this issue Jul 25, 2018 · 4 comments
Labels
A-libspotify Area: libspotify

Comments

@roosemberth
Copy link

Hi,
Is it possible to cache a song so that when we lose the TCP connection (ie. while roaming/unstable network) we can continue listening at least for a couple of minutes ?

Bonus points: Entire albums

@jjok
Copy link

jjok commented Sep 25, 2018

That's probably a fairly grey area. Spotify's terms of use specifically say that you can't download the audio. You may be able to get away with caching the current track.

@kingosticks
Copy link
Member

kingosticks commented Dec 18, 2019

libspotify technically has support for offline sync and pyspotify supports that. But I don't know how you'd expose that here in Mopidy-Spotify and you'd have to decide what you wanted to cache so it doesn't sound like what you want.

Alternatively, you should be able to achieve the first part of this by increasing your audio/buffer_time config value. Possibly at the expense of increased latency.

@kingosticks kingosticks added C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal A-libspotify Area: libspotify question and removed C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal labels Dec 18, 2019
@adamcik
Copy link
Member

adamcik commented Dec 18, 2019

Don't know if we have an existing bug for this already, but I think the quickest way to get this working would be to have the extension register a new CLI sub-command with mopidy where you could mark e.g. playlists as available offline.

I.e. it would just be lookup the playlist and then set https://pyspotify.mopidy.com/en/latest/api/playlist/#spotify.Playlist.set_offline_mode depending on if we are adding or removing.

Thinking this through we could perhaps also have a magic Offline playlist. The playlist wouldn't exist in Spotify and just contain the playlists that are available offline. So the mechanism for controlling things would be adding a playlist to the offline playlist.

Either of these ways you sidestep us not having a clean way to add this generically in Mopidy with a new Core API concept, or adding support for extension provided API extensions. Either of which are not likely to happen fast.

@jodal jodal removed the question label Dec 22, 2019
@jjok
Copy link

jjok commented Mar 13, 2020

I think mopidy/mopidy-gmusic#161 could solve the original issue of unstable internet connection. It wouldn't necessarily help with making albums and playlists available offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-libspotify Area: libspotify
Projects
None yet
Development

No branches or pull requests

5 participants