Add length to scanner translator

This commit is contained in:
Thomas Adamcik 2010-10-27 00:17:03 +02:00
parent 79887c1988
commit 889b8fdb43
2 changed files with 3 additions and 1 deletions

View File

@ -36,6 +36,7 @@ def translator(data):
artists=[artist],
date=date,
track_no=data['track-number'],
length=data['duration'],
)

View File

@ -23,7 +23,7 @@ class TranslatorTest(unittest.TestCase):
'track-count': 2,
'date': FakeGstDate(2006, 1, 1,),
'container-format': u'ID3 tag',
# length etc?
'duration': 4531,
}
def test_basic_data(self):
@ -34,6 +34,7 @@ class TranslatorTest(unittest.TestCase):
artists=[Artist(name='name')],
date=date(2006, 1, 1),
track_no=1,
length=4531,
)
self.assertEqual(expected, translator(self.data))