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/...>)
* 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/...>)
* 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/...>)
outsidecontext[m
stevilknevil: This would be really cool.
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.
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.
Just a side note: ~length is probably not an ideal example, as it would not be able to paste this.
NishantKumar[m] joined the channel
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?
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/ma...
<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).
zas[m]
Can you describe the exact steps? I prolly miss smt
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".
zas[m]
ah, ok, got it, thanks
So, what do we expect here? Copying doesn't make much sense anyway, and of course we don't want it to crash
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)?
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.
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.
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).
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/bd6fb...