Commit 03f5acfe authored by Janez Troha's avatar Janez Troha
Browse files

Merge pull request #19 from jodal/feature/mopidy-1.0-playback

Update to Mopidy 1.0 APIs
parents 3d59e263 ca8e499a
......@@ -71,6 +71,15 @@ Project resources
Changelog
=========
v2.0.0 (UNRELEASED)
-------------------
- Require Mopidy >= 1.0.
- Update to work with the new playback API in Mopidy 1.0.
- Update to work with the new search API in Mopidy 1.0.
v1.0.2 (2015-01-02)
-------------------
......
......@@ -6,7 +6,8 @@ import os
from mopidy import config, ext
__version__ = '1.0.2'
__version__ = '2.0.0'
logger = logging.getLogger(__name__)
......
......@@ -150,7 +150,9 @@ class YoutubeLibraryProvider(backend.LibraryProvider):
else:
return [resolve_url(track)]
def search(self, query=None, uris=None):
def search(self, query=None, uris=None, exact=False):
# TODO Support exact search
if not query:
return
......@@ -181,6 +183,10 @@ class YoutubeLibraryProvider(backend.LibraryProvider):
class YoutubePlaybackProvider(backend.PlaybackProvider):
def play(self, track):
track = resolve_track(track, True)
return super(YoutubePlaybackProvider, self).play(track)
def translate_uri(self, uri):
track = resolve_track(uri, True)
if track is not None:
return track.uri
else:
return None
......@@ -26,7 +26,7 @@ setup(
'setuptools',
'requests >= 2.2.1',
'pafy >= 0.3.35',
'Mopidy >= 0.18',
'Mopidy >= 1.0',
'Pykka >= 1.1',
],
test_suite='nose.collector',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment