mpd: Add album date to 'fake' tracks
This commit is contained in:
parent
5060db48f2
commit
04be75ed97
@ -27,8 +27,9 @@ def _album_as_track(album):
|
||||
return Track(
|
||||
uri=album.uri,
|
||||
name='Album: ' + album.name,
|
||||
artists=album.artists,
|
||||
album=album,
|
||||
artists=album.artists)
|
||||
date=album.date)
|
||||
|
||||
|
||||
def _artist_as_track(artist):
|
||||
|
||||
@ -117,7 +117,7 @@ class MusicDatabaseHandlerTest(protocol.BaseTestCase):
|
||||
class MusicDatabaseFindTest(protocol.BaseTestCase):
|
||||
def test_find(self):
|
||||
self.backend.library.dummy_find_exact_result = SearchResult(
|
||||
albums=[Album(uri='dummy:album:a', name='A')],
|
||||
albums=[Album(uri='dummy:album:a', name='A', date='2001')],
|
||||
artists=[Artist(uri='dummy:artist:b', name='B')],
|
||||
tracks=[Track(uri='dummy:track:c', name='C')])
|
||||
|
||||
@ -125,8 +125,11 @@ class MusicDatabaseFindTest(protocol.BaseTestCase):
|
||||
|
||||
self.assertInResponse('file: dummy:album:a')
|
||||
self.assertInResponse('Title: Album: A')
|
||||
self.assertInResponse('Date: 2001')
|
||||
|
||||
self.assertInResponse('file: dummy:artist:b')
|
||||
self.assertInResponse('Title: Artist: B')
|
||||
|
||||
self.assertInResponse('file: dummy:track:c')
|
||||
self.assertInResponse('Title: C')
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user