Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Add support for pluggable media sources (including streaming sources) #14

Open
timusus opened this issue Feb 26, 2017 · 2 comments
Open

Comments

@timusus
Copy link
Owner

timusus commented Feb 26, 2017

This kind of ties in with the #13 (and depends on it). It would be the greatest thing ever to have support for pluggable sources, so I could begin working on, for example, a DLNA plugin, Google Drive plugin, Spotify plugin, or just whatever.

@ghost
Copy link

ghost commented Feb 28, 2017

You need to have an interface defining basic "source" methods like "getSongs". Then, you create classes implementing this interface but with body adjusted to load the songs from different sources (MediaStore, Spotify, etc...). Also, your models (Song, Album, Artist, etc...) should have all the common meta data fields that you receive from any source type (song name, artist, album name...).

Take a look at my media player, how I implemented LocalMediaProvider, which extends MediaProvider interface. I can just make SpotifyMediaProvider, implement those methods to fetch data from Spotify instead of MediaStore and the rest should be pretty easy. And throughout the app you pass MediaProvider instances so it doesn't matter are the songs coming from your phone or another source.

@timusus
Copy link
Owner Author

timusus commented Mar 7, 2017

Thanks @icarapovic, that's exactly the approach I had in mind.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant