Repository: devsnd/tinytag

Issue:
[BUG] Parsing mp3 file w/ valid TDRC tag does not populate year
**Describe the bug**

When parsing a mp3 file w/ valid v2.4 metadata and a TDRC frame, TinyTag does not populate the year attribute in the output.

**To Reproduce**

Steps to reproduce the behavior:

1. Open a valid mp3 file w/ TinyTag
2. See `Found id3 Frame TDRC` in the program output
3. Resulting dict still has `"year": null`

**Expected behavior**

Valid timestamps (yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm
and yyyy-MM-ddTHH:mm:ss) should result in year attribute populated.

**Sample File**

https://www.dropbox.com/s/lz6vlzhw18znqp8/cdwal5Kw3Fc.mp3?dl=0

Comments:

Patch:
diff --git a/README.md b/README.md
index 39bfda9..cec3e9d 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,7 @@ List of possible attributes you can get with TinyTag:
     tag.title         # title of the song
     tag.track         # track number as string
     tag.track_total   # total number of tracks as string
-    tag.year          # year or data as string
+    tag.year          # year or date as string
 
 For non-common fields and fields specific to single file formats use extra
 
diff --git a/tinytag/tinytag.py b/tinytag/tinytag.py
index 66fff62..a581e66 100644
--- a/tinytag/tinytag.py
+++ b/tinytag/tinytag.py
@@ -484,7 +484,7 @@ class ID3(TinyTag):
     FRAME_ID_TO_FIELD = {  # Mapping from Frame ID to a field of the TinyTag
         'COMM': 'comment', 'COM': 'comment',
         'TRCK': 'track', 'TRK': 'track',
-        'TYER': 'year', 'TYE': 'year',
+        'TYER': 'year', 'TYE': 'year', 'TDRC': 'year',
         'TALB': 'album', 'TAL': 'album',
         'TPE1': 'artist', 'TP1': 'artist',
         'TIT2': 'title', 'TT2': 'title',


Test patch:
diff --git a/tinytag/tests/test_all.py b/tinytag/tests/test_all.py
index abbb5dc..743e48b 100644
--- a/tinytag/tests/test_all.py
+++ b/tinytag/tests/test_all.py
@@ -73,7 +73,7 @@ testfiles = OrderedDict([
     ('samples/utf-8-id3v2.mp3',
         {'extra': {}, 'genre': 'Acustico',
          'track_total': '21', 'track': '01', 'filesize': 2119, 'title': 'Gran día',
-         'artist': 'Paso a paso', 'album': 'S/T', 'disc': '', 'disc_total': '0'}),
+         'artist': 'Paso a paso', 'album': 'S/T', 'disc': '', 'disc_total': '0', 'year': '2003'}),
     ('samples/empty_file.mp3',
         {'extra': {}, 'filesize': 0}),
     ('samples/silence-44khz-56k-mono-1s.mp3',
@@ -88,10 +88,11 @@ testfiles = OrderedDict([
          'track_total': '12', 'genre': 'AlternRock',
          'title': 'Out of the Woodwork', 'artist': 'Courtney Barnett',
          'albumartist': 'Courtney Barnett', 'disc': '1',
-         'comment': 'Amazon.com Song ID: 240853806', 'composer': 'Courtney Barnett'}),
+         'comment': 'Amazon.com Song ID: 240853806', 'composer': 'Courtney Barnett',
+         'year': '2013'}),
     ('samples/utf16be.mp3',
         {'extra': {}, 'title': '52-girls', 'filesize': 2048, 'track': '6', 'album': 'party mix',
-         'artist': 'The B52s', 'genre': 'Rock'}),
+         'artist': 'The B52s', 'genre': 'Rock', 'year': '1981'}),
     ('samples/id3v22_image.mp3',
         {'extra': {}, 'title': 'Kids (MGMT Cover) ', 'filesize': 35924,
          'album': 'winniecooper.net ', 'artist': 'The Kooks', 'year': '2008',
@@ -189,7 +190,7 @@ testfiles = OrderedDict([
     ('samples/id3v24_genre_null_byte.mp3',
         {'extra': {}, 'filesize': 256, 'album': '\u79d8\u5bc6', 'albumartist': 'aiko',
          'artist': 'aiko', 'disc': '1', 'genre': 'Pop',
-         'title': '\u661f\u306e\u306a\u3044\u4e16\u754c', 'track': '10'}),
+         'title': '\u661f\u306e\u306a\u3044\u4e16\u754c', 'track': '10', 'year': '2008'}),
     ('samples/vbr_xing_header_short.mp3',
         {'filesize': 432, 'audio_offset': 133, 'bitrate': 24.0, 'channels': 1, 'duration': 0.144,
          'extra': {}, 'samplerate': 8000}),
@@ -376,7 +377,7 @@ testfiles = OrderedDict([
         {'extra': {}, 'channels': 2, 'duration': 0.2999546485260771, 'filesize': 6892,
          'artist': 'Serhiy Storchaka', 'title': 'Pluck', 'album': 'Python Test Suite',
          'bitrate': 176.4, 'samplerate': 11025, 'audio_offset': 116,
-         'comment': 'Audacity Pluck + Wahwah'}),
+         'comment': 'Audacity Pluck + Wahwah', 'year': '2013'}),
     ('samples/M1F1-mulawC-AFsp.afc',
         {'extra': {}, 'channels': 2, 'duration': 2.936625, 'filesize': 47148,
          'bitrate': 256.0, 'samplerate': 8000, 'audio_offset': 154,