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

Offline Playlists/Albums/Artists #10

Open
clawoflight opened this issue Dec 14, 2013 · 24 comments
Open

Offline Playlists/Albums/Artists #10

clawoflight opened this issue Dec 14, 2013 · 24 comments
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal

Comments

@clawoflight
Copy link

I don't know what libspotify exposes nor what your roadmap looks like, but it would be extremely useful to be able to be able to cache music.

@kingosticks
Copy link
Member

It's not currently exposed in pyspotify but it's coming in version 2 thanks to @jodal's tireless efforts. Stay tuned!

@clawoflight
Copy link
Author

Tank you for your work! I'll certainly help out when I learned enough, but
I have to finish school first. :)

@misscreativity0
Copy link

Sorry if this question doesn't fit here:
When is v2.x planned to release?

@AndydeCleyre
Copy link

2.x has been released!

@Luca81
Copy link

Luca81 commented Sep 19, 2015

Sorry to come back on this feature. Pyspotify now has the support for offline playlists.
Is there any plan to expose those functions in mopidy?
It looks like richardambrige patches were a good start. Can i help in some ways? Advices?

@jodal
Copy link
Member

jodal commented Sep 22, 2015

As mentioned, pyspotify has all the required pieces to add offline support to Mopidy-Spotify. However, there is no timeline on when it will be implemented and available in Mopidy-Spotify.

What is more constructive is to discuss what you expect from such a feature. I imagine a couple of ways it could work for the end user...

Alternative A: new config spotify/offline_playlists

[spotify]
offline_playlists =
  My party list
  My xmas list
  My other list
  spotify:alice:playlist:abcdef0123456789

Pros

  • Easy to implement.

Cons

  • You'll have to reconfigure and restart Mopidy every time you want to change the set of offline playlists.
  • You'll have to watch the Mopidy logs to get to know anything about the status of the offline syncing.

Alternative B: custom command to manage offline playlists

$ mopidy spotify offline status
My party list (spotify:...) [17/17]
My xmas list (spotify:...) [93/93]
$ mopidy spotify offline add spotify:alice:playlist:abcdef0123456789
$ mopidy spotify offline status
My party list (spotify:...) [17/17]
My xmas list (spotify:...) [93/93]
Alice's list (spotify:alice:playlist:abcdef0123456789) [1/28] [downloading: 3.6%, ~7min remaining]

To have this work both when Mopidy is running and not, state must be shared between the command and the Mopidy server through some on-disk persistency (e.g. JSON file or SQLite database). I imagine that all the state that is kept is what playlists are available offline and how much they have been synced, as well as a list of pending tasks (adding, removing playlists).

Pros

  • You can add/remove offline playlists without restarting Mopidy.

Cons

  • More to implement.
  • Requires shell on the server running Mopidy to manage to offline playlists.
  • I'd like to see the extension command support in Mopidy replaced with "click" before it gets wider usage.

Alternative C: control offline playlists through Mopidy APIs

Pros

  • Control what playlists are offline from any Mopidy client that supports the API
  • Control over the network
  • No need to restart Mopidy

Cons

  • The API doesn't exist
  • No clients support this

@Luca81
Copy link

Luca81 commented Sep 23, 2015

Just a little background on my current project: I am a dance teacher and I am currently using a Cubieboard configured with mopidy to access some local MP3 and the Spotify account. I control everything with an old infrared controller using lirc. The objective would be to get an offline support to being able to play few small playlists without the internet access (as I cannot garantee to have it at all places and I would like to avoid the internet buffer latency effects that I am currently experiencing).

I would be more oriented for a simple solution A for a first step. It looks like what Richard Ambridge did something that way here (of course before getting pyspotify support): #41

@andreroggeri
Copy link

Is there any progess on this ? I would really like to see this feature implemented. 👍

@Luca81
Copy link

Luca81 commented Dec 18, 2015

Sorry, no progress on my side.

@andreroggeri
Copy link

I've tried to tweak the mopidy to support offline sync, but there is little/no examples on how to enable this feature. I've read the pyspotify documentation, and the set_offline_modefor playlists doesn't works as I expected.

@kingosticks
Copy link
Member

Did you look at #41

@nicman23
Copy link

tried the branch from #41 but did not work with the latest mopidy / pyspotify.

@kingosticks
Copy link
Member

As a starting example for @andreroggeri (or others) it should suffice.

@DapperDapp
Copy link

DapperDapp commented May 12, 2018

Hello, I need to ressurect this feature. Any suggestions on getting this running?

Or does anyone have this feature #41 working?

@DapperDapp
Copy link

@kingosticks I have mopidy-spotify downloading the playlists as in #41, but I'm not sure how to control playback once offline? Once it disconnects from the internet, I can send commands over my LAN, but the tracks don't laod

@jodal jodal removed this from the v3.x milestone Nov 17, 2019
@mopidy mopidy deleted a comment from SSSSUUU Dec 16, 2019
@SSSSUUU
Copy link

SSSSUUU commented Dec 16, 2019

Post Removed.

@kingosticks
Copy link
Member

Please do not advertise stream ripping software. We are not interested here. Thanks.

@AKASGaming
Copy link

I assume this is still being worked on...? Or is it completely impossible to do?

@kingosticks
Copy link
Member

It's not on my radar. With the change to librespot this becomes much harder as that has no support for offline playback. It could be added to librespot but so far they've rejected the idea. I support that rejection as it otherwise invites piracy which may ultimately lead to Spotify moving against librespot and more work for everyone. Offline playback makes sense for mobile phones, less so for the majority of computers running Mopidy.

@AKASGaming
Copy link

So what would you recommend for an internet-less in-car solution?

@kingosticks
Copy link
Member

If your computer doesn't have the internet I'd have to suggest something other than an online streaming service. It's not ideal but I can't see this functionality being made available in librespot. Open to other suggestions and for someone to implement it.

@AKASGaming
Copy link

Maybe it could work like how discord bots did, streaming (or downloading in this case) the song from a service like YouTube onto the device automatically?

@shymega
Copy link

shymega commented Jan 18, 2023

Maybe it could work like how discord bots did, streaming (or downloading in this case) the song from a service like YouTube onto the device automatically?

Which in itself is not legally viable, and doesn't use Spotify.

@AKASGaming
Copy link

Ah, I see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

No branches or pull requests