Bug 432269 - Custom Metadata field has to be added everytime
Summary: Custom Metadata field has to be added everytime
Status: RESOLVED FIXED
Alias: None
Product: kid3
Classification: Applications
Component: general (other bugs)
Version First Reported In: 3.8.x
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Urs Fleisch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-29 05:38 UTC by rexax007
Modified: 2021-12-18 03:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rexax007 2021-01-29 05:38:25 UTC
SUMMARY
It has to be added every time. Example, if I add a new field like Scale, then there should always be a option to add scale tag in future files without needing to add it again.

SOFTWARE/OS VERSIONS
Windows: 10
Comment 1 Urs Fleisch 2021-01-31 08:41:25 UTC
The set of unified frames as listed in the table in the handbook (https://docs.kde.org/trunk5/en/extragear-multimedia/kid3/commands.html#frame-list) can be added as "Quick Access Frames" (Tag 2 tab of the settings). However, "Scale" is not one of these unified tags. This restriction was made to have a more efficient implementation of the "Quick Access Frames" and make sure that they work with every tag format.
You could make your life easier by adding a user action with a keyboard shortcut and run a QML script adding your custom tags. Then you would just have to press a keyboard shortcut.
Comment 2 Till Schäfer 2021-03-17 16:51:08 UTC
I also would like this feature to be more flexible (I am missing several tags here, including Label and Organization).
Comment 3 Urs Fleisch 2021-10-16 19:58:22 UTC
I have now implemented this feature and released a development snapshot kid3-git20211016 in https://sourceforge.net/projects/kid3/files/kid3/development/.
You can add custom frames in the "Custom Frames" section of the "Tags/Tag 2" tab of the settings and then add these frames in the "Quick Access Frames". Please check if this solves this issue.
Comment 4 Till Schäfer 2021-10-16 23:05:40 UTC
I could not find the relevant commit. Can you give me a link to it? (Using a source distribution here and like to test it simply by patching my installation)
Comment 5 Urs Fleisch 2021-10-17 06:28:34 UTC
I forgot to push, you can now find it on master, there are three commits.

    git cherry-pick 8abfa709^..8b5213cf
Comment 6 Till Schäfer 2021-10-17 21:18:19 UTC
THX a lot! Works like a charm!

btw: time for a new release :) (running 3 patches now on top of current stable, which are all really nice improvements to my workflow)
Comment 7 Till Schäfer 2021-10-17 23:13:42 UTC
One minor thing i have noticed. 

The tags "Organization" and "Label" where already available when I clicked the  "Add"-Button. However, they where not available in the quick access frames section. 

Now, when I add "Organization" to my quick access frames I get different results than before when observing the result using metaflac. The Organization tag added as non custom frame was translated uppercase in the vorbis comment. After adding the custom frame, it stays capitalized with other letters lowercase. 

For example, in the follwing the comment 10 and 11 where added after adding the custom frame: 
$ metaflac --list --block-type VORBIS_COMMENT 01*
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 255
  vendor string: reference libFLAC 1.2.1 20070917
  comments: 12
    comment[0]: TITLE=Bionic Dog
    comment[1]: ARTIST=Oforia
    comment[2]: ALBUMARTIST=Oforia
    comment[3]: ALBUM=Off The Ground
    comment[4]: DISCNUMBER=1
    comment[5]: TRACKNUMBER=1
    comment[6]: COMMENT=Shangri-law
    comment[7]: GENRE=Goa
    comment[8]: DATE=1999
    comment[9]: PUBLISHER=NMC
    comment[10]: Label=NMC
    comment[11]: Organization=NMC


I fixed it by adding the custom frame in uppercase, but then the tag name in the GUI is also uppercase.
Comment 8 Till Schäfer 2021-10-17 23:15:29 UTC
(In reply to Till Schäfer from comment #7)
> Now, when I add "Organization" to my quick access frames I get different
-> s/quick access frames/custom frames/
Comment 9 Urs Fleisch 2021-10-18 14:40:35 UTC
Thanks for pointing this out. There are some frames which are not "unified frames", but translated (or in the case of English a bit better human-readable) such as "Organization" and a lot more, see `getDisplayNamesOfIds()` in frame.cpp. I will have a look at these, it should be possible to use these names as "Custom Frames" and get the correct behavior.

Concerning the release: Yes, I think that there are only a few more features I would like to consider before the next release, and it should be possible to publish it before the end of this year.
Comment 10 Urs Fleisch 2021-10-23 09:06:41 UTC
I have now improved the handling of custom frame names, so you can use internal frame names such as "ORGANIZATION" or translated names such as "Organization" and you will in both cases have the same frame added (internally named "ORGANIZATION" and displayed as "Organization"). It is now also possible to use other than user defined frames as custom frames such as "SYLT" for ID3 or "keyw" for MP4, probably all supported frames which are not unified frames.

Commit: f385b334f151901d393b477cd8e60c11474a6768
https://sourceforge.net/projects/kid3/files/kid3/development/: git20211023
Comment 11 Till Schäfer 2021-10-24 20:19:14 UTC
Thx for the update and your work. I have tested the patch and it works as expected here. 

I was wondering though if it is not possible to add the translated non-uniform frames to the set of quick access frames in the first place. Thus, it would not be necessary to define them as custom frames in order to add them to the quick access frames. This would align with the users experience when adding a new frame in kid3 directly via the add button.
Comment 12 Urs Fleisch 2021-10-25 18:48:35 UTC
You are probably right about adding the translated non-uniform frames to the set of quick access frames. If I would be writing the software from scratch, that would probably be the way to go. But in the state of the software with its 19 years of history, it is a bit more complicated. Some features are bound to the limited set of unified frames, not only the quick access frames, but also other areas where frame types can be selected. Having a limited enumeration of frame types makes quite a few things faster than having a more generic method to find out the type of a frame. The enumeration could be easily extended, but then there would be a lot of frames which only exist in one tag format, and the whole idea of "unified" frames and being able to convert between different tag formats would become less stringent. There are already a few "unified" frames which are not supported in all formats, but these are exceptions. And the other thing is, that there are a few operations which rely on the fact that the set of unified frames has not more than 64 entries - these operations use a 64-bit mask. Maybe today's CPUs could handle a less efficient implementation, but I think that the main use case of these bit mask, namely being able to select thousands of files without grinding Kid3 to a halt would not be possible with a dynamic solution, so after all, this old school programming might be not so bad after all.
Comment 13 Urs Fleisch 2021-12-18 03:41:50 UTC
Implemented in version 3.9.0.