Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def media_player(self, command):
- if command == "**list_radio**":
- if len(os.listdir(self.radio_dir)) == 0:
- self.send_message("[-] Raadiofaile pole lisatud.")
- else:
- self.senddef media_player(self, command):
- if command == "**list_radio**":
- if len(os.listdir(self.radio_dir)) == 0:
- self.send_message("[-] Raadiofaile pole lisatud.")
- else:
- self.send_message("Raadiokanalid:")
- [self.send_message("!{}".format(os.path.splitext(os.path.basename(i))[0]))
- for i in os.listdir(self.radio_dir)]
- elif command == "**stop**":
- if Utilities.is_processs_active("vlc"):
- os.popen("killall vlc &")
- else:
- pass
- else:
- if command.endswith(".pls"):
- os.popen("cvlc --vout none {}{} &".format(self.radio_dir, command))
- else:
- os.popen("cvlc --vout none {} &".format(command))_message("Raadiokanalid:")
- [self.send_message("!{}".format(os.path.splitext(os.path.basename(i))[0]))
- for i in os.listdir(self.radio_dir)]
- elif command == "**stop**":
- if Utilities.is_processs_active("vlc"):
- os.popen("killall vlc &")
- else:
- pass
- else:
- if command.endswith(".pls"):
- os.popen("cvlc --vout none {}{} &".format(self.radio_dir, command))
- else:
- os.popen("cvlc --vout none {} &".format(command))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement