[Grooveshark] add user playlist management

This commit is contained in:
Bezleputh 2013-10-16 21:04:52 +02:00 committed by Florent Fourcot
commit 6fa693f5aa
3 changed files with 99 additions and 20 deletions

View file

@ -29,6 +29,16 @@ class GroovesharkTest(BackendTest):
result = list(self.backend.search_videos("Loic Lantoine"))
self.assertTrue(len(result) > 0)
def test_grooveshark_user_playlist(self):
l1 = list(self.backend.iter_resources([BaseVideo], [u'playlists']))
assert len(l1)
c = l1[0]
l2 = list(self.backend.iter_resources([BaseVideo], c.split_path))
assert len(l2)
v = l2[0]
self.backend.fillobj(v, ('url',))
self.assertTrue(v.url is not None, 'URL for video "%s" not found: %s' % (v.id, v.url))
def test_grooveshark_album_search(self):
l1 = list(self.backend.iter_resources([BaseVideo], [u'albums', u'live']))
assert len(l1)