gateship-one / odyssey

Odyssey music player
GNU General Public License v3.0
235 stars 39 forks source link

[Dev proposed] External music source #112

Open X-Ryl669 opened 6 years ago

X-Ryl669 commented 6 years ago

Hi,

I'm the developer of Kutr, and I've started developing a music provider for it on Android. Initially, I'm using Orpheus (which is a nice open source music player) but it's no more maintained. I've just found your project and I think it's a very nice replacement for outdated Orpheus. I was wondering if you would agree to define a kind of interface so I can plug my provider to this software.

Basically, the KutrProvider is an account provider that connects to your personnal Koel or Kutr's server and download the list of songs/albums/artists/folders you have on your server and manage a local cache for the recently played songs (so you don't need to download song each time you play them).

The required interface to connect with this application is thus quite common for any remote music collection server like Spotify or whatever.

  1. We need a way to be queried for the list of songs, the relation between songs and album and artists, and, ideally, folders.
  2. Then the user would play like usual but when "consuming" a remote song, the provider will be queried to give the song's content (either by downloading it or from its cache).
  3. Another required function is searching, the provider might be queried for some terms and return a list of matching songs / artists / album / file.

As I understand your code, it would only require minimal changes, if reusing track's URL for specifying the used provider for it (for example, Kutr's based songs would have kutr:// based paths). It would require adding URL for other models too (defaulting to local). For handling (unknown?) providers, it should not disturb the current application. Maybe abstracting the MusicLibraryHelper to support remote provider would be enough?

The way it's handled in Orpheus is via plugins that are bundled in the application, but it's a bit clunky so any independent solution would be better (maybe using an intent to expect installed providers to answer ?)

In all cases, would you accept such modification, and if yes, would you spend some time defining the interface so I can write the glue code for it and submit a PR ?

gnome17 commented 6 years ago

Hi, interesting idea we never thougt about this so far. We have currently not much time to provide any assistance but feel free to start your work and open a pull request for it. Feel free to use this issue for further questions.