Skip to content

Commit

Permalink
Merge pull request #86 from DuckBoss/development
Browse files Browse the repository at this point in the history
Updated youtube plugin
  • Loading branch information
Jason (제이슨) authored Apr 27, 2019
2 parents 051749b + f2448cb commit 46575e7
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions plugins/youtube/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class Plugin(PluginBase):
help_data = "All commands can be run by typing it in the channel or privately messaging JJMumbleBot.<br>\
<b>!youtube/!yt 'search_term'</b>: Searches youtube for a song/video.<br>\
<b>!play/!p 'item_number' 'item_count'(optional)</b>: Plays the selected song from youtube.<br>\
<b>!link 'youtube_link'</b>: Plays the given youtube link.<br>\
<b>!autoplay</b>: Toggles the youtube queue autoplay functionality<br>\
<b>!link 'youtube_link'</b>: Adds the given youtube link to the queue.<br>\
<b>!linkfront 'youtube_link'</b>: Priority inserts the given link to the front of the queue.<br>\
<b>!stop</b>: Stops the currently playing track and clears the queue.<br>\
<b>!shuffle</b>: Shuffles all the tracks in the queue.<br>\
<b>!volume/!v '0..1'</b>: Sets the bot audio volume.<br>\
Expand Down Expand Up @@ -69,22 +71,21 @@ def process_command(self, text):
elif command == "autoplay":
if not pv.plugin_privilege_checker(text, command, self.priv_path):
return
if YH.music_thread is not None:
if YH.autoplay:
YH.autoplay = False;
GM.gui.quick_gui(
"Autoplay has been disabled.",
text_type='header',
box_align='left')
GM.logger.info("Autoplay has been disabled in the youtube plugin.")
else:
YH.autoplay = True
GM.gui.quick_gui(
"Autoplay has been enabled.",
text_type='header',
box_align='left')
GM.logger.info("Autoplay has been enabled in the youtube plugin.")
return
if YH.autoplay:
YH.autoplay = False;
GM.gui.quick_gui(
"Autoplay has been disabled.",
text_type='header',
box_align='left')
GM.logger.info("Autoplay has been disabled in the youtube plugin.")
else:
YH.autoplay = True
GM.gui.quick_gui(
"Autoplay has been enabled.",
text_type='header',
box_align='left')
GM.logger.info("Autoplay has been enabled in the youtube plugin.")
return

elif command == "shuffle":
if not pv.plugin_privilege_checker(text, command, self.priv_path):
Expand Down

0 comments on commit 46575e7

Please sign in to comment.