diff --git a/mopidy/mpd/protocol/music_db.py b/mopidy/mpd/protocol/music_db.py index 0e59706f..0350fc21 100644 --- a/mopidy/mpd/protocol/music_db.py +++ b/mopidy/mpd/protocol/music_db.py @@ -2,7 +2,6 @@ from __future__ import absolute_import, unicode_literals import functools import itertools -import warnings from mopidy.models import Track from mopidy.mpd import exceptions, protocol, translator @@ -174,10 +173,9 @@ def findadd(context, *args): results = context.core.library.search(query=query, exact=True).get() - with warnings.catch_warnings(): + with deprecation.ignore('core.tracklist.add:tracks_arg'): # TODO: for now just use tracks as other wise we have to lookup the # tracks we just got from the search. - warnings.filterwarnings('ignore', 'tracklist.add.*"tracks" argument.*') context.core.tracklist.add(tracks=_get_tracks(results)).get() @@ -452,10 +450,9 @@ def searchadd(context, *args): results = context.core.library.search(query).get() - with warnings.catch_warnings(): + with deprecation.ignore('core.tracklist.add:tracks_arg'): # TODO: for now just use tracks as other wise we have to lookup the # tracks we just got from the search. - warnings.filterwarnings('ignore', 'tracklist.add.*"tracks".*') context.core.tracklist.add(_get_tracks(results)).get()