1
0
mirror of https://github.com/azlux/botamusique synced 2024-11-23 13:56:17 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Terry Geng
b7232b8bae
fix: Adjust default volume 2021-04-07 15:20:35 +08:00
Terry Geng
384bacf1ef
fix: Join music file path safely. 2021-04-07 15:17:55 +08:00
2 changed files with 3 additions and 3 deletions

View File

@ -129,7 +129,7 @@ class MumbleBot:
# ====== Volume ======
self.volume_helper = util.VolumeHelper()
_volume = var.config.getfloat('bot', 'volume', fallback=0.1)
_volume = var.config.getfloat('bot', 'volume', fallback=0.8)
if var.db.has_option('bot', 'volume'):
_volume = var.db.getfloat('bot', 'volume')
self.volume_helper.set_volume(_volume)
@ -140,7 +140,7 @@ class MumbleBot:
self.last_volume_cycle_time = time.time()
self._ducking_volume = 0
_ducking_volume = var.config.getfloat("bot", "ducking_volume", fallback=0.05)
_ducking_volume = var.config.getfloat("bot", "ducking_volume", fallback=0.50)
_ducking_volume = var.db.getfloat("bot", "ducking_volume", fallback=_ducking_volume)
self.volume_helper.set_ducking_volume(_ducking_volume)

View File

@ -51,7 +51,7 @@ def get_recursive_file_list_sorted(path):
try:
mime = magic.from_file(fullpath, mime=True)
if 'audio' in mime or 'audio' in magic.from_file(fullpath).lower() or 'video' in mime:
filelist.append(relroot + file)
filelist.append(os.path.join(relroot, file))
except:
pass