mpogue2 / SquareDesk

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

Bug: Save lyrics does not save #798

Open Gero5 opened 1 year ago

Gero5 commented 1 year ago

Here is why I lost my first four files of lyrics editing: After editing the lyrics I pressed the Save-button assuming it would save the lyrics. And the impression is exactly that is does. the save buttons are hiding and the "unlock" button is back on. But the changes are not saved. But why is this an active button if it has no function? solutions:

But I would rather see another more user friendly concept for this. Why do I have "unlock" the lyrics? I think the danger of accidentally changing the lyrics unwillingly is rather small. here is what I like it to be: As soon as the user clicks into the yellow area and types or modifies text: the system would auto save it as lyrics for the particular song. If the lyrics file does not exist use the default file name for lyrics .html and create the file. See #796

mpogue2 commented 1 year ago

If I understand your symptoms correctly, I think there are a couple of bugs here, and they are a use case that I don't think I've ever tested before (which is why there are several bugs here, maybe?).

Please confirm that the use case below is correct as I've described it!

Did I get that right?

Here's a short term workaround, until I can address this use case better:

Hope this helps!

Gero5 commented 1 year ago

the workaround works around. thank you.

mpogue2 commented 1 year ago

re: "is there a public library for sd lyrics?"

Older versions of SquareDesk had a menu item that would automatically download cuesheets that match the files in your music directory. You might want to see if it's there in version 0.9.5, and try it!

Otherwise, the last time I batched up large numbers of cuesheets, was a long time ago, but you might find this ZIP file useful:

https://raw.githubusercontent.com/mpogue2/SquareDesk/master/SqViewCueSheets_2017.03.14.zip

If you unzip it, and stick the "Text" folder into your lyrics folder inside your music directory, SquareDesk will attempt to match them up with the 500 songs you have.

mpogue2 commented 1 year ago

Yes, the UNLOCK button changes to Blue, which is not intended behavior. It does not do that if you unlock a cuesheet that is already linked (by SquareDesk) to a music file. So, this is a use case I'll need to try to debug.

And, thanks for the detailed answer!

Gero5 commented 1 year ago

re: Older versions of SquareDesk had a menu item that would automatically download cuesheets that match the files in your music directory. You might want to see if it's there in version 0.9.5, and try it!

Tried. Does nothing for me. my file names are the song name without record label and with some capital letters (Amarillo By Morning.mp3). Maybe the search is missing a key for matching? or my records are just too old... On the other hand "Amarillo By Morning" could find a match if I interpret the default lyrics sheet right.

Gero5 commented 1 year ago

re: https://raw.githubusercontent.com/mpogue2/SquareDesk/master/SqViewCueSheets_2017.03.14.zip

Wow. This is huge.

re: If you unzip it, and stick the "Text" folder into your lyrics folder inside your music directory, SquareDesk will attempt to match them up with the 500 songs you have.

I did that while v 0.9.5 was running. it is showing the colored ball for minutes now using up to "100,7" percent of CPU (would you believe that that is possible) due to activity monitor. Killed the process after 10 minutes of waiting. I think the matching algorithm has room for optimization for this use case. i. e. copy "text" directory in the SDMusic folder, rename "lyrics" to "lyrics_old", rename "text" to "lyrics". Bildschirm­foto 2023-03-28 um 10 05 01

After restart the Lyrics tab has a little asterisk in front of the text and a lot of the lyrics are found. Great relief. Awesome. Thank you.

next question: Is there an easy way to identify songs in the list that have no lyrics?

mpogue2 commented 1 year ago
  1. Try File > Download Matching Cuesheets.... This option will try to download just what it thinks might match. The list of cuesheets is the same as what was in the enormous zip file, if I recall correctly. I had forgotten about this option! I don't know if it still works, but it's worth a try.

  2. I don't know why it took >100% of CPU time when the large ZIP file was installed, but that sounds like a bug. Try the Download Matching Cuesheets option, and see if it goes faster (it should, assuming that it is still working)!

  3. There is no way that I know of to identify songs in the list that have no lyrics. We just don't have anything like that implemented (maybe this could be a feature request?). This is probably because almost all callers make heavy use of purchased music, and those purchased MP3 files almost always come with cuesheet files for singing calls. You are probably unique in using your own recordings, which a) do not come with cuesheets, and b) whose filenames do not follow any of the typical music producer naming conventions.

Gero5 commented 1 year ago

re: Try File > Download Matching Cuesheets.... You mentioned that before. I tried it but it has absolutely no results for me. No cue sheet was found at all. I think it is not working any more. Should I open an issue for that?

re: I don't know why it took >100% of CPU time when the large ZIP file was installed, I expanded the zip file first to over 10'000 single files. then renamed the folder to "lyrics". Is it possible that SquareDesk was performing 10'000 update events due to this?

After the restart I find a cue sheet to almost every song that has no typos in the name. That is great. The lyrics folder with the 10'000 cue sheets is 44 MB. it is a big library but concerning disk space I can live with that. Do you think the 10'000 cue sheet are causing performance trouble for SquareDesk?

re: no way to identify songs in the list that have no lyrics. (maybe this could be a feature request?) No. I don't think so. This would a feature just for me.

danlyke commented 1 year ago

We've had some challenges before with the file updates mechanism, so, yeah, if we got in some pessimal loop of update notifications because of 10k new files and attempting to re-read the direction ten thousand times, I could believe that's a problem.

Maybe I'll put a little time into the directory watcher. At the very least, we should debounce it. This might also be a reason to go to the model-based table view that we've talked about for other reasons but never made the leap on. Message ID: @.***>

mpogue2 commented 1 year ago

@danlyke I believe it's already debounced....I did that a while ago. See MainWindow::musicRootModified(), which doesn't trigger the actual FileWatcher processing until 500ms after the last time something in the musicRoot was modified...

The right solution for this problem is probably to make Download Matching Cuesheets work again...the normal case of dropping files into the musicRoot is OK now I think.

mpogue2 commented 1 year ago

OK, here's why Download Matching Cuesheets does not work right now.

mpogue2 commented 1 year ago

Download Matching Cuesheets fixed by: 9a30ed67f6505cc567a533808679e21912adfc5c

NOTE: These cuesheet files are quite old now (6 years), and they should be refreshed. I had permission to use these from the original cuesheet consolidators, so it should be a matter of getting the new files, and pushing them to SquareDesk.net .