mirror of
https://github.com/azlux/botamusique
synced 2024-11-23 22:06:09 +00:00
Compare commits
2 Commits
e5f623f6c3
...
b7232b8bae
Author | SHA1 | Date | |
---|---|---|---|
|
b7232b8bae | ||
|
384bacf1ef |
@ -129,7 +129,7 @@ class MumbleBot:
|
|||||||
# ====== Volume ======
|
# ====== Volume ======
|
||||||
self.volume_helper = util.VolumeHelper()
|
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'):
|
if var.db.has_option('bot', 'volume'):
|
||||||
_volume = var.db.getfloat('bot', 'volume')
|
_volume = var.db.getfloat('bot', 'volume')
|
||||||
self.volume_helper.set_volume(_volume)
|
self.volume_helper.set_volume(_volume)
|
||||||
@ -140,7 +140,7 @@ class MumbleBot:
|
|||||||
self.last_volume_cycle_time = time.time()
|
self.last_volume_cycle_time = time.time()
|
||||||
|
|
||||||
self._ducking_volume = 0
|
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)
|
_ducking_volume = var.db.getfloat("bot", "ducking_volume", fallback=_ducking_volume)
|
||||||
self.volume_helper.set_ducking_volume(_ducking_volume)
|
self.volume_helper.set_ducking_volume(_ducking_volume)
|
||||||
|
|
||||||
|
2
util.py
2
util.py
@ -51,7 +51,7 @@ def get_recursive_file_list_sorted(path):
|
|||||||
try:
|
try:
|
||||||
mime = magic.from_file(fullpath, mime=True)
|
mime = magic.from_file(fullpath, mime=True)
|
||||||
if 'audio' in mime or 'audio' in magic.from_file(fullpath).lower() or 'video' in mime:
|
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:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user