Commit graph

740 commits

Author SHA1 Message Date
Max Isom 0396949b39
Check database direction for orphans 2021-12-07 20:36:37 -05:00
Max Isom 29ec1d0092
Revert back to static property 2021-12-03 11:28:50 -05:00
Max Isom 7ff54b9495
Use loop instead of recursion 2021-12-03 11:06:56 -05:00
Max Isom 4ffd679ddb
Update debug logging 2021-12-03 10:52:30 -05:00
Max Isom 3f0f97f762
Return when queue is empty 2021-12-03 10:45:09 -05:00
Max Isom 70a55e9a2e
Disable @typescript-eslint/no-implicit-any-catch
(Strict mode in TS 4.4 enables useUnknownInCatchVariables, so this is redundant.)
2021-12-03 10:36:06 -05:00
Hellyson Rodrigo Parteka b52f9253c2
add some debug logs 2021-12-03 03:26:36 -03:00
Hellyson Rodrigo Parteka af82be13f9
fix(file-cache): add queue to handle eviction of old files
This commit also removes the `await` from every stream creation. The eviction will be handled totally assyncronously. The only drawback is the possibility of  exceeding the cache limit for a moment, until the next execution of `evictOldest`.
This will only be a problem if the cache is set too close to the remaining disk space, which I wouldn't recomend.

I also removed the recursion.
2021-12-03 01:01:35 -03:00
Hellyson Rodrigo Parteka 3b2aa47e95
fix(file-cache): try/catch to prevent concurrency issues 2021-12-03 00:30:00 -03:00
dependabot[bot] 9abc7370a8
Bump p-limit from 3.1.0 to 4.0.0
Bumps [p-limit](https://github.com/sindresorhus/p-limit) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/sindresorhus/p-limit/releases)
- [Commits](https://github.com/sindresorhus/p-limit/compare/v3.1.0...v4.0.0)

---
updated-dependencies:
- dependency-name: p-limit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 01:19:30 +00:00
dependabot[bot] e3c6ac4b24
Bump inversify from 5.1.1 to 6.0.1
Bumps [inversify](https://github.com/inversify/InversifyJS) from 5.1.1 to 6.0.1.
- [Release notes](https://github.com/inversify/InversifyJS/releases)
- [Changelog](https://github.com/inversify/InversifyJS/blob/master/CHANGELOG.md)
- [Commits](https://github.com/inversify/InversifyJS/compare/5.1.1...v6.0.1)

---
updated-dependencies:
- dependency-name: inversify
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 01:18:50 +00:00
dependabot[bot] d8b434b9bd
Bump array-shuffle from 2.0.0 to 3.0.0
Bumps [array-shuffle](https://github.com/sindresorhus/array-shuffle) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/sindresorhus/array-shuffle/releases)
- [Commits](https://github.com/sindresorhus/array-shuffle/compare/v2.0.0...v3.0.0)

---
updated-dependencies:
- dependency-name: array-shuffle
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 01:18:41 +00:00
Max Isom 9afca25866
Merge pull request #415 from codetheweb/feature/better-file-caching 2021-11-28 19:42:32 -05:00
Max Isom 9f9469f682
Add back -re option on uncached streams 2021-11-24 13:16:44 -06:00
Max Isom 49664be9e1
Change event to close 2021-11-24 12:03:54 -06:00
Max Isom 71b62cb3aa
Merge branch 'master' into feature/better-file-caching 2021-11-24 11:42:38 -06:00
Max Isom f146a2a57c
Merge pull request #417 from DrunkenToast/remove 2021-11-20 19:05:52 -05:00
Max Isom 2903fcf0f8
Revert changes to .gitignore 2021-11-20 19:04:34 -05:00
Max Isom b93e6644b7
Merge branch 'master' into remove 2021-11-20 19:02:48 -05:00
Max Isom 490b082587
Update strings 2021-11-20 19:01:53 -05:00
DrunkenToast 7538a2ebb8
fix: loading message isn't required 2021-11-20 19:01:53 -05:00
DrunkenToast fe233cb98c
fix: range and q size check 2021-11-20 19:01:52 -05:00
DrunkenToast 5a74115beb
feat: remove from queue
+ fix typo queuecommand
2021-11-20 19:01:52 -05:00
Hellyson Rodrigo Parteka 46701a8aab
fix: change player.add(...) behavior 2021-11-20 19:01:52 -05:00
Hellyson Rodrigo Parteka 5cc74a3d51
fix: add missing DIRECT_MESSAGES intent 2021-11-20 19:01:52 -05:00
Max Isom ebdf5a3deb
Bump @discordjs/opus to latest 2021-11-20 19:01:51 -05:00
Hellyson Rodrigo Parteka d8394a4bd5
chore: update Lint & build action to use nodejs 16
This is the first time I'm working with actions... I hope this works
2021-11-20 19:01:51 -05:00
Hellyson Rodrigo Parteka fe5f9cf9a7
feat: discord.js v13 2021-11-20 19:01:51 -05:00
Max Isom 1ddd19dbb9
Only add event listeners once
See #372
2021-11-20 19:01:00 -05:00
Max Isom 34e45d6273
Add .removeOrphans() 2021-11-19 12:22:27 -05:00
Max Isom f5149dfaba
Move file caching logic to new FileCache service
Also: removes the -re ffmpeg option.
If this option is passed, ffmpeg won't write to fs-capacitor (and the cache file) as fast as possible.
In other words, the cache file won't finish writing until the entire stream has been played.
2021-11-19 12:13:45 -05:00
Max Isom 04d8f8d390
Better DX for yarn dev 2021-11-19 12:02:33 -05:00
Max Isom 04c7e61fc0
Add FileCache model 2021-11-18 20:55:57 -05:00
Max Isom d805da906a
Rename existing cache model 2021-11-18 20:50:44 -05:00
Max Isom 381ee62b78
Merge pull request #413 from Hellysonrp/fix-player-add-behavior 2021-11-17 20:03:16 -05:00
Hellyson Rodrigo Parteka c16449b08f
fix: change player.add(...) behavior 2021-11-17 20:17:08 -03:00
Max Isom 7b2401ff19
Merge pull request #373 from codetheweb/bugfix/only-add-listeners-once 2021-11-17 16:23:31 -05:00
Max Isom dd81fc47fd
Merge branch 'master' into bugfix/only-add-listeners-once 2021-11-17 16:16:00 -05:00
Max Isom 41b050a2f1
Merge pull request #397 from Hellysonrp/discord-js-v13 2021-11-17 16:07:29 -05:00
Hellyson Rodrigo Parteka 96bf53b28a
fix: add missing DIRECT_MESSAGES intent 2021-11-17 01:48:48 -03:00
Max Isom 9ee723b885
Bump @discordjs/opus to latest 2021-11-16 22:16:22 -05:00
Hellyson Rodrigo Parteka eb8b783def
chore: update Lint & build action to use nodejs 16
This is the first time I'm working with actions... I hope this works
2021-11-16 02:59:51 -03:00
DrunkenToast 20a030e307 gitignore, first commit fork 2021-11-12 22:45:43 +01:00
Hellyson Rodrigo Parteka 8448feebb6
feat: discord.js v13 2021-11-12 16:30:18 -03:00
Max Isom a4e67d6383
Add -re flag
See #389, https://trac.ffmpeg.org/wiki/StreamingGuide
2021-10-31 11:20:59 -04:00
Max Isom defb56ed5e
Only add event listeners once
See #372
2021-10-03 12:59:26 -04:00
cheqpat 3924c8007c
Always autoplay rather than alerting that it is paused 2021-10-02 02:16:59 -05:00
cheqpat b91e072e2f
implement @udany's fix 2021-10-02 02:14:47 -05:00
Thongrapee Panyapatiphan 33b0ffa244
Update parsing and validation logic for playlist-limit config 2021-10-01 23:59:33 +07:00
Thongrapee Panyapatiphan 847c578b5d
Remove custom getter 2021-10-01 23:49:22 +07:00