TagStudio icon indicating copy to clipboard operation
TagStudio copied to clipboard

[BUG] Adding a new tag with multiple file selected only adds it to a single file

Open ookami125 opened this issue 1 year ago • 8 comments

System Details: System: Garuda Linux (Arch) Python version: 3.11.8 TagStudio Version: 6c5f0c2 (main)

Expected: When multiple files are selected and a tag is added to a field that all files have, it should be added to all files.

Actually happens: The tag is only added to the first file selected in the multi select.

Side note: This also leads into the suggestion that when multiple files are selected they should show the intersection of all tags instead of only displaying "Mixed Data" this could allow for removing of tags from a bunch of files that don't share all of their tags.

Last: Also just wanted to say thanks for open sourcing this, over the next few days I'm going to read over the code base and look into the audio waveform generation as I mentioned in my comment on youtube.

ookami125 avatar Apr 23 '24 04:04 ookami125

Thanks for opening this issue! It's something I've known about but didn't get around to fully implementing before open sourcing. And I agree, having the intersecting tags visible for modification would be great! I'll be making this a high priority to get to.

Hopefully creating audio waveform thumbnails will be easier than sorting out the mess that's causing this issue 😉 I appreciate the help!

CyanVoxel avatar Apr 23 '24 04:04 CyanVoxel

Can't say it's pretty, but here is a quick and dirty way to allow adding tags to multiple selections. https://github.com/CyanVoxel/TagStudio/compare/main...ookami125:TagStudio:main It doesn't fix the mixed data issue yet, which is half of it. But if it looks good enough to you I can make it into a PR. Also don't know what's going on yet, but saving seems to be broken in some way. Nothing seems to save. But I don't know if that's due to linux or not yet. I'll make a PR when I figure out more.

ookami125 avatar Apr 23 '24 05:04 ookami125

Oh no, saving's kinda important... I've been worried about any code that writes files on Linux, I wouldn't be surprised if I need to tweak something. And I'll give this code a look!

CyanVoxel avatar Apr 23 '24 05:04 CyanVoxel

Cool, I'll look over the saving code after work tomorrow. Is there any easier way to talk other than github issues? I don't know if you have a discord server or anything that would work. If not I can just drop my discord username and edit it out later.

ookami125 avatar Apr 23 '24 05:04 ookami125

Slight update on the saving issue, it's partially saving. The files are there and they have the 2 custom tags I made. But adding a field isn't getting saved (even after hitting the Save Library button) and loading the existing tags isn't working either.

ookami125 avatar Apr 23 '24 05:04 ookami125

Cool, I'll look over the saving code after work tomorrow. Is there any easier way to talk other than github issues? I don't know if you have a discord server or anything that would work. If not I can just drop my discord username and edit it out later.

Oh, yeah! I opened up a discord server today, actually! It's been so hectic with the launch of both and going back and forth between issues that I assumed you must've already been in it! Here's the invite: https://discord.gg/NrqeQKFP6s

CyanVoxel avatar Apr 23 '24 05:04 CyanVoxel

Slight update on the saving issue, it's partially saving. The files are there and they have the 2 custom tags I made. But adding a field isn't getting saved (even after hitting the Save Library button) and loading the existing tags isn't working either.

Interesting, a bit worrying, but interesting... I'm not sure what might be causing it to only save some parts, but I'll have a look as well when I can

CyanVoxel avatar Apr 23 '24 06:04 CyanVoxel

thank you for making this CyanVoxel, this is arguably one of the best organization tools yet!

unfortunately I'm not very familiar with python so I can't really help out

would appreciate this being fixed, my current workaround is to use a lua script to edit JSON file or ~~ask ChatGPT to add the tags to all entries~~

CLI would also be appreciated so I can use it with lune

RuizuKun-Dev avatar Apr 25 '24 06:04 RuizuKun-Dev

This was resolved by #34

Loran425 avatar May 04 '24 18:05 Loran425