mpogue2 / SquareDesk

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

Feature: strikethrough and/or green bkgnd when song is "played" #1047

Closed mpogue2 closed 4 months ago

mpogue2 commented 8 months ago

Probably need

Note that this is different than "Age", which is in days, and changes to zero instantly when a song is played even for 1 second.

mpogue2 commented 8 months ago

For comparison, here's what SquareView does (the green color is 0c00FF00):

image image

mpogue2 commented 8 months ago

This is a dup of #958.

mpogue2 commented 8 months ago

In SqView 9.18.3:

mpogue2 commented 8 months ago

I'm inclined to do something like this:

mpogue2 commented 8 months ago

Hmmm...in thinking about this more, I kinda like strikethrough more than I like green background (or both), because then I don't have to worry that somebody will set the patter or singer color to 0x00FF00, making the text invisible.

mpogue2 commented 8 months ago

NOTE: The Session > Clear Recent menu item and the "recent" column in the songTable are almost exactly what I described above, except:

So, updated idea:

mpogue2 commented 8 months ago

Changing the definition of "played" to N seconds (I think I'll make it NON-contiguous, but contained within a session). So, we are discussing #961 in a bit more detail now... :-)

So, I think this works:

Implications:

mpogue2 commented 8 months ago

Now that #961 is complete, we can use the session_id from songSettings to know what session we are currently in. So, I can now move on to implementing the above N seconds method for determining "played".

I'm gonna start out by defaulting it to 15 seconds to match GEMA reporting, I can always put in a preference for N later. In the short term, this will also allow me to preview songs without causing them to be marked as "played", which is what I wanted, so as to eliminate my manual tracking.

I will probably need a button or OPTION-Menu Item to be able to remap all the sessions the DB to the new session definitions, which will look like (for me):

If I do this, then in theory the Recent and Age columns will give me what I have been tracking by hand. If I start a test playback before Jokers starts at 6PM, it will count as Practice until 6PM at which time it will count as Jokers. That's exactly what I wanted...

mpogue2 commented 8 months ago

Commit: 270101a3e0dc83b89034ed237c73ffbe0dc38329

A song now needs to play for 15 seconds in a session, before it is marked as "played". If a song plays over a session boundary, it could be marked "played" in the earlier session (if it had more than 15 seconds of playback there), and also in the later session (if it had more than 15 seconds of playback there).

It will also be handled correctly if the user is in Manual mode, and manually changes the session from the Session menu. It will also be handled correctly if the user is switching between Manual and Automatic modes while a song is playing.

NOTE: right now the threshold, N, is fixed at 15 seconds, which should be compatible with GEMA reporting requirements. We can put in a pulldown menu preference later to change this to, for example, {0, 1, 5, 15, 30} seconds, where 0 means "played when loaded".

The current GUI affordance associated with this feature is the Recent column.

mpogue2 commented 8 months ago

Commit: 01ac44bc93946b77ad80d2639a626a861cf21108

Fixed a couple of bugs when updating the session manually.

The Recent and Age columns seem to be working correctly now, for Manual and Automatic session setting.

mpogue2 commented 8 months ago

TODOs left:

The "Set Recent To..." is really needed, because it's super obnoxious when the green strikethrough strikes through a bunch of songs because I switched over to the Jokers Session to see what I had called already, and previewed a couple of songs, and found them marked already. Might need a preference or a toggle to turn off the green strikethrough, too...

The idea is good, but the execution is not complete yet, so it's not really usable yet, IMHO.

mpogue2 commented 8 months ago

Strikethrough is: "text-decoration: line-through;"

mpogue2 commented 8 months ago

Examples of line-through and background-color: image image

mpogue2 commented 8 months ago

And with the "other" shown: image

mpogue2 commented 8 months ago

Commit: a799b197cd161e06e36f7d2f14acd24436beeb3d

When a song has played in the current session for >=15 seconds, we'll overlay a green strikethrough, both in the darkSongTable and in the palette slots, to indicate that the song has been "played". Use "Clear Recent" to reset the fence to "now()", thereby removing the strikethroughs. Use "Don't Save Plays" to disable strikethrough (and, I think, recording plays to the current session).

I think we might want a user preference to View/Not View the strikethroughs. There's probably a valid use case where we want songs to be recorded against the session when played, but we don't want to see any green strikethroughs.

TODO: There is some duplicated code that I want to factor out when I have time, something like updateStrikethroughInPaletteSlots().

mpogue2 commented 7 months ago

There needs to be a way to disable this, because it's annoying when it's there and I am just poking around.

sharmanr commented 7 months ago

This maybe a bit off topic, but I've wanted for a long time is when in "practise" mode see what songs have not been played recently in a particular session. In other words, I'm getting ready for my Tuesday session and working on a playlist and would like to filter out songs "recently" played there.

I don't see an easy way of implement it.

mpogue2 commented 4 months ago

I think the basic idea has been implemented, so closing. Adding Richard's suggestion as a feature. Yeah, I want that feature too!