feat: Whitelist URL feature.

In the configuration, `max_duration` can be set to prevent
long song(URL item) being downloaded and added to the
playlist.
This whitelist feature provided a way to override this
duration check: songs being whitelisted will be added to
the playlist no matter how long they are.
Three admin commands are introduced:
 - !urlwhitelist (!urlw)
 - !urlunwhitelist, (!urlunw)
 - !urlwhitelistlist, (!urlwls).

 Also, if one song fails due to its length, the bot will
 show the length of this song and the max length limit in
 the reply message.

 Implement #173, #196.
This commit is contained in:
Terry Geng
2021-02-17 12:55:11 +08:00
parent f59062ec1f
commit 1f9573b1d5
11 changed files with 176 additions and 111 deletions

View File

@ -183,6 +183,9 @@ user_unban = userunban
url_ban = urlban
url_ban_list = urlbanlist
url_unban = urlunban
url_whitelist = urlwhitelist, urlw
url_unwhitelist = urlunwhitelist, urlunw
url_whitelist_list = urlwhitelistlist, urlwls
ducking = duck
ducking_threshold = duckthres