Skip to content
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

FR: support for X/Y style TRACKNUMBER #5

Open
jamesyoungman opened this issue Jul 9, 2021 · 1 comment · May be fixed by #6
Open

FR: support for X/Y style TRACKNUMBER #5

jamesyoungman opened this issue Jul 9, 2021 · 1 comment · May be fixed by #6

Comments

@jamesyoungman
Copy link

I have FLAC files which look like this:

$ metaflac --list Aphex_Twin/Chosen_Lords/02-Reunion_2.flac
METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minimum blocksize: 4608 samples
  maximum blocksize: 4608 samples
  minimum framesize: 761 bytes
  maximum framesize: 16014 bytes
  sample_rate: 44100 Hz
  channels: 2
  bits-per-sample: 16
  total samples: 13932660
  MD5 signature: 169d402100e8b2b7f4a34be8f6e69d42
METADATA block #1
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 262
  vendor string: reference libFLAC 1.2.1 20070917
  comments: 9
    comment[0]: album=Chosen Lords
    comment[1]: discid=820d4b0a
    comment[2]: title=Reunion 2
    comment[3]: artist=Aphex Twin
    comment[4]: albumartist=Aphex Twin
    comment[5]: musicbrainz_discid=38zPtfQswmOKtZtgzc8Q3KV2KNo-
    comment[6]: artistsort=Aphex Twin
    comment[7]: date=2006-04-10
    comment[8]: tracknumber=2/10
METADATA block #2
  type: 1 (PADDING)
  is last: true
  length: 1006

audiotags's call to track_number() returns None in this case. I would prefer if it returnes Some(2).

My understanding is that this use of TRACKNUMBER may be non-standard but it's not uncommon. A number of other tools (easytags, for example) work successfully with files like this.

jamesyoungman added a commit to jamesyoungman/audiotags that referenced this issue Jul 10, 2021
This fixes TianyiShi2001#5

Example FLAC metadata using this style:

    comment[0]: album=Chosen Lords
    comment[1]: discid=820d4b0a
    comment[2]: title=Reunion 2
    comment[3]: artist=Aphex Twin
    comment[4]: tracknumber=2/10
pinkforest pushed a commit that referenced this issue Jul 31, 2022
* Add genre

Add genre tag

* Add some tests

Co-authored-by: Dalvany <9901407+Dalvany@users.noreply.github.com>
pinkforest added a commit that referenced this issue Jul 31, 2022
* Upgrade id3 from 0.5.1 to 1.0.3

* Upgrade mp4ameta from 0.6 to 0.11

* Copy test files to tmp directory before running tests

* Run GitHub actions on all PR

* Import @RodolpheThienard's duration (#4)

* give back the duration for mp4 and mp3

* calcul duration for flac

* adding set_duration

* fix duration for all extension

* Remove set_duration + reset test data

Co-authored-by: RodolpheThienard <thienard.rodolphe1@gmail.Com>

* Import @Dalvany's genre (#5)

* Add genre

Add genre tag

* Add some tests

Co-authored-by: Dalvany <9901407+Dalvany@users.noreply.github.com>

* Establish fork (#6)

* Adapt Cargo + License + Changelog

* Update GitHub actions to use actions-rs

* Fix formatting

* Fix clippy

* Re-fix formatting

* Adapt README.md

* Rename crate, update README.md

* Fix cargo test

* Fix clippy (again)

* Docs improvements

* Remove deprecated function

* Remove old documentation

* 0.3.1

* Re-merged Cargo.toml for 0.4.0

* Re-merged License

* Re-merge README.md

* Re-merge lib.rs tests

* Happy clippy is the best clippy

Co-authored-by: Pierre de la Martinière <pierre.de.la.martiniere@gmail.com>
Co-authored-by: RodolpheThienard <thienard.rodolphe1@gmail.Com>
Co-authored-by: Dalvany <9901407+Dalvany@users.noreply.github.com>
@nVitius
Copy link

nVitius commented Jun 14, 2023

I know this is an older issue, but I wanted to chime in on this.

It's definitely not an uncommon use-case. ototoy, for example, tags all their flacs with the %n/%x format for TRACKNUMBER. Also, it's common for vinyl recordings to be tagged with A1 or B1 as the TRACKNUMBER.

The vorbis comment spec does not specify that any of the fields need to be in a specific format, or that TRACKNUMBER should be an integer.

It might be complicated to change the return type of tag.track_number, but I think it makes sense for the tool to support what appears to be a common tag format.

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 a pull request may close this issue.

2 participants