Skip to content

Commit

Permalink
fixup! Add support for multiple tags for multiple values
Browse files Browse the repository at this point in the history
  • Loading branch information
splintersuidman committed Jun 29, 2021
1 parent da73c8c commit cc92a20
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
8 changes: 3 additions & 5 deletions mopidy_mpd/protocol/current_playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def playlistid(context, tlid=None):
return translator.track_to_mpd_format(tl_tracks[0], position=position)
else:
return translator.tracks_to_mpd_format(
context.core.tracklist.get_tl_tracks().get(),
context.core.tracklist.get_tl_tracks().get()
)


Expand Down Expand Up @@ -281,7 +281,7 @@ def plchanges(context, version):
tracklist_version = context.core.tracklist.get_version().get()
if version < tracklist_version:
return translator.tracks_to_mpd_format(
context.core.tracklist.get_tl_tracks().get(),
context.core.tracklist.get_tl_tracks().get()
)
elif version == tracklist_version:
# A version match could indicate this is just a metadata update, so
Expand All @@ -293,9 +293,7 @@ def plchanges(context, version):
tl_track = context.core.playback.get_current_tl_track().get()
position = context.core.tracklist.index(tl_track).get()
return translator.track_to_mpd_format(
tl_track,
position=position,
stream_title=stream_title,
tl_track, position=position, stream_title=stream_title
)


Expand Down
4 changes: 1 addition & 3 deletions mopidy_mpd/protocol/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ def currentsong(context):
if tl_track is not None:
position = context.core.tracklist.index(tl_track).get()
return translator.track_to_mpd_format(
tl_track,
position=position,
stream_title=stream_title,
tl_track, position=position, stream_title=stream_title
)


Expand Down
5 changes: 1 addition & 4 deletions tests/protocol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ class BaseTestCase(unittest.TestCase):
def get_config(self):
return {
"core": {"max_tracklist_length": 10000},
"mpd": {
"password": None,
"default_playlist_scheme": "dummy",
},
"mpd": {"password": None, "default_playlist_scheme": "dummy"},
}

def setUp(self): # noqa: N802
Expand Down
7 changes: 1 addition & 6 deletions tests/test_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@

class MpdDispatcherTest(unittest.TestCase):
def setUp(self): # noqa: N802
config = {
"mpd": {
"password": None,
"command_blacklist": ["disabled"],
}
}
config = {"mpd": {"password": None, "command_blacklist": ["disabled"]}}
self.backend = dummy_backend.create_proxy()
self.dispatcher = MpdDispatcher(config=config)

Expand Down

0 comments on commit cc92a20

Please sign in to comment.