Add length to scanner translator
This commit is contained in:
parent
79887c1988
commit
889b8fdb43
@ -36,6 +36,7 @@ def translator(data):
|
||||
artists=[artist],
|
||||
date=date,
|
||||
track_no=data['track-number'],
|
||||
length=data['duration'],
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -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))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user