Skip to content

Clear playlist before opening files externally

Nate Graham requested to merge ngraham/elisa:clear-on-open-externally into master

Reason for the change

Right now files opened in the app through e.g. Dolphin are appended to the end of the current playlist.

This makes sense from the perspective of not destroying a playlist the user may have put effort into curating, that doesn't match the way people actually use the app for this use case. Anyone opening files from their file manager is carefully curating playlists, and instead uses Elisa as just an audio player of convenience for individual files.

This commit changes ElisaApplication::openFiles to require an extra argument communicating the enqueue style (e.g. replace or append) and opts back the current "enqueue" behavior for dragging-and-dropping files into the view, but replaces for all other cases, including the case where the app is opened externally with files from the file manager.

Test plan

  1. Open Elisa with some stuff already in the playlist, drag file from Dolphin into playlist -> file is appended to playlist
  2. Have Elisa open with some stuff already in the playlist, close it, right-click on a music file in Dolphin > Open in Elisa -> Elisa opens with just that file in the playlist and starts playing immediately
  3. Have Elisa open with some stuff already in the playlist, right-click on a music file in Dolphin > Open in Elisa -> Playlist is cleared and new file starts plating immediately

Bugs fixed

BUG: 423007 FIXED-IN: 24.08.0

@jackh

Edited by Nate Graham

Merge request reports

Loading