adding test
This commit is contained in:
15
test.py
Normal file
15
test.py
Normal file
@ -0,0 +1,15 @@
|
||||
import vlc, phatbeat
|
||||
|
||||
music_dir = '/home/jducastel/music/'
|
||||
|
||||
|
||||
class player():
|
||||
|
||||
__init__(self, folder):
|
||||
# get list of files in music_dir
|
||||
self.files = [ f for f in os.listdir(folder) if os.path.isfile(os.path.join(music_dir,f)) and f.endswith('.mp3') ]
|
||||
|
||||
def play_all(self):
|
||||
for song in self.files:
|
||||
p = vlc.MediaPlayer(file)
|
||||
p.play()
|
Reference in New Issue
Block a user