Commit graph

245 commits

Author SHA1 Message Date
Ajay Ramachandran
8129a488a9 Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into feat/faster-segments
# Conflicts:
#	src/routes/getSkipSegments.ts
#	src/routes/getSkipSegmentsByHash.ts
#	test/cases/getSegmentsByHash.js
2020-12-24 21:27:08 -05:00
Ajay Ramachandran
a7f04ad732 Update category test + fix double voting issue
Fix #190
2020-12-16 23:47:47 -05:00
Ajay Ramachandran
5deda4603e Allow submitter to change category immediately 2020-12-16 23:00:11 -05:00
Ajay Ramachandran
cd373f4bca Don't allow votes on locked videos 2020-12-16 22:53:49 -05:00
Ajay Ramachandran
2cd78d5d2f Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into Dainius14/master
# Conflicts:
#	src/routes/shadowBanUser.js
#	src/routes/voteOnSponsorTime.ts
#	test/cases/getSkipSegments.js
#	test/cases/voteOnSponsorTime.js
2020-12-07 17:35:15 -05:00
opl-
0bac7e8d90 Improve performance of segment querying endpoints 2020-12-02 15:20:42 +01:00
Joe Dowd
9d293b2cb4 Don't revive segments for videos marked with noSegment when un-banning a user 2020-10-29 01:03:07 +00:00
Joe Dowd
bb47181daa removed tests no longer needed - should be updated to reflect new changes 2020-10-28 11:44:11 +00:00
Dainius Dauksevicius
12729b36fb fix docker build, add proper mocks to tests, remove YouTubeAPI dependency on youtube test mock, move index.ts and test.ts to /src ant /test folders 2020-10-26 19:13:30 +02:00
Dainius Daukševičius
08d27265fc migrate to typescript 2020-10-26 19:13:30 +02:00
Ajay Ramachandran
ad74c2c710
Merge pull request #163 from thignus/reject-80percent-total-submissions
reject submissions if total length is more than 80 precent of the video
2020-10-14 19:43:16 -04:00
James Robinson
064d3ad5d5 fix test imports 2020-10-14 18:40:55 -05:00
Ajay Ramachandran
779b79c54b
Merge pull request #165 from ajayyy/testing
Testing
2020-10-14 18:47:55 -04:00
Ajay Ramachandran
4c222ce2cc
Merge branch 'master' into reject-80percent-total-submissions 2020-10-14 18:41:55 -04:00
Ajay Ramachandran
e4045952c8
Merge branch 'master' into feature/getuserinfo 2020-10-14 18:34:27 -04:00
Ajay Ramachandran
678e4187c5
Merge pull request #154 from MRuy/feature-segmentshift
Added segmentShift
2020-10-14 18:27:09 -04:00
Joe Dowd
2426b51512 added delete nosegment endpoint 2020-10-14 20:18:31 +01:00
James Robinson
2825cb63fb ignore segments with less than -1 votes 2020-10-14 00:33:00 -05:00
James Robinson
85dd187cb0 reject submissions if total length is more than 80 precent of the video 2020-10-14 00:25:05 -05:00
Ajay Ramachandran
62a047337c
Merge pull request #161 from ajayyy/testing
Testing
2020-10-11 13:36:41 -04:00
Joe Dowd
b244b1e1ad reverted test to 404 2020-10-06 23:25:16 +01:00
Nanobyte
cce20319ad Submission UUID generation moved to function
See issue #139
2020-10-06 15:59:32 +02:00
Nanobyte
8e33fdf49f Added segmentShift
See #151
2020-10-04 21:37:35 +02:00
Joe Dowd
fe91d13ff3 removed old functionality comments 2020-10-01 00:53:13 +01:00
Joe Dowd
4cea3c2a3b Added [] return rather than 404 for no segments with matching hash 2020-10-01 00:51:58 +01:00
Nanobyte
36f654f41c Blocking users with too many active warnings from submitting votes and submissions 2020-09-16 22:40:11 +02:00
Ajay Ramachandran
3c79c0f7a8
Remove extra test case 2020-09-16 13:48:54 -04:00
Joe Dowd
075cb9d5f2
added warning system
Co-authored-by: Ajay Ramachandran <dev@ajay.app>
2020-09-16 00:56:10 +02:00
Nanobyte
b52a862f4f
Merge branch 'master' into feature/getuserinfo 2020-09-15 19:08:56 +02:00
Ajay Ramachandran
d3463bbef2 Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into testing
# Conflicts:
#	src/routes/postSkipSegments.js
#	test/cases/voteOnSponsorTime.js
2020-09-15 11:56:14 -04:00
Nanobyte
43db13ab3f Added getUserInfo endpoint
This endpoint provides the following data about the user:

* userID
* userName
* minutesSaved
* segmentCount
* viewCount
2020-09-14 09:17:35 +02:00
Ajay Ramachandran
7a83e7901a
Merge pull request #131 from ajayyy/query-by-hash-prefix
Hash prefix fixes
2020-09-11 17:45:58 -04:00
Ajay Ramachandran
0c14560eaa
Merge branch 'master' into nb-mod-fetch 2020-09-11 17:32:14 -04:00
Joe Dowd
a068e194e9 added test for change category 2020-09-09 21:57:59 +01:00
Andrew Lee
66c3109037 Add Discord webhook for videos that fail NB check 2020-09-05 18:07:43 -04:00
Ajay Ramachandran
8de7801662 Removed extra test case 2020-09-04 12:34:05 -04:00
Ajay Ramachandran
70632dd33a
Merge pull request #127 from Joe-Dowd/query-by-hash-prefix
Query by hash prefix
2020-09-04 11:47:55 -04:00
Joe Dowd
e33062feeb updated endpoints 2020-09-01 21:37:54 +01:00
Joe Dowd
2c32460a6e more tests 2020-08-31 04:17:50 +01:00
Joe Dowd
2067599843 added test for hash prefix length 2020-08-31 03:27:12 +01:00
Joe Dowd
00534d91d4 added underscore to category format check 2020-08-31 03:09:47 +01:00
Joe Dowd
88e6c6f93c added db upgrade tests 2020-08-31 02:52:12 +01:00
Joe Dowd
82d59e159f added post and get test to hash prefix 2020-08-31 02:42:25 +01:00
Joe Dowd
aa878482d3 removed status from no segment responses 2020-08-31 01:55:38 +01:00
Joe Dowd
754d3762df fixed test category name 2020-08-31 01:50:36 +01:00
Joe Dowd
1e643c1c07 categorys -> categories 2020-08-31 01:48:41 +01:00
Joe Dowd
28bd24022b removed schema comments and removed test log 2020-08-31 01:08:18 +01:00
Joe Dowd
84c8eeccc6 added hash prefix test for missing categories 2020-08-31 01:06:50 +01:00
Joe Dowd
1a06502806 added get segments by hash prefix 2020-08-31 00:45:06 +01:00
Joe Dowd
26c72b006c mreged no-segments 2020-08-30 22:33:56 +01:00
Joe Dowd
b8d7eef536 origin testing merge 2020-08-30 22:24:37 +01:00
Joe Dowd
5f23fdd590 Added tests and finished no-segments interface. 2020-08-30 21:47:02 +01:00
Joe Dowd
84533b544a Merge testing & bufgix on logging proxy submissions 2020-08-30 20:37:24 +01:00
Andrew Lee
72ce7fcb56 Update test cases with new automod api 2020-08-29 20:41:07 -04:00
Andrew Lee
f1c520fbe8 Merge branch 'master' into nb-mod-fetch 2020-08-29 16:37:20 -04:00
Joe Dowd
a5cf59d854 improved error handling 2020-08-22 20:39:13 +01:00
Joe Dowd
c946d2309e add is VIP endpoint 2020-08-22 03:58:27 +01:00
Joe Dowd
6bde59c14a added extra sql test 2020-08-22 03:29:16 +01:00
Joe Dowd
f53c541538 added ability for vips to submit segments not in a video 2020-08-22 03:05:51 +01:00
Joe Dowd
44ea0c418a fixed db update, started no segments 2020-08-22 02:14:19 +01:00
Joe Dowd
16c68dd51d allow removing own segments with a downvote 2020-08-21 22:32:34 +01:00
Ajay Ramachandran
4bfa5e7de8 Banned users can't vote 2020-07-26 11:13:36 -04:00
Ajay Ramachandran
15fb572b80 Added IP test and potentially improved performance 2020-07-25 21:40:49 -04:00
Ajay Ramachandran
e71680c8e3 Block voting without submitting and on the same IP 2020-07-25 21:35:43 -04:00
Joe-Dowd
13e4adf18f PR comments resolved 2020-07-10 01:46:09 +01:00
Joe-Dowd
46dd16caf9 added ability to query mysql database 2020-07-05 04:14:15 +01:00
Martijn van der Ven
d8203dce77 Make sure to always insert hashed video ID 2020-05-23 17:57:33 +02:00
Ajay Ramachandran
a2caa53664 Only sponsors must be longer than 1 second.
Also added proper error message when submission is too short.
2020-05-16 18:33:16 -04:00
Ajay Ramachandran
0060b5e5af Prevent crash when category-voting on invalid UUID 2020-05-11 18:07:57 -04:00
Ajay Ramachandran
b2705dfb2d Prevented upvotes on "dead" submissions unless they are VIP. 2020-05-10 00:08:05 -04:00
Ajay Ramachandran
318d816a37 Change test case to check 7s 2020-04-30 23:41:38 -04:00
Ajay Ramachandran
a278036f1d Added neural block mock 2020-04-30 19:13:42 -04:00
Ajay Ramachandran
0cf84612e9 Merge branch 'get-ip-fixes' of https://github.com/ajayyy/SponsorBlockServer into nb-mod-fetch
# Conflicts:
#	src/routes/postSkipSegments.js
2020-04-30 19:04:23 -04:00
Ajay Ramachandran
f4ce5618bf Merge branch 'testing' of https://github.com/ajayyy/SponsorBlockServer into nb-mod-fetch
# Conflicts:
#	src/routes/postSkipSegments.js
#	test/cases/postSkipSegments.js
2020-04-30 18:44:49 -04:00
Ajay Ramachandran
8290c9e1f4 Added new NB overlapping code 2020-04-30 18:39:03 -04:00
Ajay Ramachandran
6a17e4d141 Added test cases for voting and fixed code to support them. 2020-04-29 22:15:16 -04:00
Ajay Ramachandran
f23ead56ad Updated inserts to new database schema and removed null coalescing 2020-04-29 21:26:11 -04:00
Andrew Lee
b101831a1b Extended timeout to test cases where necessary 2020-04-25 17:15:19 -04:00
Joe-Dowd
fd397de6b4 allow submission if duration is 0 2020-04-24 18:20:40 +01:00
Andrew Lee
35fa384a5b Added automod check with NB 2020-04-19 12:10:39 -04:00
Ajay Ramachandran
5eca6016fa Fixed getSkipSegments tests due to removal of JSON body as input 2020-04-09 15:40:27 -04:00
Ajay Ramachandran
f9ec4e37e9 Added another test case for get 2020-04-07 02:41:20 -04:00
Ajay Ramachandran
d331ece0be Added JSON get test cases 2020-04-07 02:39:29 -04:00
Ajay Ramachandran
57cc4f698f Added get sponsor test cases 2020-04-07 02:24:58 -04:00
Ajay Ramachandran
0b4416d9eb Renamed old get method 2020-04-07 02:04:37 -04:00
Ajay Ramachandran
9807d3e9c7 Merge 2020-04-06 20:05:26 -04:00
Ajay Ramachandran
8eca458e38 Added DB checks to tests and fixed getIP using the wrong config 2020-04-06 17:25:20 -04:00
Ajay Ramachandran
bd2f00d5f7 Added new submission method 2020-04-06 16:43:47 -04:00
Joe-Dowd
cc0bfef0ad added more tests (categories prep) 2020-04-03 21:45:06 +01:00
Joe-Dowd
393c131104 remove duplicate videoID in test cases 2020-04-01 23:42:58 +01:00
Joe-Dowd
af149b09a9 added getSavedTimeForUser test 2020-04-01 23:39:56 +01:00
Joe-Dowd
461483ea36 changed a test message 2020-04-01 22:12:32 +01:00
Joe-Dowd
7bf43cfe9a You can insert into the test db in the test scripts 2020-04-01 22:02:59 +01:00
Joe-Dowd
30d24de4d3 added http tests 2020-04-01 21:29:13 +01:00
Joe-Dowd
5369d48eae Added testing 2020-04-01 21:04:04 +01:00