Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
    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]
Exemple #4
0
    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]