Fill the osu! creator and tags from the simfile - #331
Open
MAX-WiRED wants to merge 1 commit into
Open
Conversation
Two fields of the metadata block are written blind:
Write(out, "Creator", chart ? chart->artist : "Unknown");
Write(out, "Tags", "");
so a map exported from here is by "Unknown" and carries no tags, though
the simfile usually knows both.
A StepMania file names the author in #CREDIT more often than per chart,
so the creator falls back to it when the chart itself says nothing, and
is left empty rather than filled with a placeholder when neither does.
That is also what the exported filename uses, so the two agree.
#GENRE is the closest thing a simfile has to the keywords osu! puts in
Tags, and it is otherwise dropped on export.
BeatmapID and BeatmapSetID are left alone: 0 and -1 is what osu! writes
for a map that has not been submitted, which is what these are.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fields of the
[Metadata]block are written blind:so a map exported from here is by
Unknownand carries no tags, though thesimfile usually knows both.
Creator
A StepMania file names the author in
#CREDITmore often than per chart -chart->artistis empty in most files - soUnknownis what nearly everyexport gets. The creator now falls back to the credit of the song, and is left
empty rather than filled with a placeholder when neither is set.
This is the same value the exported filename uses, so the name of the file and
the field inside it agree.
Tags
#GENREis the closest thing a simfile has to the keywords osu! puts inTags, and it is otherwise dropped on export - nothing else in the.osucarries it.
What is left alone
BeatmapID:0andBeatmapSetID:-1stay as they are: that is what osu! writesfor a map which has not been submitted, which is what an export from here is. I
checked a few hundred local beatmaps to be sure rather than guess - every
unsubmitted one has exactly that pair.
Versionalso stays as it is. A simfile has no free-form difficulty name toput there -
#SUBTITLEbelongs to the song rather than the chart, so using itwould give every difficulty in the set the same
Version.Testing
Built on Windows with clang-tidy and clang-format enforced, as the build does.
A song with
#GENRE:witch house, russian, tiktok;and#CREDIT:WiRED;, whosechart has no step artist, exports as:
Before the change the same file gave
Creator:Unknownand an emptyTags.