コード例 #1
0
ファイル: library.py プロジェクト: Ironbalden/quodlibet
    def query_with_refresh(self, query: SoundcloudQuery):
        """Queries Soundcloud for some (more) relevant results, then filters"""
        current = self._contents.values()

        if not query.is_parsable:
            return current
        self.client.get_tracks(query.terms)
        filtered = query.filter(current)
        print_d("Filtered %d results to %d" % (len(current), len(filtered)))
        return filtered
コード例 #2
0
ファイル: library.py プロジェクト: LudoBike/quodlibet
    def query_with_refresh(self, text, sort=None, star=STAR):
        """Queries Soundcloud for some (more) relevant results, then filters"""
        current = self._contents.values()

        query = SoundcloudQuery(text, star=star)
        if not query.is_parsable:
            return current
        self.client.get_tracks(query.terms)
        filtered = query.filter(current)
        print_d("Filtered %d results to %d" % (len(current), len(filtered)))
        return filtered
コード例 #3
0
ファイル: library.py プロジェクト: ZDBioHazard/quodlibet
 def query_with_refresh(self, text, sort=None, star=STAR):
     """Queries Soundcloud for some (more) relevant results, then filters"""
     current = self._contents.values()
     try:
         query = SoundcloudQuery(text, star=star)
         self.client.get_tracks(query.terms)
     except SoundcloudQuery.error as e:
         print_w("Couldn't filter for query '%s' (%s)" % (text, e))
         return current
     filtered = query.filter(current)
     print_d("Filtered %d results to %d" % (len(current), len(filtered)))
     return filtered
コード例 #4
0
ファイル: library.py プロジェクト: darthoctopus/quodlibet
 def query_with_refresh(self, text, sort=None, star=STAR):
     """Queries Soundcloud for some (more) relevant results, then filters"""
     current = self._contents.values()
     try:
         query = SoundcloudQuery(text, star=star)
         self.client.get_tracks(query.terms)
     except SoundcloudQuery.error as e:
         print_w("Couldn't filter for query '%s' (%s)" % (text, e))
         return current
     filtered = query.filter(current)
     print_d("Filtered %d results to %d" % (len(current), len(filtered)))
     return filtered