Morning all! I've been tinkering with the code last night, with the intention of being able to copy multiple tags from one track and paste them to another. My approach is to copy JSON into the clipboard:... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/ehXMZYTdmfnSThqmaBUAnlzO>)
2025-03-13 07247, 2025
stevilknevil[m]
* Morning all! I've been tinkering with the code last night, with the intention of being able to copy multiple tags from one track and paste them to another. My approach is to copy JSON into the clipboard:... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/xezvrWYRccXgQvrmLvMMKBzG>)
2025-03-13 07244, 2025
stevilknevil[m]
* Morning all! I've been tinkering with the code last night, with the intention of being able to copy multiple tags from one track and paste them to another. My approach is to copy JSON into the clipboard:... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/dGIvzufchameAkmlAoUexgtc>)
2025-03-13 07230, 2025
outsidecontext[m
stevilknevil: This would be really cool.
2025-03-13 07237, 2025
outsidecontext[m
It has been a while since I was dealing with Qt's clipboard implementation. But as I remember it can hold multiple data with different type. There is already the copy functionality in the metadata view, but it only copies the values as text, and I think also only a single value.
2025-03-13 07241, 2025
outsidecontext[m
So the way this should IMHO behave is to use the existing copy functionality, but extend it so it a) copies multiple selected values and b) also can copy the complex structure with tag names and multiple values with custom app specific mimetype.
2025-03-13 07214, 2025
outsidecontext[m
Just a side note: ~length is probably not an ideal example, as it would not be able to paste this.
2025-03-13 07210, 2025
NishantKumar[m] joined the channel
2025-03-13 07211, 2025
NishantKumar[m]
Hello everyone, I want to participate in GSoC 2025 with your organization and start my first contribution. However, I don't know how to proceed. Can anyone explain it to me a little bit?
2025-03-13 07205, 2025
stevilknevil[m]
@outsidecontext: Yep - I want to make sure `~length` is handled gracefully, but agree about it being a bad example! For reference this is what I have as a work in progress: https://github.com/metabrainz/picard/compare/mast…
<zas[m]> "outsidecontext: Bob Swift can..." <- zas: Actually I can reproduce it here on both Windows 10 (Python 3.9.13) and Linux (Ubuntu "jammy", Python 3.10.12).
2025-03-13 07240, 2025
zas[m]
Can you describe the exact steps? I prolly miss smt
2025-03-13 07216, 2025
BobSwift[m]
Load 2 audio files into the clustering pane. Don't cluster. Select both files. In the "New Value" column, right click the "Length" tag, and choose "Copy".
2025-03-13 07231, 2025
zas[m]
ah, ok, got it, thanks
2025-03-13 07201, 2025
zas[m]
So, what do we expect here? Copying doesn't make much sense anyway, and of course we don't want it to crash
2025-03-13 07241, 2025
BobSwift[m]
If it's being fed a list, it really shouldn't be doing anything. I haven't looked at the code that calls it, but if it's passing a list perhaps we could parse each list value individually (in the calling function)?
2025-03-13 07225, 2025
BobSwift[m]
I don't think the proposed solution in the PR makes any sense, because you are passing in multiple values and returning a single "?:??" response.
2025-03-13 07253, 2025
zas[m]
Nor I, and format_time() shouldn't hide such issue. The solution is to not call it at all if we don't have a single value.
2025-03-13 07241, 2025
zas[m]
Actually, we could allow copying multiple values, it could be convenient sometimes, like selected multiple files and copying a list of titles or mbids. So we could improve this a bit so it doesn't crash (of course), but copy all lengths for all selected items (not very useful in this case of course).
2025-03-13 07219, 2025
zas[m]
Focusing on the fix, I prepared a patch that checks TagCounter.counts, but while doing so, I see another possible improvement, adding a is_grouped property to TagCounter (somehow it is done, but only for https://github.com/metabrainz/picard/blob/bd6fb8d…