This repository was archived by the owner on Apr 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 208
New persistence system #573
Draft
freyacodes
wants to merge
189
commits into
dev
Choose a base branch
from
feature/webinfo
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
189 commits
Select commit
Hold shift + click to select a range
8bfa784
Make ATC use ObjectId
freyacodes 29a0f4c
Add saving of player state
freyacodes cd05493
Add half-done handling of loading players
freyacodes 10dbc1e
Apply a mono cache pattern to player loading
freyacodes f805b53
Make GuildPlayers load from mongo data
freyacodes 70741a6
Fix tests
freyacodes 3b2ff87
Add mongo service to testing
freyacodes 272881b
Add resuming
freyacodes eb19a6d
Actually set player in registry
freyacodes 71a23da
Start player creation upon link creation
freyacodes 6c0f7f1
Make LLC provide Sentinel-cached VSU
freyacodes a2c60a9
Save player state as a shutdown hook
freyacodes 48792fc
Give registry shutdown hook a name
freyacodes 35ad3a4
Fix mongodb not loading
freyacodes bd11f15
Fix recursion
freyacodes 9573631
Add reactor-test library
freyacodes 38b0e8c
Save player state on unsub
freyacodes 852077d
Fix reactor-test version
freyacodes 8212d4f
Add testLazyMono() test
freyacodes eabf11e
Fix Sentinel VSU not getting provided
freyacodes b5b8366
Fix link channel being null after cached VSU
freyacodes 95b71da
Fix player state saving
freyacodes bb27786
Clean up mongo player load code
freyacodes c0072ec
Maybe resuming would work if we told the client to do so 🤔
freyacodes 8579c7c
Merge branch 'dev' into player-persistence
freyacodes a577c8d
Fix parameter mismatch
freyacodes 34b1355
Fix exceptions when resuming
freyacodes 8f0bd5d
Fall back to default ;;np embed if no YT key found
freyacodes e16be42
Use PlayerEventListenerAdapter instead of LP listener
freyacodes e542681
Fix bad method signatures
freyacodes fd41a13
Properly populate LLC state on resume
freyacodes 09d7753
Add mongodb to docker-compose
freyacodes d7e250c
Fix not setting player context on resume
freyacodes bf00ed1
Fix history NPE
freyacodes 3b25f90
Stop duplication of playing track on resume
freyacodes 4c49ed6
Merge remote-tracking branch 'origin/dev' into player-persistence
freyacodes aedde18
Fix resuming after Sentinel is restarted
freyacodes 175948b
Instrument DAU, WAU, and MAU
freyacodes cee37b2
Add INSTRUMENT_ACTIVE_USERS feature flag
freyacodes 655768e
Merge remote-tracking branch 'origin/activity-metrics' into player-pe…
freyacodes 8aafd43
Fix test compile error
freyacodes 84a2521
Merge AbstractPlayer into GuildPlayer
freyacodes b665566
Refactor GuildPlayer
freyacodes 204c6c7
Extract GuildPlayer members to extensions
freyacodes 08ecf8a
Migrate classes to kotlin for extension support
freyacodes 4ab1da0
Add simple player info server
freyacodes cb80fa3
Add ConfigWebInfoCommand
freyacodes 9aa2d1d
Fix test compile error
freyacodes 0949d07
Fix integration test
freyacodes 6862c57
Redo the websocket system because webflux requires reactive
freyacodes 729b727
Attempt to fix recursion bug
freyacodes f401bc0
Remove Spring web starter again
freyacodes 0491bc1
Use scheduler to get around recursion bug
freyacodes 1af1394
Remove servlet annotation
freyacodes b97ebc1
Add a safeguard against recursion
freyacodes 10e9250
Add an error check to recursion safeguard
freyacodes b629cdd
Fix typo
freyacodes 5c8338e
Send thumbnail with track info
freyacodes 6e05b81
Fix out of bounds error
freyacodes 0c61160
Also run link post-process after GP init
freyacodes 5ba1845
Fix track duplication bug
freyacodes 6c94a17
Persist active text channel
freyacodes 6307617
Update LLC
freyacodes 9ace476
First implementation for caching mongo results (DUMP)
Nanabell 6937a33
mongodb cache implementation dump
53a6f04
Implement GuildSettingsRepository
3648957
Implement GuildPermissionsRepository
82b6ade
Put common repository methods in Base-Class
995345e
Implement BlacklistRepository
3afb171
Implement PrefixRepository
9f40217
Combine Module, Permissions & Prefix into GuildSettings
aecacfd
Final Cleanup & Implement SearchResultRepository
d74c5e7
Merge branch 'dev' into feature/webinfo
0e1d50c
Remove accidental merge of the java classes
08de9cf
Add missing imports for PlayCommand.kt
f921b74
GuildPlayer context is now named internalContext
a40a5a6
Rename Test MockGuildPermsService.delete to .remove
1aba4c1
Remove QuarterdeckConfiguration.java
e24fa45
Nitpicks, CodeStyle
0e3464d
Fix GuildPlayer isTrackAnnounceEnabled always being false
4b84622
Fix GuildEventHandler to actually send Hello on first join
d3b32e5
GuildPlayer announceTrack just use 2 subscribes
f2684ab
GuildPlayer announceTrack to method and better name
23a63e8
Update blocking Blacklist Methods to return Monos instead
870cf40
Convert I18n.java to Kotlin
558bff9
Add BaseDefaultedRepository
27ea84e
Switch Prefix Cache to Caffeine
e6cbc6b
Switch Prefix Command to Caffeine cache
e3f54a9
Convert TrackSearcher to Kotlin and make cache calls suspend
d50c7aa
fred help how to?
cb50a8e
More suspend because its awesome
71a0f94
Simplify If else
1de6af4
Merge pull request #559 from Nanabell/feature/webinfo
freyacodes 1736b99
Change misleading fromEnum function name
freyacodes 244d18d
Adapt the configs for no quarterdeck
freyacodes ff726d3
Uh oh, @Nanabell just got BEANED https://fred.moe/HKX.png
freyacodes 001b408
Fix 563 and add i18n for Requested by
OtterBoops a1aafd0
Fetch prefix async
freyacodes bd0934a
Remove unnecessary secondary prefix cache
freyacodes 914e63a
Replace funky concurrency workaround
freyacodes 877a344
Mark more i18n methods as deprecated
freyacodes 1953a47
Update LLC
freyacodes 32630f7
Fix WS open race condition
freyacodes 6906e27
Update Spring-AMQP
freyacodes ae625e0
Fix lateinit exception
freyacodes cfe81fa
Fix bad import
freyacodes d823795
Add everyone Role to User & DJ list by default
5fb021a
Remove old MusicPersistenceHandler
68f01b2
Auto set Rand to Integer MIN when ATC is priority
5e2e2ad
Remove TrackProvider queueFirst, instead use atc.isPriority in add
7952101
Force audioLoading to use GuildPlayer to add to queue
cbb3854
Rename GuildPlayer addAll to queueAll
482a488
Fix sometimes refusing to join VC
freyacodes e173513
Fix rejoining channel when leaving intentionally
freyacodes a13aba9
Fix sending to multiple WS clients ... maybe?
freyacodes 76c91d0
Exempt FBH mods from FBH command restriction
Nanabell fabc3c8
Allow I18n getLocale(Guild) to be null
8cb5fba
Add NullableContext as base Context
c0dd1e8
Make Context inherit from NullableContext
a839dcd
Make AudioTrackContext inherit from NullableContext
62d0c94
At .floo files
9e7ef18
#I need to commit more. Implement QueueLimiter with 4 QueueLimits for…
a38809c
Whitelist DJ and above for QueueLimits
bdd3402
Remove old databaseException Metric entry
236a0ac
Simplify audioLoading PlaylistLoaded QueueLimit UX handling
bfb51e0
Move atc priority rand set to correct place
9ddb76b
Update Guildplayer#loadAll (again) to take isPriority parameter
ce52191
Add ReplayCommand
d9b8056
PlayCommand only search if user is in videoSelectionCache
3b1346f
Limit SPLIT_SELECT_ALLOWED CharMatcher to only account for nrs 1-5
337337c
Merge pull request #569 from Frederikam/bugfix/number-searching
freyacodes 07adaab
Add IQueueHandler to replace TrackProvider
45c54b9
Add SimpleQueueHandler to do basic logging of QueueHandler events
0870096
Add ShufflableQueueHandler to add shuffle capabilities to queue
640f3fe
Add RoundRobinQueueHandler to add roundRobin queue capabilities to queue
9816cd7
Add RepeatableQueueHandler to add repeat capabilities to queue
9ea8f43
Use new IQueueHandler in GuildPlayer and depending
0dae434
Fix raising onListRemove event when no tracks need to be removed
9fe3627
Rename guildPlayerUtils#userTackCount to getUserTrackCount
34eeabc
Rename ITrackProvider#size(Long) to getCountByUser(Long)
d07d16c
Update translations with the help of @OtterBoops
9aed2c5
sugar syntax
296c744
make config command modular and add player limit options
bf66a10
Add roundRobin field to GuildPlayer
0384c2f
Add persistence for roundRobin
330c7e9
add is prefix to roundRobin field
267b2f3
Add RoundRobinCommand
91614bf
Update ListCommand to show roundRobin State
4e948fb
Set internal default RoundRobin setting to false
de608b2
Simplify code a bit
freyacodes 03ef12a
Merge pull request #564 from OtterBoops/dev
freyacodes a1e7195
Fredboat-566 Revert "Make AudioTrackContext inherit from NullableCont…
4ca3122
Only Limit non BOT_ADMINS with the new Unban & Softban
661b6d3
Ensure that lastTrack cannot turn null after we do null check
119f0f8
Add basic auth to wastebin POSTs
schnapster d247b05
Update translations according to fred's suggestions
fa79226
Unify list priority queueing across all PR's
2812539
Merge branch 'dev' into feature/webinfo
freyacodes eb91416
Make failed assertions easier to debug
freyacodes b42933b
Merge branch 'feature/webinfo' into feature/player-limitations
freyacodes d33a012
Fix assert wording
freyacodes 1a2d83d
Rename valueFormat to validator and turn it into a typeAlias Validator
381610e
Move update() Subscribe to calling method
d89e365
Make Config Options more readable?
3656dd1
Merge remote-tracking branch 'origin/feature/player-limitations' into…
64059ed
Negate FBH Moderation Role check for blocking execution
d81ac12
Convert update() to expression
8ea1f9e
Fix if for dynamic play response always being true at this stage
ecc4d17
Merge pull request #566 from Frederikam/feature/player-limitations
freyacodes f127a96
Update translations
freyacodes 41eed8d
Merge branch 'feature/webinfo' into feature/queue-rework
de09941
Merge branch 'feature/webinfo' into feature/queue-rework
1119779
Fix GuildPlayer#queue() starting to play track
9d1ded3
Add RoundRobin-On/Off translations
Nanabell f5d8907
Add Add help Translation String
Nanabell f3a4723
Merge remote-tracking branch 'origin/feature/webinfo' into feature/re…
freyacodes 37b4482
Fix compile error
freyacodes afeb362
Source string tweaks
freyacodes 5286354
Merge pull request #568 from Frederikam/feature/replay
freyacodes 450cf6d
Rename “tbd” package to “handlers”
freyacodes 95b51b9
Merge branch 'feature/webinfo' into feature/queue-rework
freyacodes 941899b
RR queue source string changes
freyacodes 41a7736
Merge pull request #574 from Frederikam/feature/queue-rework
freyacodes 5cfe879
Update translations
freyacodes 0ac8f9f
Fix connect loop regression
freyacodes 2d50c37
Update build.gradle
freyacodes 90639f0
Fix compile error
freyacodes efbb344
Revert "Fix connect loop regression"
freyacodes 9cb7343
Revert "Revert "Fix connect loop regression""
freyacodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "url": "https://floobits.com/Frederikam/FredBoat" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| extern | ||
| node_modules | ||
| tmp | ||
| vendor | ||
| .idea/workspace.xml | ||
| .idea/misc.xml | ||
| .idea | ||
|
|
||
| fredboat.yml | ||
| fredboat.yaml | ||
| commons.yml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 42 additions & 4 deletions
46
FredBoat/src/main/java/fredboat/audio/lavalink/SentinelLavalink.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.