Alexco500 / sidplay5

Sidplay for macOS
GNU General Public License v2.0
49 stars 5 forks source link

Add song to queue on drag'n drop #9

Closed Brog33 closed 1 year ago

Brog33 commented 1 year ago

When a file is dropped in the player window, it clears the current playlist. It would be nice if drag'n drop could add the file to the queue.

Alexco500 commented 1 year ago

Hm, there was an issue with drag&drop. Did you drop the file from the Finder into the player? Is the file part of the HVSC (means, did you navigate to the index HVSC folder and dragged from there), or is the file stored outside (e.g. desktop, downloads,...)?

Brog33 commented 1 year ago

Yes, from downloads folder (drag 'n drop from finder into the app). I haven't synced with HVSC.

Alexco500 commented 1 year ago

I tried to reproduce the issue here. I can drag & drop one file via Finder to the browser window, and it is shown. This works, as long as a collection is selected on the left side. A (smart) playlist is no proper drag & drop target. At the moment, the code clears all entries of the browser window and adds the new items. I can change that (small fix), so that you can drop other files as well to that list, but that's it.

The main issue I see is that all file handling is related or dependent on a collection, and all songs are tested relatively to that collection path. This means that if your collection is set to /Users/test/music, and you drop something from /Users/test/Downloads, it won't be added to the playlist correctly (playlist defined on the left side, that is). In general, every song is tested against the collection to get some more metadata which is not part of the .sid/.psid file, e.g. song length or author info. To be able to add files to (smart) playlists regardless of their location is not done so easily. Or do you have any further ideas? Maybe it would help if you can describe how you use SIDPLAY, if you don't sync to HVSC?

Brog33 commented 1 year ago

Ah, you're right! I have been drag'n'dropping into a "collection" and not a playlist. Didn't notice there was a difference before you pointed it out.

I might not be using the app as intended because I just want to play some SID files I have locally and not download the whole HVSC. But perhaps I should try it :)