Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

How does the metadata of a certain title formatted? #283

Answered by hkalexling
rareguy asked this question in Q&A
Discussion options

I read from the Wiki/Readme/Issues that the metadata is stored in info.json, but I didn't see any info.json when Mango has correctly imported a title. I would like to add tags on each title with Python script, but there's no documentation regarding tags and how to add tags to the metadata, which I assume is info.json.

Or if I have the assumption of metadata wrong, and instead Mango just reads the existing info.json and imported it to the one of the .db file in the root directory, how do I make the tags that I made acceptable for the database?

Thank you!

You must be logged in to vote

Oh yes unlike other metadata the tags are stored in the tags table in SQLite DB. The default location is ~/mango/mango.db. You can find the table definition here:

https://github.com/hkalexling/Mango/blob/a1015266725566641f749f527fcc7f03bb68df6f/migration/tags.4.cr#L4-L10

The id column is the title ID. You can get a title ID by either reading the titles table in the same DB file or using the /api/library endpoint. Check <your instance>/api for the documentation.

Replies: 2 comments 3 replies

Comment options

Oh yes unlike other metadata the tags are stored in the tags table in SQLite DB. The default location is ~/mango/mango.db. You can find the table definition here:

https://github.com/hkalexling/Mango/blob/a1015266725566641f749f527fcc7f03bb68df6f/migration/tags.4.cr#L4-L10

The id column is the title ID. You can get a title ID by either reading the titles table in the same DB file or using the /api/library endpoint. Check <your instance>/api for the documentation.

DeepinScreenshot_select-area_20220310123902

You must be logged in to vote
0 replies
Answer selected by rareguy
Comment options

Thank you!

By the way when I was troubleshooting this, I just found an issue that if info.json already exists in the library folder, Mango will overwrite it with its own info.json. Is it the expected behaviour?

You must be logged in to vote
3 replies
Comment options

What's in the original info.json file? Mango should be able to parse and then update it.

Comment options

I was meddling around with info.json, probably I made a bug in the json formatting and Mango just reset it?

Comment options

Ah right that's probably it. If Mango fails to parse the file it will just regenerate a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /