-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track colors are lost when importing metadata #11213
Comments
Do you have checked any of the Serato options in Preferences > Library? |
No, I don't use the Serato options. I tried enabling them to see what happens and the behavior is similar, colors get reset when reimporting metadata, even if the files did not change at all. The exception is that with "Write Serato metadata to files" enabled, I can now keep the colors when reimporting metadata only as long as I do "Export to file tags" first. This stores the colors in the Serato tags within the file and I though it could be a viable workaround. Unfortunately, other tools (puddletag, easytag, etc.) strip the Serato data when modifying tags so I still can't add a comment outside Mixxx without loosing the colors. |
Hmm, if there aren't any serato tags in the file IMHO the track color should not be reset. The color should only be reset if there is serato data in the file, and that data says that the color is "no color". |
I can reproduce this every time:
Colors gone. I just compiled and tested 2.5.0-alpha (current master, 09b2f61) and I get the same results. EDIT: While at it, I am trying to debug Mixxx. The code at // Import track color from Serato tags if available
const auto newColor = m_record.getMetadata().getTrackInfo().getSeratoTags().getTrackColor();
const bool colorModified = compareAndSet(m_record.ptrColor(), newColor);
modified |= colorModified;
DEBUG_ASSERT(!colorModified || m_record.getColor() == newColor); This code runs even without "Synchronize Serato tag metadata" enabled and with no Serato metadata in these files. The |
I think we need an additional |
The const bool colorModified = newColor.has_value() && compareAndSet(m_record.ptrColor(), newColor); I tried this and it solves the issue for me. Not owning any Serato products to test the ramifications of this (or being certain that it's kosher C++) I reckon that a PR would just get in the way. |
This is not a proper fix because Hence, we either need a helper function to check if a track color is present in the tags or change the signature of |
When metadata for a file without Serato tags is reimported, the track color is reset. This happens, because there is currently no way to distinguish the case where no track color is set because the file does not contain any Serato tags from the case where the file contains Serato tags and the track color has been set to "no color" in Serato (i.e. the stored color value is `0xFFFFFF`. This fixes the issue by replacing the `RgbColor::optional_t` value with a `std::optional<RgbColor::optional_t>` to separate the 3 cases: 1. If the outer optional is `nullopt` , there is no track color present in the tags. 2. If the inner optional is `nullopt`, there is a track color present in the tags, and that color is "no color". 3. If the inner option holds a value, there is a track color with that RGB color value present in the tags. Fixes mixxxdj#11213.
Bug Description
When doing "Metadata > Import From File Tags" on an MP3 track in the library, the colors I've applied to my track are reset.
Since colors are not stored in MP3 files' tags, I expect them to stay as they set in Mixxx's DB, the same way that the BPM lock, the Date Added, etc. stay unchanged.
Adding tags (e.g. a comment) outside Mixxx during preparation and then importing the metadata should be possible without unexpectedly loosing the assigned track colors.
Version
2.3.3
OS
Debian bookworm
The text was updated successfully, but these errors were encountered: