Skip to content

Add the property API#47

Draft
jecaro wants to merge 3 commits intomrkkrp:masterfrom
jecaro:add-property-api
Draft

Add the property API#47
jecaro wants to merge 3 commits intomrkkrp:masterfrom
jecaro:add-property-api

Conversation

@jecaro
Copy link
Copy Markdown
Contributor

@jecaro jecaro commented Oct 13, 2025

This PR adds part of the property API of taglib.

The properties are basically a key/value map. The keys are strings and the values are list of strings. To keep up with the original design, one must create a getter for a specific property.

All the functions of the property API have been ported, but this one, as I don't need it:

/*!
 * Get the keys of the property map.
 *
 * \return NULL terminated array of C-strings (char *), only NULL if empty.
 * It must be freed by the client using taglib_property_free().
 */
TAGLIB_C_EXPORT char** taglib_property_keys(const TagLib_File *file);

But I can add it as part of this PR if you think that'd be needed to merge it.

For the context, I'm building a CLI tagger based on htaglib: htagcli. I need to access the albumartist tag, which is not exposed in the simple API. It is really a shame, as it is an important tag for organizing audio files.

@jecaro
Copy link
Copy Markdown
Contributor Author

jecaro commented Oct 13, 2025

Looks like this property API is not available in taglib 1.x, the version shipped with ubuntu-latest, which is 24.04, and taglib 2.x is not available on this Ubuntu version 😢

I guess we're good to wait for next Ubuntu LTS next year: 26.04

@jecaro jecaro marked this pull request as draft October 13, 2025 14:36
@jecaro
Copy link
Copy Markdown
Contributor Author

jecaro commented Oct 13, 2025

I just tried this branch in my project, and it crashes.

Marking as draft, I guess it's not quite ready yet anyway 😅

@jecaro
Copy link
Copy Markdown
Contributor Author

jecaro commented Oct 13, 2025

Ok. That one is fixed with 13d5981

I'll start using this branch in my project.

I leave it as a draft for now, as there is still the issue with Ubuntu anyway.

Once I find it stable enough for my project, I'll remove the draft flag.

@mrkkrp
Copy link
Copy Markdown
Owner

mrkkrp commented Oct 14, 2025

Hey, thanks for this PR! Let me know when you deem it ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants