Skip to content

APE track/disk numbers are not properly converted when writing #159

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

Closed
Serial-ATA opened this issue Feb 28, 2023 · 1 comment · Fixed by #216
Closed

APE track/disk numbers are not properly converted when writing #159

Serial-ATA opened this issue Feb 28, 2023 · 1 comment · Fixed by #216
Labels
bug Something isn't working

Comments

@Serial-ATA
Copy link
Owner

Reproducer

I tried this code:

use lofty::{Accessor, Tag, TagExt, TagType};

fn main() {
    let mut tag = Tag::new(TagType::APE);
    tag.set_track(5);
    tag.set_track_total(15);
    tag.save_to_path("foo.mp3").unwrap();
}

Summary

When using Tag, the track/disk numbers are not properly converted when saving to an APE tag. This is identical to #145, as it will be saved as two separate items: ........Track.5........Track.15.

This issue was fixed for ID3v2 in #149, which stores number pairs in the same format. The fix should be similar, if not identical.

Expected behavior

No response

Assets

No response

@Serial-ATA Serial-ATA added the bug Something isn't working label Feb 28, 2023
@uklotzde
Copy link
Contributor

Common functions and constants should extracted and shared, not duplicated. Maybe also some tests need to be generalized.

Serial-ATA added a commit that referenced this issue Jul 2, 2023
This also changes the default track/disk number to `DEFAULT_NUMBER_IN_PAIR`.

closes #159
Serial-ATA added a commit that referenced this issue Jul 4, 2023
This also changes the default track/disk number to `DEFAULT_NUMBER_IN_PAIR`.

closes #159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants