fjebaker / Asteroid

Music Server for parties and social gatherings.
GNU General Public License v3.0
2 stars 0 forks source link

Song Requests #26

Open fjebaker opened 5 years ago

fjebaker commented 5 years ago

I've made a project for tracking the development of this.

In brief, we need to make the config parsers first, decide on what request API we want to use, and then implement it both front and backend.

I've made this part of Milestone 0.2.0 for now, and I think it's the last feature we need to implement before release.

fjebaker commented 5 years ago

As per the discussion with the development group, my suggested plan of action is (please read in full):

Client Side:

Flask Server:

(Test) API:

Since this will be user defined in the config.ini, we'll provide a test API in the github, which will mock all of the desired applications.

Spotify Extension:

If, as we plan to, we want this to work with spotify, we'll have to be able to add songs into the database where the path column has a spotify:{PATH} prefix - from when I messed about with the spotify API ages ago, the songs have paths much as a local file does, but they are related to how spotify stores songs.

For the client side, this would involve also interfacing with the spotify API for the search ability. I'm pretty sure npm can provide a library to make this more straight forward.

Closing Note:

As discussed, client side will be handled by @JrTheDragon01, the server side by @sambnh, and I'll work on the test api and help out where needed.

Comment here what exactly you want to implement if it needs someone else to be wary of it.

JR-Mitchell commented 5 years ago

As of 80ec21aa141a5e8e8710995aa72829cb6f939ec8 the client side exists. It validates that the URL is in the correct form, though not that it exists (this is handled on flask side anyway so is it necessary?) and deals with the relevant POST request response.

Do we want the success behaviour to be some configable redirect?

sambnh commented 5 years ago

I don't think we need to validate whether the website exists on the client side.

As long as there is feedback to the user when it both fails and succeeds I can't think of any reason for any redirecting is necessary.

JR-Mitchell commented 5 years ago

How close are we to completion of this - does anything else in the big post above still need doing?

sambnh commented 5 years ago

I'm on holiday and I'm halfway though database stuff, I'll be able to finish it at some point soon

JR-Mitchell commented 5 years ago

@Dustpancake @sambnh can I get an update on what needs doing on this now that the db is ORM

fjebaker commented 5 years ago

... I don't really get your question.

The ORM was just a quality-of-life upgrade really, makes everything a bit more scalable and easy to use. So I still need to do the test API, I think you still have most of your JS stuff done, and Sam I think has pushed his contribution?

JR-Mitchell commented 5 years ago

So is this issue closable, are song requests done?

fjebaker commented 5 years ago

Well, not really. At the moment you can't request and fetch a song from somewhere :/ There's still a bit of work to be done, especially with respect to automated conversion to .wav and adding to database.

fjebaker commented 5 years ago

@JrTheDragon01 is the JS side done? Do you have a box I can paste a URL into and does it send the request to the server? If so, I can probably get the API done tomorrow (I'll just put off writing unit tests for a bit haha).

JR-Mitchell commented 5 years ago

iirc at the moment you can fetch a song from a valid url (though I think Sam was working on getting the song info saving how we want it in the database) and yeah the JS side /should/ be done iirc

JR-Mitchell commented 5 years ago

Testing right now to double check that downloads happen

JR-Mitchell commented 5 years ago

Testing right now to double check that downloads happen

You can currently request and fetch a song from a valid URL pointing to an audio file via the frontend, the frontend needs visually cleaning up and imo the save location should be an item in the config file, but it does download and convert to WAV. The only part of the request and fetch missing is that the database is not updated with info about the newly downloaded song.