|
|
@ -12,42 +12,42 @@ def send_message(channel, message):
|
|
|
|
client.send_message(channel, message)
|
|
|
|
client.send_message(channel, message)
|
|
|
|
|
|
|
|
|
|
|
|
def track_0():
|
|
|
|
def track_0():
|
|
|
|
cmd_0 = "ffmpeg -y -i \"$(tree -if /home/xpub/audio_0 | grep -Eo '^(.*/)([^/]*)\.mp3$' | shuf -n 1)\" /home/xpub/wav_files/00.wav"
|
|
|
|
cmd_0 = "cp \"$(tree -if /var/www/html/radio/random-radio-radio/webinterface/uploads | grep -Eo '^(.*/)([^/]*)\.wav$' | shuf -n 1)\" /home/xpub/wav_files/00.wav"
|
|
|
|
proc_0 = subprocess.Popen(cmd_0,shell=True)
|
|
|
|
proc_0 = subprocess.Popen(cmd_0,shell=True)
|
|
|
|
wav_0 = proc_0.communicate()[0]
|
|
|
|
wav_0 = proc_0.communicate()[0]
|
|
|
|
|
|
|
|
|
|
|
|
def track_1():
|
|
|
|
def track_1():
|
|
|
|
cmd_1 = "ffmpeg -y -i \"$(tree -if /home/xpub/audio_0 | grep -Eo '^(.*/)([^/]*)\.mp3$' | shuf -n 1)\" /home/xpub/wav_files/01.wav"
|
|
|
|
cmd_1 = "cp \"$(tree -if /var/www/html/radio/random-radio-radio/webinterface/uploads | grep -Eo '^(.*/)([^/]*)\.wav$' | shuf -n 1)\" /home/xpub/wav_files/01.wav"
|
|
|
|
proc_1 = subprocess.Popen(cmd_1,shell=True)
|
|
|
|
proc_1 = subprocess.Popen(cmd_1,shell=True)
|
|
|
|
wav_1 = proc_1.communicate()[0]
|
|
|
|
wav_1 = proc_1.communicate()[0]
|
|
|
|
|
|
|
|
|
|
|
|
def track_2():
|
|
|
|
def track_2():
|
|
|
|
cmd_2 = "ffmpeg -y -i \"$(tree -if /home/xpub/audio_1 | grep -Eo '^(.*/)([^/]*)\.mp3$' | shuf -n 1)\" /home/xpub/wav_files/02.wav"
|
|
|
|
cmd_2 = "cp \"$(tree -if /home/xpub/audio_1 | grep -Eo '^(.*/)([^/]*)\.wav$' | shuf -n 1)\" /home/xpub/wav_files/02.wav"
|
|
|
|
proc_2 = subprocess.Popen(cmd_2,shell=True)
|
|
|
|
proc_2 = subprocess.Popen(cmd_2,shell=True)
|
|
|
|
wav_2 = proc_2.communicate()[0]
|
|
|
|
wav_2 = proc_2.communicate()[0]
|
|
|
|
|
|
|
|
|
|
|
|
def track_3():
|
|
|
|
def track_3():
|
|
|
|
cmd_3 = "ffmpeg -y -i \"$(tree -if /home/xpub/audio_1 | grep -Eo '^(.*/)([^/]*)\.mp3$' | shuf -n 1)\" /home/xpub/wav_files/03.wav"
|
|
|
|
cmd_3 = "cp \"$(tree -if /home/xpub/audio_1 | grep -Eo '^(.*/)([^/]*)\.wav$' | shuf -n 1)\" /home/xpub/wav_files/03.wav"
|
|
|
|
proc_3 = subprocess.Popen(cmd_3,shell=True)
|
|
|
|
proc_3 = subprocess.Popen(cmd_3,shell=True)
|
|
|
|
wav_3 = proc_3.communicate()[0]
|
|
|
|
wav_3 = proc_3.communicate()[0]
|
|
|
|
|
|
|
|
|
|
|
|
def track_4():
|
|
|
|
def track_4():
|
|
|
|
cmd_4 = "ffmpeg -y -i \"$(tree -if /home/xpub/audio_2 | grep -Eo '^(.*/)([^/]*)\.mp3$' | shuf -n 1)\" /home/xpub/wav_files/04.wav"
|
|
|
|
cmd_4 = "cp \"$(tree -if /home/xpub/audio_2 | grep -Eo '^(.*/)([^/]*)\.wav$' | shuf -n 1)\" /home/xpub/wav_files/04.wav"
|
|
|
|
proc_4 = subprocess.Popen(cmd_4,shell=True)
|
|
|
|
proc_4 = subprocess.Popen(cmd_4,shell=True)
|
|
|
|
wav_4 = proc_4.communicate()[0]
|
|
|
|
wav_4 = proc_4.communicate()[0]
|
|
|
|
|
|
|
|
|
|
|
|
def track_5():
|
|
|
|
def track_5():
|
|
|
|
cmd_5 = "ffmpeg -y -i \"$(tree -if /home/xpub/audio_2 | grep -Eo '^(.*/)([^/]*)\.mp3$' | shuf -n 1)\" /home/xpub/wav_files/05.wav"
|
|
|
|
cmd_5 = "cp \"$(tree -if /home/xpub/audio_2 | grep -Eo '^(.*/)([^/]*)\.wav$' | shuf -n 1)\" /home/xpub/wav_files/05.wav"
|
|
|
|
proc_5 = subprocess.Popen(cmd_5,shell=True)
|
|
|
|
proc_5 = subprocess.Popen(cmd_5,shell=True)
|
|
|
|
wav_5 = proc_5.communicate()[0]
|
|
|
|
wav_5 = proc_5.communicate()[0]
|
|
|
|
|
|
|
|
|
|
|
|
def track_6():
|
|
|
|
def track_6():
|
|
|
|
cmd_6 = "ffmpeg -y -i \"$(tree -if /home/xpub/audio_3 | grep -Eo '^(.*/)([^/]*)\.mp3$' | shuf -n 1)\" /home/xpub/wav_files/06.wav"
|
|
|
|
cmd_6 = "cp \"$(tree -if /home/xpub/audio_3 | grep -Eo '^(.*/)([^/]*)\.wav$' | shuf -n 1)\" /home/xpub/wav_files/06.wav"
|
|
|
|
proc_6 = subprocess.Popen(cmd_6,shell=True)
|
|
|
|
proc_6 = subprocess.Popen(cmd_6,shell=True)
|
|
|
|
wav_6 = proc_6.communicate()[0]
|
|
|
|
wav_6 = proc_6.communicate()[0]
|
|
|
|
|
|
|
|
|
|
|
|
def track_7():
|
|
|
|
def track_7():
|
|
|
|
cmd_7 = "ffmpeg -y -i \"$(tree -if /home/xpub/audio_3 | grep -Eo '^(.*/)([^/]*)\.mp3$' | shuf -n 1)\" /home/xpub/wav_files/07.wav"
|
|
|
|
cmd_7 = "cp \"$(tree -if /home/xpub/audio_3 | grep -Eo '^(.*/)([^/]*)\.wav$' | shuf -n 1)\" /home/xpub/wav_files/07.wav"
|
|
|
|
proc_7 = subprocess.Popen(cmd_7,shell=True)
|
|
|
|
proc_7 = subprocess.Popen(cmd_7,shell=True)
|
|
|
|
wav_7 = proc_7.communicate()[0]
|
|
|
|
wav_7 = proc_7.communicate()[0]
|
|
|
|
|
|
|
|
|
|
|
|