Exemplo n.º 1
0
 def next_track(self):
     track = self.source.next_track()
     if track:
         print self.which, tlib.get_tn(track)
         if len(self.props) > 0:
             for prop in self.props:
                 val = tlib.get_attr(track, prop)
                 if val != None:
                     print '   ', prop, '->', val
         self.which += 1
     return track
Exemplo n.º 2
0
 def next_track(self):
         
     while True:
         track = self.source.next_track()
         if track:
             tinfo = tlib.get_track(track)
             if tinfo['artist'].lower() not in self.bad_artists:
                 return track
             else:
                 if self.debug:
                     print 'filtered out', tlib.get_tn(track)
         else:
             break
     return track
Exemplo n.º 3
0
    def next_track(self):
        track = None
        while True:
            track = self.source.next_track()
            if track:
                if self.by_name:
                    tname = tlib.get_tn(track).lower()
                    if tname in self.history:
                        continue
                    else:
                        self.history.add(tname)

                if track in self.history:
                    continue
                else:
                    self.history.add(track)
                    break
            else:
                break

        return track
Exemplo n.º 4
0
 def next_track(self):
     if self.bad_tracks == None:
         self.bad_tracks = set()
         while True:
             track = self.filter.next_track()
             if track:
                 self.bad_tracks.add(track)
             else:   
                 break
         
     while True:
         track = self.source.next_track()
         if track:
             if not track in self.bad_tracks:
                 return track
             else:
                 if self.debug:
                     print 'filtered out', tlib.get_tn(track)
         else:
             break
     return track