Ajay
bbb7102e37
Derank original submissions
2023-06-12 11:41:57 -04:00
Ajay
3bb8d5b58b
Add verification where new users start with lower votes
2023-06-10 12:35:43 -04:00
Ajay
1cacb2dd69
Fix random time calculator for starting empty segment
2023-06-08 18:22:26 -04:00
Ajay
fe185234cf
Add fallback video duration when finding random timestamp
2023-06-08 18:05:40 -04:00
Ajay
ef3e48ec24
Send video duration if known
2023-06-08 15:28:37 -04:00
mini-bomba
777944665d
Make voting requirements more strict
...
This aims to reduce the amount of false votes by users with no valid segments of the category they're voting for.
New tests included, one modified to work under new requirements.
Also merged userAbleToVote and ableToVote in voteOnSponsorTime.ts to skip unnecessary queries for VIPs.
2023-06-08 16:50:31 +02:00
Ajay
5834643ba0
Add random timestamp generation to get branding
2023-06-08 03:39:44 -04:00
Ajay
8e5be402e1
Fix VIP title and thumbnail unlock unlocking everything
2023-05-31 14:28:01 -04:00
Ajay
39fcdb1d95
Allow more chapter names to appear in suggestions
2023-05-21 20:03:53 -04:00
Ajay
8d1025e17d
Add title and thumbnails to user stats
2023-05-09 23:53:18 -04:00
Ajay
6f0abddd3e
Reenable locks
2023-04-28 14:15:18 -04:00
Ajay
8db898fab5
Add pool status to branding header
2023-04-10 18:21:52 -04:00
Ajay
940cacfb0a
Add pool details to postgres stats
2023-04-07 15:55:29 -04:00
Ajay
69a54f64b4
More specific redis error
2023-04-07 14:39:38 -04:00
Ajay
9600f56830
Fix 500 in tracing
2023-04-07 14:38:57 -04:00
Ajay
4e59526b4d
Add missing semicolon
2023-04-07 14:31:15 -04:00
Ajay
42f2eb5eae
Add traces to branding endpoint
2023-04-07 14:31:08 -04:00
Ajay
e1a607ba39
Add sb server host as response header
2023-04-07 12:47:08 -04:00
Ajay
8a236d66ed
Fix video labels hash key error
2023-04-05 18:02:47 -04:00
Ajay
4a10faaea3
Add cb tables to db dump
2023-03-31 17:57:56 -04:00
Ajay
589b7d4e3e
Disable branding locks for now
2023-03-31 15:08:28 -04:00
Ajay
a52feee25e
Fix unlocking all submissions
2023-03-31 15:07:34 -04:00
Ajay Ramachandran
d6a12a5e99
Merge pull request #545 from ajayyy/clickbait
...
Clear query cache for branding
2023-03-29 00:33:27 -04:00
Ajay
4696ce8d01
Clear query cache for branding
2023-03-29 00:32:29 -04:00
Ajay Ramachandran
bffc10e38f
Merge pull request #534 from ajayyy/clickbait
...
Clickbait
2023-03-27 00:54:52 -04:00
Ajay
0b830610e9
Fix chapters duplicate check
2023-03-19 00:25:22 -04:00
Ajay
b6e9f92da8
Free chapters
2023-03-18 19:15:50 -04:00
Ajay
d4c4dbffcc
Change video label cache to 3 chars
2023-03-18 00:36:05 -04:00
Michael C
8495a9d6c0
fix unban query hitting limit, use number as type
2023-02-25 00:04:15 -05:00
Ajay Ramachandran
d76ee7cd22
Merge pull request #541 from mchangrh/etagTest
...
add etag and other tests
2023-02-22 01:38:41 -05:00
Michael C
76ce1017ea
add warning webhook
2023-02-22 00:08:27 -05:00
Michael C
780555e9df
add ignores for getTotalStats
2023-02-21 20:16:25 -05:00
Michael C
80de71a68f
add misc 400 tests
2023-02-21 20:09:57 -05:00
Michael C
4b8bc418ba
clean up getCWSUsers
2023-02-21 20:09:38 -05:00
Michael C
900fa9f64e
add test ignores
2023-02-21 17:00:53 -05:00
Michael C
6296761fe4
postSkipSegments improvements
...
- fix 80% check from same user
- split test cases into multiple files for easier viewing
2023-02-21 03:25:46 -05:00
Michael C
c6795a783d
fix getCWS util
2023-02-21 03:24:32 -05:00
Michael C
31a460e750
fix countcontributingusers
2023-02-20 22:56:38 -05:00
Michael C
1bda331b0c
add new CWS user parsing method
2023-02-20 22:22:33 -05:00
Michael C
72fb4eb6ec
add more tests for coverage
2023-02-20 22:22:33 -05:00
Michael C
f70a26009c
add ignore clauses to tests
2023-02-20 22:22:33 -05:00
Ajay Ramachandran
df279cf48a
Adjust ip logging fix threshold
2023-02-20 18:57:19 -05:00
Ajay
19ebca86c9
Fix video branding not being awaited
2023-02-18 02:33:22 -05:00
Ajay Ramachandran
b95b6d8efe
Merge pull request #538 from mchangrh/less-tempvip-perms
...
give less permissions to tempVIPs
2023-02-18 00:10:04 -05:00
Ajay Ramachandran
7985d131ef
Merge pull request #537 from mchangrh/lenientSetUsername
...
make privateIDUsername check more lenient #532
2023-02-18 00:09:37 -05:00
Michael C
a384079562
more lenient privateIDUsername checks
...
- disallow username = privateID
- disallow username = other privateID on username table if length > minLength
2023-02-17 22:28:23 -05:00
Ajay
46c372a764
Unlock other segments when vip votes for new segment
2023-02-14 22:10:46 -05:00
Michael M. Chang
3281954019
Update src/routes/postSkipSegments.ts
...
Co-authored-by: mini-bomba <55105495+mini-bomba@users.noreply.github.com>
2023-02-08 12:21:58 -05:00
Michael C
aece615992
give less permissions to tempVIPs
2023-02-08 01:54:20 -05:00
Ajay
6448fbfbd8
Fix logger calls where this
will be wrong
2023-02-05 13:27:18 -05:00
Ajay
3894d453a5
Improve performance of reputation query
2023-02-04 18:22:31 -05:00
Ajay
280e6684af
Fix reputation using wrong date
2023-02-04 18:22:19 -05:00
Ajay
7361c7056b
Print active db requests in redis errors
2023-02-04 15:12:22 -05:00
Ajay
2d751a0b21
Log response time limits
2023-02-04 14:13:49 -05:00
Ajay
399bda869f
Add more detailed redis error message
2023-02-04 14:07:09 -05:00
Michael C
b855eea349
make privateIDUsername check more lenient #532
2023-01-29 16:10:59 -05:00
Ajay
51d25cfc68
Ban users submitting from banned IPs
2023-01-29 13:53:08 -05:00
Ajay
f8f02d86d5
Fix shadow hidden requiring type 1
2023-01-29 13:15:05 -05:00
Ajay
e69b61fb4c
Fix shadow ban exiting early
2023-01-28 14:42:16 -05:00
Ajay
5c1b502a15
Fix ban users var not used
2023-01-28 14:04:14 -05:00
Ajay
d5c544f1ee
Allow auto banning ips
2023-01-28 14:00:12 -05:00
Ajay
5426ae826e
Add IP banning
2023-01-28 13:09:04 -05:00
Ajay Ramachandran
d8e0eac61b
Use includes and check in sql usage
2023-01-28 12:18:34 -05:00
Michael C
74c0ba37e2
remove debug statements, fix shadowBanUser tests
2023-01-28 02:54:01 -05:00
Michael C
a64b8f99b7
use shared parseParams helper
2023-01-28 02:40:09 -05:00
Ajay
9cf2e1f0e9
Fix private db table removal and original title type
2023-01-28 02:31:49 -05:00
Ajay Ramachandran
d07aac3a33
Merge branch 'master' into clickbait
2023-01-28 02:13:42 -05:00
Ajay
b91114165e
use seperate queries
2023-01-28 02:12:33 -05:00
Ajay
36f1d15605
Add tests for get branding and fix issues
...
Also improve deep partial equals
2023-01-28 01:53:59 -05:00
Ajay Ramachandran
1641a41b00
Merge pull request #533 from mchangrh/cache-control
...
add ETag to skipSegments byHash
2023-01-28 01:16:32 -05:00
Ajay
4d8ce40ef4
Add missing import
2023-01-27 22:42:46 -05:00
Ajay
07c683e8f0
Add vote/submission for titles and thumbnails
2023-01-27 22:36:29 -05:00
Ajay
d0a9168531
remove temp server outage error
2023-01-22 18:59:51 -05:00
Ajay
2ed23d7fcb
Fix duplicate chapter issue
...
Fix https://github.com/ajayyy/SponsorBlockServer/issues/521
2023-01-21 21:52:39 -05:00
Michael C
e7a43d79ab
optimize skipSegments, add eTag
...
- moved skipSegments parameter parsing to new file
- added oldGetVideoSponsorTimes to getSkipSegments.ts
2023-01-01 04:59:57 -05:00
Michael C
a613b68c66
add ETag to skipSegments byHash
2023-01-01 02:50:49 -05:00
Ajay
66c2be6012
remove hash and extra segment params
2022-12-30 15:39:45 -05:00
Ajay
2a7083b9ef
Remove hash from result to save bandwidth
2022-12-30 15:07:59 -05:00
Michael C
90e5446078
add privateID username check
...
- bump AGPL to package-lock
2022-12-30 00:41:45 -05:00
Michael C
7c2feb80bc
videoID validation and userID min length
2022-12-27 01:45:50 -05:00
Ajay
cc24a4902f
Initial get branding
2022-12-23 16:56:27 -05:00
Michael C
b591b7194e
Merge branch 'bumpInnerTube' into sanitizeVideoID
2022-12-18 00:03:33 -05:00
Michael C
8d7b010a12
append missing number to version
2022-12-17 23:58:19 -05:00
Michael C
fc73f491fe
bump innertube clientVersion
2022-12-17 23:56:36 -05:00
Michael C
2683c61995
add minUserIDLength config option
2022-12-17 23:35:13 -05:00
Ajay
cff2325aef
use keep alive in disk cache and user counter
2022-12-05 17:06:00 -05:00
Ajay
4e3753d32c
Only call user counter some of the time
2022-12-05 16:47:11 -05:00
Ajay
1202c264aa
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer
2022-12-04 19:54:46 -05:00
Ajay
89e122210e
Remove extra hash
2022-12-04 19:54:44 -05:00
Ajay Ramachandran
aed0e38d2f
Merge pull request #524 from mchangrh/submitPrivateVideo
...
add innertube tests for private videos
2022-12-04 14:59:28 -05:00
Ajay
992c65a39d
Fix sqlite tests
2022-11-21 17:06:04 -05:00
Ajay
b6e62aa68f
Add postgres request time stats
2022-11-21 16:48:16 -05:00
Michael C
1f844bf56a
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into submitPrivateVideo
2022-11-21 14:40:46 -05:00
Ajay
30ac91c537
Don't refetch reputation if under high db load
2022-11-20 19:17:47 -05:00
Ajay
e252411fe1
No time saved for chapter
2022-11-20 17:30:13 -05:00
Ajay
91fc56f59a
Wait for redis to connect before starting server
2022-11-20 01:20:05 -05:00
Ajay
0cd808a2d9
Add high load checks to leaderboard pages
2022-11-20 00:50:32 -05:00
Ajay
87e38c8bc4
Show total stats if not under high load
2022-11-20 00:47:41 -05:00
Ajay
df76b5f053
Add max queue to redis
2022-11-20 00:23:22 -05:00
Ajay
71d30c0b51
change redis max response time default
2022-11-19 23:59:50 -05:00
Ajay
238ccc83d9
Stop writing if response time exceeds value
2022-11-19 23:58:55 -05:00
Ajay
9bd6e9df4f
Add error catching in segment by hash
2022-11-19 23:35:46 -05:00
Ajay
7bdcb10994
Fix redis set limiting
2022-11-19 23:32:09 -05:00
Ajay
849ca52ef8
Allow disabling hash cache
2022-11-19 20:05:59 -05:00
Ajay
9e2e1343da
Add timeout for all postgres requests
2022-11-15 14:19:15 -05:00
Ajay
4139bf8f8c
lower active connections on error
2022-11-13 23:21:46 -05:00
Ajay
1fffd2e6ac
Remove set limitation code
2022-11-13 17:01:32 -05:00
Ajay
a417299d3e
Only limit connections for reads
2022-11-12 15:44:09 -05:00
Ajay
d3d53d0758
Allow no max redis connections
2022-11-12 15:35:07 -05:00
Ajay
517c9512e4
Make default have no max requests
2022-11-12 15:31:21 -05:00
Ajay
ed5e3373a5
Add max active postgres requests
2022-11-12 15:29:55 -05:00
Ajay
6c18579a78
Added back mention of video to lock message
2022-11-12 12:45:35 -05:00
Ajay
e6e8c8e5a1
Added suggestion to refresh for locks
2022-11-12 12:43:16 -05:00
Ajay
50743070de
Clarify locked category error
2022-11-12 12:41:00 -05:00
Michael C
7fb68937d0
add innertube tests for private videos
2022-11-09 14:39:02 -05:00
Ajay
90e68caaf7
Add active connection limit to setEx as well
2022-11-08 22:09:03 -05:00
Ajay
0ead3892ba
Fix write process time not being used
2022-11-08 00:01:44 -05:00
Ajay
2700b5b530
Add avg read and write for redis and write requests
2022-11-07 23:51:41 -05:00
Ajay
e1a5ca64f0
Add seperate config for stopping write redis connections
2022-11-07 23:04:18 -05:00
Ajay
98f202f6a9
Add max connection check to redis set
2022-11-07 22:51:26 -05:00
Ajay
ee436d982c
Fix csv download not being blocked
2022-11-07 16:30:16 -05:00
Ajay
9b509e7289
Disable csv downloads
2022-11-07 16:24:43 -05:00
Ajay
2254e7f869
Fix license validation failing
2022-10-30 17:05:10 -04:00
Ajay
68d9d3cbde
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer
2022-10-29 21:04:01 -04:00
Ajay
571230db56
Stop spamming redis if it slows down
2022-10-29 21:03:34 -04:00
Michael C
db71af480d
clear full video labels
2022-10-28 16:53:04 -04:00
Michael C
80c018c9d5
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into fullVideoLabels
2022-10-28 16:49:50 -04:00
Michael C
cc6c5980a1
videoLabelsHashKey
2022-10-28 16:49:10 -04:00
Ajay Ramachandran
9d7236282c
Merge pull request #504 from mchangrh/more-coverage
...
More test coverage, more tests
2022-10-28 16:45:22 -04:00
Michael C
7f92ac961d
clear label cache
2022-10-28 16:42:56 -04:00
Ajay
96db571a5e
Fix request rate limit option not working
2022-10-27 20:00:04 -04:00
Ajay
ccd1321d24
Allow disabling redis rate limit
2022-10-27 16:50:35 -04:00
Michael C
622511c8fd
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into more-coverage
2022-10-27 01:38:08 -04:00
Ajay
c2acc6227b
Don't kill program if can't connect to read server
2022-10-27 01:31:41 -04:00
Ajay
176f2ce7b9
Kill if db can't connect
2022-10-27 01:30:59 -04:00
Michael C
9286f16e7b
add ingores to tokenUtils
2022-10-27 01:19:42 -04:00
Ajay
9e3d059d10
Stop postgres retries when over a threshold
2022-10-26 22:58:35 -04:00
Ajay
13ae4681cb
Fix hashing empty value for patreon sign in
2022-10-26 12:56:40 -04:00
Ajay
ee56a8dea4
Last pool fail when timeout
2022-10-26 12:49:39 -04:00
Ajay
94eb37cb1c
Count active postgres and redis requests
2022-10-26 01:31:29 -04:00
Ajay
1e2437b993
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer
2022-10-22 13:32:49 -04:00
Ajay
a6275b3607
Add message about server outage
2022-10-22 13:32:48 -04:00
Brian Choromanski
10397fbde2
Fixed minutesSaved typo
2022-10-21 17:27:34 -04:00
Ajay
b5434ae234
expand chapter free access
2022-10-18 16:50:21 -04:00
Ajay Ramachandran
b52ca8b2a6
Merge pull request #513 from mchangrh/tokenValidation
...
add additional token validation
2022-10-13 09:53:29 -04:00
Michael C
e799821ad9
add additional token validation
2022-10-13 00:59:34 -04:00
Ajay
415bb31e36
Revert "Add concurrent request limit"
2022-10-11 11:59:53 -04:00
Ajay Ramachandran
eb3d733a34
Merge pull request #510 from mini-bomba/misc-fixes
...
Some fixes for voteOnSponsorTime.ts
2022-10-11 00:10:41 -04:00
Ajay
9386f25f9f
Add read only redis ability
2022-10-09 16:10:46 -04:00
mini-bomba
ceaf9ec6f6
Fix linter warning
2022-10-08 09:09:19 +02:00
mini-bomba
d229003f6e
Unlock the video on duration change detected when voting
2022-10-08 09:08:40 +02:00
mini-bomba
1becebdcd5
Actually pass the ignoreCache param, as the comment suggests
2022-10-08 09:04:37 +02:00
Ajay
b417241ca0
make permission reason not optional
2022-10-07 12:05:11 -04:00
Ajay
ee3d94e7b7
Add clearer chapter permission error
2022-10-07 12:04:44 -04:00
Ajay
b6da103c3d
switch to just lower vote min
2022-10-05 23:15:01 -04:00
Ajay
52a7d7e791
allow locked to be in top list and chapter
2022-10-05 23:08:16 -04:00
Ajay
b63572ec43
Add chapter to top users
2022-10-05 22:00:12 -04:00
Ajay Ramachandran
66d5622393
Merge pull request #508 from mini-bomba/searchsegments-description
...
Make /searchSegments return the segment description
2022-10-01 09:53:29 -04:00
mini-bomba
c4af2449c3
Use different startTime variables for each processTime check
...
This should make `processTime` and `redisProcessTime` values from /api/status more accurate
2022-10-01 15:50:47 +02:00
mini-bomba
eb5458427d
Make /searchSegments return the segment description
2022-10-01 13:46:27 +02:00
Michael C
0b9e7029c5
minor optimizations
2022-09-30 22:57:33 -04:00
Michael C
9ef0eafac1
add istanbul exclusions
2022-09-30 22:56:59 -04:00
Michael C
d80be9e7b3
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into more-coverage
2022-09-30 19:36:58 -04:00
Michael C
968ffe785f
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into fullVideoLabels
2022-09-30 19:21:54 -04:00
Ajay Ramachandran
847f1bbabb
Merge pull request #499 from mchangrh/getStatus-redis
...
add redis process time to getStatus
2022-09-29 16:52:16 -04:00
Ajay Ramachandran
ada32217d9
Merge pull request #503 from mchangrh/innerTubeDuration
...
add innerTube API, types and tests
2022-09-29 16:45:55 -04:00
Michael C
a8ddae131d
Merge branch 'master' of github.com:ajayyy/SponsorBlockServer into more-coverage
2022-09-29 15:39:36 -04:00
mini-bomba
601a17c969
Ignore chapters for saved time calculations in getUserInfo.ts
2022-09-28 18:07:39 +02:00
mini-bomba
27f7b6d3c7
Add chapter category & action type to getUserStats.ts
...
This also fixes chapters not being counted in the segment counts.
2022-09-28 17:58:18 +02:00
Michael C
55aa33aa6e
add DiskCache to getPlayerData
2022-09-26 15:58:33 -04:00
Michael C
a469f2f382
add uniform parsing and catching for arrays, remove redundant check
2022-09-25 03:30:33 -04:00
Michael C
506b6570f3
add ignore next to catch errors
2022-09-25 03:29:31 -04:00
Michael C
8562dc2240
lint fix
2022-09-25 02:05:51 -04:00
Michael C
005ae2c9fb
add ignores for impossible cases
2022-09-25 02:04:51 -04:00
Michael C
9ca087206e
add token tests
2022-09-25 02:04:30 -04:00
Michael C
7457b51aa4
add getByHash tests, remove redundant check
...
- `{}` always returns true so the early exit is never taken
2022-09-24 22:51:52 -04:00
Michael C
a00048aaac
add getIP test cases, misc others
2022-09-24 22:51:20 -04:00
Michael C
0a102c15fd
add lockCategory tests and typo tweak
2022-09-24 22:48:48 -04:00
Michael C
e0be4744be
fix tokenUtils tests, skip if not configured
2022-09-24 22:48:23 -04:00
Michael C
f683ed4f29
add userCounter mocks and rearrange webhook path
2022-09-24 22:47:18 -04:00
Michael C
3f470a72f5
add additional/missing tests
2022-09-24 22:46:35 -04:00
Michael C
551e103158
add tregex for both patreon and gumroad
2022-09-24 20:13:35 -04:00
Michael C
8fc01ba138
add fast fails for local and gumroad license keys
2022-09-22 20:30:10 -04:00
Ajay
1c1496afbc
Change free chapter to use historical rep
2022-09-22 14:50:48 -04:00
Ajay
7007ab05e1
Handle errors from redis store in request rate limit
2022-09-22 11:12:47 -04:00
Ajay
30bac658ed
Remove old permission workaround
2022-09-21 21:52:55 -04:00
Ajay
f6f83fcbe4
Add concurrent request limit
2022-09-20 23:41:36 -04:00
Ajay
f6c68ec29c
Add another option to get chapters submitting permission
2022-09-19 11:56:55 -04:00
Michael C
62a9b0eddd
add innerTube as primary videoInfo endpoint
...
- drop videoInfo.genreUrl since it's always empty
- bump ts target to ES2021 for Promise.any
- fix mocks to return err: false
- get maxResThumbnail from static endpoint
2022-09-15 17:02:33 -04:00
Michael C
3c09033267
add innerTube API, types and tests
2022-09-14 00:33:52 -04:00
Ajay
2ecf4b3a9b
Fix category votes to use category support to judge when not allowed
2022-09-12 10:59:26 -04:00
Ajay
94ca291460
Don't cut off early if last retry
2022-09-11 12:22:57 -04:00
Michael C
0e3eeece01
return -1 for unknown dbVersion
2022-09-08 16:38:05 -04:00
Michael C
00dae6d6a1
switch to reused promiseOrTimeout
2022-09-08 16:34:39 -04:00
Ajay
e84957a2c8
commit missing file
2022-09-08 15:04:33 -04:00
Ajay
1e66a2e57a
Add option to disable fallback after failure
2022-09-08 15:02:56 -04:00
Michael C
9be9d05dbe
add redis process time and add timeout clause
2022-09-07 23:43:14 -04:00
Ajay
c1e5f0e117
Fix void being used in wrong context
2022-09-07 22:15:44 -04:00
Ajay
ae95f7e3ea
Only give up on replica for last retry
2022-09-07 22:10:48 -04:00
Ajay
bd7dfc63ff
Add eslint rules for dealing with promises
2022-09-07 20:01:11 -04:00