MCPcopy Create free account
hub / github.com/jasperproject/jasper-client / fuzzy_playlists

Method fuzzy_playlists

client/modules/MPDControl.py:406–413  ·  view source on GitHub ↗

returns playlist names that match query best as possible

(self, query)

Source from the content-addressed store, hash-verified

404 return matches
405
406 def fuzzy_playlists(self, query):
407 """
408 returns playlist names that match query best as possible
409 """
410 query = query.upper()
411 lookup = {n.upper(): n for n in self.playlists}
412 results = [lookup[r] for r in difflib.get_close_matches(query, lookup)]
413 return results

Callers 1

delegateInputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected