def search(self, query=None, uris=None, exact=False): if query is None or not query: return tunein_query = translator.mopidy_to_tunein_query(query) tracks = [] for station in self.backend.tunein.search(tunein_query): track = translator.station_to_track(station) tracks.append(track) return SearchResult(uri="tunein:search", tracks=tracks)
def search(self, query=None, uris=None, exact=False): if query is None or not query: return tunein_query = translator.mopidy_to_tunein_query(query) tracks = [] for station in self.backend.tunein.search(tunein_query): track = translator.station_to_track(station) tracks.append(track) return SearchResult(uri='tunein:search', tracks=tracks)
def lookup(self, uri): variant, identifier = translator.parse_uri(uri) if variant != "station": return [] station = self.backend.tunein.station(identifier) if not station: return [] track = translator.station_to_track(station) return [track]
def lookup(self, uri): variant, identifier = translator.parse_uri(uri) if variant != 'station': return [] station = self.backend.tunein.station(identifier) if not station: return [] track = translator.station_to_track(station) return [track]