mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

Feature: better handling when loading a playlist containing non-existent songs #909

Closed mpogue2 closed 10 months ago

mpogue2 commented 1 year ago

BUG: when a playlist is loaded, and songs are not present, the numbering of the remaining songs gets messed up. In Gero's example, two item 19's and two item 20's should not have occurred. This should never happen and it is a bug (I'll open this separately).

In my testing, I don't see the numeric duplication that Gero sees. However, I do see a GAP where the incorrect song used to be.

I guess there are a couple ways to handle this:

  1. close the gap -- ensure that the numbering is always 1-N, where N = number of playable songs in the playlist (i.e. IGNORE songs that are not found). Feature: Put up a dialog instead of using the status bar, to list all errors at once.
  2. show the gap -- still show the song that doesn't exist, but indicate that it is otherwise NOT playable, say with strikethrough or grey it out. At load time, either a) try to find the song (again), and if it's there, remove the strikethrough and load it as normal, or b) do not allow loading at all until the user fixes the problem and reloads the playlist.

In any case, when an error is seen by the user today, they can fix it (if it's iCloud/Dropbox/Box.net, they can click to ask the OS to download the file to make it local), and then reload the playlist, which should then correctly load. (I'm not aware of a way that Qt can itself do this.)

Gero5 commented 1 year ago

I would prefer No. 2. mark the songs that are not playable. Because I really want to have the song in my playlist that is why I put it there. If I know that there is a problem with loading a song I can fix it. Usually I check the playlist at home before I move to the dance. If I do not see the missing songs and I find my playlist shortened by two or even more entries on the club night it causes unnecessary trouble.

mpogue2 commented 1 year ago

I think that option # 2 makes sense. I'm gonna change this to a Feature rather than a Bug, and change the title accordingly.

mpogue2 commented 1 year ago

OK, implementation notes:

mpogue2 commented 1 year ago

Option 3: might be to pop up a dialog box, with a way to correct each entry that is wrong (e.g. modify or delete).

mpogue2 commented 11 months ago

This will be addressed as part of the new DarkMode prototype in #921. See this comment.

Basically, invalid items will be highlighted at Load Playlist time, and the user will be able to manually edit the playlist with a text editor, and reload the playlist to ensure that the edits fixed the problem.

@Gero5 To address the "Dropbox/Box.net/iCloud moved my file to the Cloud" use case, we might also need a context menu option on each missing item, something like "Open containing folder", so that the user can click on the little cloud icon to re-download the missing file. In this case, it's not an error in the playlist.csv file, it's that the file is only in the Cloud.

mpogue2 commented 11 months ago

OK, I thought about it, and went ahead and implemented it: 26da7040821f9404e5dd1b15050ac3ff18f4513d

Added a new context menu for playlist entries:

So, if a playlist file was moved or deleted, it will be a 3-step process to fix it:

mpogue2 commented 10 months ago

I think this is implemented now, so closing.