Exemplo n.º 1
0
    def preview_audio(self, *args):
        p = Preview()
        print self, p
        t = Thread()

        if p.playing:
        # if t.isAlive():
            p.stop()
            print __name__, ">>stop..."
        else:
            self.play()
            # try:
            #     # t.setDaemon(True)
            #     t.run = self.play
            #     t.start()
            # except Exception, e:
            #     print e
        print 'preview audio file', args
Exemplo n.º 2
0
 def open_dir(self, *args):
     p = Preview()
     p.stop()
     print 'open file in explorer', args
Exemplo n.º 3
0
 def play(self):
     p = Preview()
     p.open(model.get_file_url(self.getTitle()))
     p.play()