Comments (4)
I created a PR for the fix. The tests broke with the change because few of the sample mp3:s had the TDRC frame and did not previously find a year but now do. I just fixed those test fixture, didn't write any new tests for this.
All the tests pass for me locally at least (the PR didn't have permissions to run them yet).
I hope this helps! 👍
PS. Thank You for this library -- it's a great tool!
from tinytag.
Opening above 1s test file with following code:
from tinytag import TinyTag
tag2 = TinyTag.get('test.mp3')
print(tag2)
Outputs:
'Found id3 v2.4'
'Found id3 Frame TXXX at 20-38 of 2078'
'Setting field "text" to "major_brandmp42"'
'Found id3 Frame TXXX at 48-65 of 2078'
'Found id3 Frame TXXX at 75-103 of 2078'
'Found id3 Frame TPE1 at 113-126 of 2078'
'Setting field "artist" to "Test Artist"'
'Found id3 Frame TIT2 at 136-148 of 2078'
'Setting field "title" to "Test title"'
'Found id3 Frame TDRC at 158-164 of 2078'
'Found id3 Frame TSSE at 174-189 of 2078'
'Found id3 Frame at 199-199 of 2078'
{"album": null, "albumartist": null, "artist": "Test Artist", "audio_offset": 199, "bitrate": 115.2, "channels": 2, "comment": null, "composer": null, "disc": null, "disc_total": null, "duration": 0.1306122448979592, "extra": {"text": "major_brandmp42"}, "filesize": 2078, "genre": null, "samplerate": 44100, "title": "Test title", "track": null, "track_total": null, "year": null}
from tinytag.
I'm not too familiar with ID3 tags nor this repo but mapping "TDRC": "year"
in FRAME_ID_TO_FIELD
( https://github.com/devsnd/tinytag/blob/master/tinytag/tinytag.py#L484) seems to fix the issue. Not sure if it has any side effects, tho. I'm happy to write a PR if it helps 👍
from tinytag.
Looks like the TDRC
frame was added in ID3v2.4: https://eyed3.readthedocs.io/en/latest/compliance.html#v2-4-2-3-mappings
Since the README of tinytag mentions year or data as string
(should read date instead of data) after the year
attribute, I think your mapping should be enough.
from tinytag.
Related Issues (20)
- [BUG] struct.error: unpack requires a buffer of 4 bytes HOT 8
- Replace deprecated aifc module HOT 3
- [BUG] TDRC tag not captured as "year" HOT 2
- [BUG] Can't read `extra` tags from .m4a files HOT 1
- Expose a list of supported file extensions HOT 4
- Fail to read track_total, but it is ok in foobar
- asyncio interfaces HOT 3
- [BUG] Incompatibility with Python-pip HOT 2
- [BUG] `tags.year` is null although the MP3 file has the year set HOT 2
- [BUG] tinytag 1.10.0 aiff does not have extra data HOT 4
- Ability to get all images HOT 10
- Add support for ID3 Chapters (CHAP/CTOC) HOT 2
- [BUG] only get the first artist in multiple when read flac file HOT 7
- [BUG] non-existent tag content appeared in mp3 files
- [BUG] tinytag does not support certain non-ascii filenames HOT 1
- [BUG] ID3: Only first WOAR frame is kept HOT 16
- [BUG] Wrong duration using TinyTag.get HOT 5
- Please do not put the document of unreleased version on master branch
- Change DEBUG global name HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinytag.