98 Commits

Author SHA1 Message Date
Storm Dragon
de270bc842 Second wave of initial code changes. 2025-06-13 18:53:38 -04:00
luca0N!
f67e837cd9
Fix `ytsearch -n' next page issue (#373) (#374)
* Fix `ytsearch -n' next page issue (#373)

Fix an issue which caused the `ytsearch' to improperly fill the shortlist when used with `-p' to query the next search page.

* Fix code syntax

Add empty line removed in the previous commit.
2023-07-31 12:08:43 +02:00
Caleb Leinz (he/him)
a50a067641
Implementation for setting max volume (#336)
* Added support for creating a max volume

* Fixed db function calls

* Fixed issue with max volume always adjusting volume
2022-07-12 18:13:10 +02:00
Terry Geng
a0eb5b39c3 fix(config): Define all fallback in configuration.default.ini. 2022-02-01 21:08:15 -05:00
Terry Geng
e9bb9d3489 fix(cmd): Sanitize empty url input for !playlist 2022-01-25 09:21:29 -05:00
Terry Geng
81b78fa8e3 feat(config): Moved delete_allowed to [bot] section,
Now it works for both command and web interface.

Implemented #293.
2022-01-21 23:22:43 -05:00
Terry Geng
61748c199a
feat: Allow users to specify a cookie when querying youtube.
See #263.
2021-04-23 23:02:04 +08:00
Azlux
a3b9948b6d cleaning deleted file "system" 2021-03-01 11:55:44 +01:00
Terry Geng
1f9573b1d5 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.
2021-02-22 23:44:14 +08:00
Terry Geng
f59062ec1f refactor: Reformat commands in alphabet order. 2021-02-22 23:44:14 +08:00
Terry Geng
4597824fdb
feat: Added bot command version to display current version.
Requested in #194.
2021-01-01 14:41:17 +08:00
Terry Geng
014086305d
fix: Bot failed when executing 'mode random' 2020-11-11 16:46:05 +08:00
Azlux
8c81ba215f Fix #213 2020-10-05 22:49:54 +02:00
Terry Geng
56399c499f
feat: Prompt the position of the song added by cli. Implement #186. 2020-07-14 19:20:12 +08:00
Terry Geng
9e2e09e5fd
feat: Load language file in lang/ instead of the ini file. 2020-07-12 11:45:51 +08:00
Terry Geng
e84607b8e8
refactor: Rename constants.string into tr. 2020-07-12 11:45:51 +08:00
Terry Geng
a6f8c459d0
refactor: move volume part into a helper 2020-06-15 20:36:52 +08:00
Terry Geng
5f67517dc3
feat: use a function to convert volume set by the user to a scale of -60~0 dB. Then convert dB to a factor from 0 to 1 used as the real volume factor. 2020-06-08 17:30:37 +08:00
Azlux
9263e647fd pyradio implementation
fix #138
2020-06-01 15:34:10 +02:00
Terry Geng
3330017586
fix: password auth error 2020-05-27 08:52:27 +08:00
Terry Geng
e61f791c82
feat: 'password' auth method: support user addition 2020-05-23 14:46:27 +08:00
Terry Geng
c8f0ccf706
feat: ban a user after too many failed attempts 2020-05-19 09:53:01 +08:00
Terry Geng
fae93d99e0
feat: add config item for maximum upload file size 2020-05-19 09:12:52 +08:00
Terry Geng
62a115b56e
feat: record IP. refresh cookie if new token is provided 2020-05-18 13:52:04 +08:00
Terry Geng
edf5495fe5
feat: several improvements to azlux's token auth scheme #154
1. 'auth_method' in config, where users can select between
   'password' and 'token'.
2. create index for token, avoid iterating the entire user
   section when validating tokens.
3. only generate token for a user when there's no token for
   him in the db, avoid tokens fill the db.
2020-05-18 10:17:08 +08:00
Azlux
4017e7bff0 add webinterface token
#154
2020-05-17 20:28:27 +02:00
Terry Geng
71e0ede51e
feat: optimized play/resume logic, add fast-forward support within song.
fix #153.
2020-05-15 10:22:44 +08:00
Terry Geng
40ea744e7f
refactor: move music db into a separated file.
IMPORTANT NOTE:
The default database path has changed. It was database.db, but
now they ARE settings.db and music.db.

Database migration will detect music table in settings.db, and
move it out of settings.db.

To update from old version, you need to
 1. if you use your own db path settings in the command
    line or in configuration.ini, you don't have to change
    anything;
 1. or,if you use default database path, rename database.db
    into settings.db.
2020-05-13 10:43:40 +08:00
Azlux
1d6310afaf Using new pymumble pypi module 2020-04-21 18:47:24 +02:00
Terry Geng
622f86c8f2 fix: listfile problem 2020-04-10 10:09:43 +08:00
Terry Geng
409489376f fix: message for 'repeat' 2020-04-08 08:57:39 +08:00
Terry Geng
e86b5ca659 refactor: rewrite confusing part 2020-04-08 08:55:58 +08:00
Dexter Gaon-Shatford
2a148dd8a3
Fix repeat command crashing when queue is empty
If the repeat command is invoked without this change, the bot will crash due to the call to format_song_string() on music which is null. All I did is add a check and make the bot say that the playlist is empty if this scenario occurs.
2020-04-07 19:06:45 -04:00
Terry Geng
d32d30b795 fix: fixed #118, weird threading issue 2020-04-02 18:27:15 +08:00
Terry Geng
75b1c6f7c7 fix: #117 continue 2020-03-31 17:53:22 +08:00
Azlux
0b92d4ccb0 same fix as #117 2020-03-31 11:26:29 +02:00
Terry Geng
112564ba45 refactor: reviewed all message send to channel 2020-03-28 13:13:20 +08:00
Terry Geng
b18c70c146 fixed: playlist update problem in web interface 2020-03-28 10:45:32 +08:00
Terry Geng
1732314304 fix: current_index unchanged immediately after stop 2020-03-25 21:35:59 +08:00
Terry Geng
b2e5efec93 refactor: optimized playlist logic 2020-03-25 21:35:59 +08:00
Terry Geng
e256d50c5c refactor: removed useless files path cache 2020-03-22 21:59:05 +08:00
HerHde
d0d1f538a4 Extract channel join logic into seperate method 2020-03-22 02:57:12 +01:00
Terry Geng
1d1ff50a59 feat: add 'clear_when_stop_in_oneshot' option in config for azlux 2020-03-20 10:49:44 +08:00
Terry Geng
fb7101a581 FEAT: MUSIC LIBRARY BROSWER 2020-03-19 22:51:32 +08:00
Terry Geng
4423f499e6 fix: multi-line message, fixed #103 2020-03-16 09:27:37 +08:00
Terry Geng
457f1c691f fix: 'jump' doesn't play the music if paused. 2020-03-14 16:34:04 +08:00
Terry Geng
a2cb955ed8 fix: refresh video metatdata after validation 2020-03-12 18:35:24 +08:00
Terry Geng
a750eeeab6 feat: oust will clear the playlist in one-shot mode 2020-03-12 09:06:16 +08:00
Terry Geng
dc5a112fa9 fix: fix KeyError when removing item 2020-03-12 09:04:14 +08:00
Lartza
213a6c084b Cleanup 2020-03-10 23:07:29 +02:00