ghDaYuYu / foo_discogger

Discogger
56 stars 0 forks source link

Separator in modified multi-value tags #79

Closed username116 closed 1 year ago

username116 commented 2 years ago

Hello,

I have a problem with Style tag (maybe Genre too) that have multiple values. If I manually change a value before saving, I think the separator ";" is not interpreted as a separator. For example here in the Style tag, I replaced a value "Classical" by "Modern Classical". I then show the result in Mp3Tag, and finally how I think it should be. Tested with foo_discogger 1.0.14 and foobar 2.0 beta 10 x86 Capture d'écran 76 foobar2000 Capture d'écran 77 foobar2000 Capture d'écran 80 Mp3tag modif Capture d'écran 81 Mp3tag modif

I think I saw a spelling mistake here. Shouldn't it be "Apply" instead of "Appy"? Capture d'écran 79 foobar2000 2

ghuDaYuYu commented 2 years ago

Hello, thanks for your feedback.

Yes, that 'Appy' should be 'Apply', also edited multi-values need to be trimmed,

Those two fixes will be included in 1.0.14.1.

About the current issue, unfortunately I can´t reproduce it here, just getting the results as you mentioned they should be (STYLE, DISCOGS_STYLE and GENRE).

Have you tried to edit DISCOGS_STYLE from the fb2k properties panel instead, does it make any difference?

ghuDaYuYu commented 2 years ago

Oh, I see... the bug might be in the Edit (in-place) in the preview panel, not the detailed preview. That Appy🍎 misled my tests... I´ll try to fix it as soon as possible, thanks!

username116 commented 2 years ago

Yes, I used the properties panel of foobar2000, in fact it's by making a modification with it in DISCOGS_STYLE that I got the "correct result" (fourth screenshot), the semicolons interpreted as separators. I guess I would have the same result with the separator \\ in Mp3Tag. I show the results in Mp3Tag because I think the difference is not well visible in foobar2000, if I remember correctly in both cases foobar shows the values on one line with semicolons.

The tags DISCOGS_ARTIST_ID;DISCOGS_GENRE;DISCOGS_STYLE; are added in my foobar2000 settings : Preferences > Advanced > ... > Multivalue fields.

Sorry if I'm not very clear. I also use a translator. "Appy" is not the same issue, sorry. I hesitated to make two separate issues, now I know I should have.
If you have seen... then it's ok. Thanks a lot.

username116 commented 2 years ago

Yes it happens when I make an edit with a click on the line (with the "Results" view), like this:

Capture d'écran 82 modif

So yes, that's the Edit (in-place) in the preview panel. I could have been clearer.

ghuDaYuYu commented 2 years ago

It´s a great bug report! I should apologize I dont use the translator and grammar checker as often as I should! ... and of course the bug being reported is quite embarrasing indeed!

Below you can find 1.0.14.1 prelease, in case you´d like to give it a try and confirm it's working, maybe new bugs have been introduced...

Both preview and detailed preview were buggy, so there is an attempt to fix that, trimming values and the spelling.

For this pre-release, I had to define a reduced set of multivalue fields, though:

"ARTIST", "ALBUM ARTIST", "PRODUCER", "COMPOSER", "PERFORMER", "GENRE", "STYLE", "DISCOGS_GENRE", "DISCOGS_STYLE"

It will be great if you'd like to test this fix, but no obligation ☺️

Thanks again for your feedback, I am glad having a multivalue related topic being reported.

zipped 1.0.14.1 preview.zip

username116 commented 2 years ago

I tried the 1.0.14.1 preview version. When I edit the tags of one file, it seems to be fine. I looked in Mp3Tag.

With several files (two or ten), "Write tags" does not work.

Capture d'écran 84 foobar2000

Capture d’écran 2022-09-25 204524

DISCOGS_GENRE and DISCOGS_STYLE, these are my personal settings. The default tags used by Discogger are GENRE and STYLE. I have remapped them to DISCOGS_GENRE and DISCOGS_STYLE. I separate Discogs genres from my own tags. I also tried the default tags GENRE and STYLE, and it crashes too.

The picture of your profile is an album of Rita Mitsouko I think. Do you speak French? I do. L'image de votre profil est un album des Rita Mitsouko il me semble. Vous parlez français ? Moi oui.

ghuDaYuYu commented 2 years ago

Je comprends et parle un peu, mais je ne l'écris pas, en fait, je ne sais pas comment écrire dans une langue, je pense. J'ai adoré l'attitude de Rita quand nous étions plus jeunes, et je suis toujours un fan. Ma langue maternelle est l'espagnol... il peut être plus approprié comme documentation continuer avec l'anglais mais vous pouvez écrire dans la langue que vous souhaitez, bien sûr. Il n'y a pas beaucoup de gens ici et je ne pense pas que ce soit une poblema.

Creo que he resuelto algunos fallos...

I can not replicate those last two errors, fatal error and crash on this new 14.2

Fixing last preview:

Give it a try, if you like... no hurry, I might post a few more pre-releases here as I find time to continue testing.

Je vous remercie beaucoup pour votre aide!

Edit:

Edit2: fixed version id, added multivalue configuration preference

multivalue_cfg

zipp 1.0.14.2 preview.zip

username116 commented 2 years ago

I understand for Rita Mitsuko. They made some hits that are quite famous. I think technology is great for that. You can talk to people who have a different language and who are on the other side of the world.

Long story short: it works, except if I remap the tags. I tried version 1.0.14.2 preview with a new portable installation of foobar2000 2.0 beta 10 x86. I didn't have any crash.

When I don't edit the values, it works, the values are well separated, like before. When I edit the values:

I hope I didn't make mistakes in my tests.

If it's useful for you, and you use Mp3tag : you can easily see the difference in the Genre and Style columns, or create a column for custom tags with this formula $meta_sep(discogs_genre,\\). I think the same kind of thing can be done in foobar.

Capture d'écran 92 Mp3tag Capture d'écran 95 Mp3tag Capture d'écran 97 Mp3tag

DISCOGS_ARTIST_ID is regularly multi-value I think, when there are two artists on the song for example.

I saw another error. I try to export the Tag mapping configuration, it doesn't work. The console doesn't say anything. Maybe it needs to open another issue, but I only tried with the last preview.

Capture d'écran 86 foobar2000 Capture d'écran 96 foobar2000

Thanks for your work.

username116 commented 2 years ago

I made an edit on my previous post:

ghuDaYuYu commented 2 years ago

Thanks for the update 👍

Yes, the multi-value fields value was applying its default value instead of the user defined, etc

This new release, should fix the custom multi-value field, the tag mapping import/export dialog has also been patched, thanks for noticing.

The component now logs tag write operations to the console:

log

Just bare bone, but should provide some clues.

Also, to help troubleshooting, the preview panel stays open after clicking Write tags

dsk

... and a new option to copy values to the lead-in tab in the detailed preview.

copy to lead-in

That´s it for now... I am also using Mp3Tag as in your recommendation, thanks!

zipped 1.0.14.2 preview.zip

ghuDaYuYu commented 2 years ago

Hi, been reading, with a bit more time, from the beginning, checking how this issue is getting resolved.

This bug was found and fixed, it did affect the first item in a selection

It can be seen in your screen capture that pressing enter in DISCOGS_STYLE triggers an edit of the field below, DISCOGS_RELEASE_ID. That crashed as that field is protected. Bug was introduced while updating UI to dark mode. Should be fixed now.

That is still unresolved, it might be worth to comment that currently, when the Tag mapping is committed (by applying changes in the tag mapping panel) all manual edits are invalidated and replaced by the generated values. That is the reason for the foot note in the detailed preview panel 'Values subjected to tag remapping'. Not sure if that will change soon. I would like to implement a right-click option to write individual tags in the normal preview panel first.

I wouldn´t bother much about confusion with the words just now, sometimes a bit of confusion or misunderstanding can´t be that bad.

That would depend, in my opinion, if that´s helpful somehow (needed by an app, script, layout...). Related to this, there might be a bug showing in my last screenshot log, as it seams it shows a non-multivalue tag being saved as being one.

username116 commented 2 years ago

I tried the latest version. Editing values with remapped tags works. The export / import of the tag mapping works.

There is a detail that surprised me the first time, because the window stays open now. When I edit the values, I set the radio button to "Results". After clicking on "Write tags", my edits are no longer displayed, the values revert to the Discogs values. However, my edits are saved, I can see them when I put the radio button on "Original". I don't know, maybe it's good like that. It's a detail.

For me it works fine now. The issue can be closed if you want. Thank you very much.

ghuDaYuYu commented 2 years ago

Trim as remove any leading or trailing spaces, haha

Yes, you are right. Once you save your edits, they become the original. Sadly, the Write tags button will close the dialog as before in the next release.

Maybe the issue can remain open until v1.0.15 release date...

... et merci beaucoup pour votre aide, nous avons trouvé de nombreux bugs qui sont passés inaperçus, jusqu'à la prochaine fois!

ghuDaYuYu commented 2 years ago

Changes:

tagging_preferences

Fixes:

Todo:

zipped 1.0.14.3

username116 commented 2 years ago

I have again crashes and error messages with your latest version. Tested with a new foobar2000 portable v2.0 beta 10 x86 + Discogger 1.0.14.3pr Without remapping to custom tags, without modification of the values, when I click on "Write tags" in the preview panel. It seems to be different if there are one or more files selected. Sometimes a crash, sometimes an error message, I don't know where the difference between the two comes from.

Capture d'écran 98 foobar2000

failure_00000001.zip

ghuDaYuYu commented 2 years ago

geesh! my bad... I had to undo a very (VERY) old fix to continue with these multi-value fix series, Unfortunately we are downgrading next release to alpha now, total uncertainty!

I fixed the crash affecting the Origamibiro release, thanks for the crash report.

... and here is 1.014.4 alpha, quite miraculous if it´s not crashing now and them, sorry.

zipp 1.0.14.4 alpha

I will refrain from posting 14.5 until I find time for a complete testing. but feel free (if not exhausted yet) to run if you are curious about were it crashes next! 💯

ghuDaYuYu commented 2 years ago

Fixes:

Other fixes/revisions:

zipped 1.0.14.5 prerelease

username116 commented 2 years ago

I'm trying it with remapped tags and modified values. It only works if the new box "Auto-update fields while saving Discogs tags" is checked. I don't know if this is normal. I try to do this:

Capture d'écran 104 foobar2000

With these settings:

Capture d'écran 102 foobar2000

After clicking on "write tags", the tags DISCOGS_GENRE and DISCOGS_STYLE are empty. The console says that. If I check the box "Auto-update fields..." and try again, it works.

ghuDaYuYu commented 2 years ago

Thanks for the test case, brief and to the point...

These are my results after 14.6 fixes, with auto-update fields turned off:

log saving unaltered results: log_write_res.txt log updating: log_update.txt log writing & updating in one go (user case in your post) log_write_res_and_edited.txt

Still need to test if editing from the detailed preview is bug free.

I'm trying it with remapped tags and modified values. It only works if the new box "Auto-update fields while saving Discogs tags" is checked. I don't know if this is normal.

No, there was a bug, forgot to disable it while testing... should be fixed now. Looking now at the config panel, it might be also helpful to add an option to disable all multi-value fields.

It seams that v1.0.14.3 was not as broken as I initially though, maybe problems will arise tagging specific releases.

Here is a brief 14.6 change log:

Fixes:

Other fixes:

zip 1.0.14.6 prerelease

username116 commented 1 year ago

I tried the 1.0.14.6 prerelease with the same albums, with edited values, with and without the checkbox. I also tagged some other albums. It worked, no bugs to report. The Auto-update function which adds itself a multi-value tag in the setting worked too.

Thanks for all the improvements.

ghuDaYuYu commented 1 year ago

You are welcome! Closing with v1.0.14.7