def scan(self):
        print "Start scanning SmallMediumFileCollection "+self.collectionroot
        found_tracks = []

        extentions = ["mp3", "flac"]
        for (path, dir, files) in os.walk(self.collectionroot):
            for mfile in files:
                if mfile.split(".")[-1] in extentions:
                    filename = path+"/"+mfile
                    try:
                        t = Track.loadFromFile(filename)
                        found_tracks.append(t)
                    except:
                        print "Could not open file for ID3 %s" % filename
                    
        
        self._tracks = found_tracks
        self.writetofile()
        self.sortTracks()
        return
Пример #2
0
 def queue_track(self, filename):
     track = Track.loadFromFile(filename)
     self.queue.addToQueue(track)
Пример #3
0
 def set_track(self, filename):
     track = Track.loadFromFile(filename)
     self.player.changeTrack(track)
Пример #4
0
 def queue_track(self, filename):
     track = Track.loadFromFile(filename)
     self.queue.addToQueue(track)
Пример #5
0
 def set_track(self, filename):
     track = Track.loadFromFile(filename)
     self.player.changeTrack(track)