diff --git a/command.py b/command.py
index b46d213..66c4984 100644
--- a/command.py
+++ b/command.py
@@ -614,7 +614,11 @@ def cmd_mode(bot, user, text, command, parameter):
if not parameter in ["one-shot", "loop", "random"]:
bot.send_msg(constants.strings('unknown_mode', mode=parameter), text)
else:
+ var.db.set('playlist', 'playback_mode', parameter)
var.playlist.set_mode(parameter)
+ logging.info("command: playback mode changed to %s." % parameter)
+ bot.send_msg(constants.strings("change_mode", mode=var.playlist.mode,
+ user=bot.mumble.users[text.actor]['name']), text)
if parameter == "random":
bot.stop()
var.playlist.randomize()
diff --git a/configuration.default.ini b/configuration.default.ini
index e71393d..813c3a9 100644
--- a/configuration.default.ini
+++ b/configuration.default.ini
@@ -31,6 +31,8 @@ username = botamusique
comment = Hi, I'm here to play radio, local music or youtube/soundcloud music. Have fun!
# default volume from 0 to 1.
volume = 0.1
+# playback mode should be one of "one-shot", "loop", "random"
+playback_mode = one-shot
# Users allowed to kill the bot, or ban URLs.
admin = User1;User2;
@@ -148,20 +150,20 @@ ducking_volume = duckv
drop_database = dropdatabase
[strings]
-current_volume = Current volume: {volume}
-current_ducking_volume = Volume on ducking: {volume}
-change_volume = Volume set to {volume} by {user}
-change_ducking_volume = Volume on ducking set to {volume} by {user}
-bad_command = {command}: command not found
-bad_parameter = {command}: invalid parameter
+current_volume = Current volume: {volume}.
+current_ducking_volume = Volume on ducking: {volume}.
+change_volume = Volume set to {volume} by {user}.
+change_ducking_volume = Volume on ducking set to {volume} by {user}.
+bad_command = {command}: command not found.
+bad_parameter = {command}: invalid parameter.
error_executing_command = {command}: Command failed with error: {error}.
not_admin = You are not an admin!
-not_playing = Nothing is playing right now
-no_file = File not found
-wrong_pattern = Invalid regex: {error}
-file_added = Added: {item}
+not_playing = Nothing is playing right now.
+no_file = File not found.
+wrong_pattern = Invalid regex: {error}.
+file_added = Added: {item}.
multiple_file_added = Multiple files added:
-bad_url = Bad URL requested
+bad_url = Bad URL requested.
preconfigurated_radio = Preconfigurated Radio available:
unable_download = Error while downloading music...
which_command = Do you mean
{commands}
@@ -172,8 +174,8 @@ now_playing = Now playing {item}
{thumb}
not_in_my_channel = You're not in my channel, command refused!
pm_not_allowed = Private message aren't allowed.
too_long = This music is too long, skip!
-download_in_progress = Download of {item} in progress
-removing_item = Removed entry {item} from playlist
+download_in_progress = Download of {item} in progress...
+removing_item = Removed entry {item} from playlist.
user_ban = You are banned, not allowed to do that!
url_ban = This url is banned!
rb_query_result = This is the result of your query, send !rbplay 'ID' to play a station:
@@ -187,6 +189,7 @@ start_updating = Start updating...
file_missed = Music file '{file}' missed! This item has been removed from the playlist.
unknown_mode = Unknown playback mode '{mode}'. It should be one of one-shot, loop, random.
current_mode = Current playback mode is {mode}.
+change_mode = Playback mode set to {mode} by {user}.
help =