mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
Merge pull request #197 from ajayyy/work
Don't hide submissions from locked videos when banning
This commit is contained in:
commit
5c4980ed2f
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,9 @@ export async function shadowBanUser(req: Request, res: Response) {
|
|||
|
||||
//find all previous submissions and hide them
|
||||
if (unHideOldSubmissions) {
|
||||
db.prepare('run', "UPDATE sponsorTimes SET shadowHidden = 1 WHERE userID = ?", [userID]);
|
||||
db.prepare('run', "UPDATE sponsorTimes SET shadowHidden = 1 WHERE userID = ?"
|
||||
+ " AND NOT EXISTS ( SELECT videoID, category FROM noSegments WHERE"
|
||||
+ " sponsorTimes.videoID = noSegments.videoID AND sponsorTimes.category = noSegments.category)", [userID]);
|
||||
}
|
||||
} else if (!enabled && row.userCount > 0) {
|
||||
//remove them from the shadow ban list
|
||||
|
|
Loading…
Reference in a new issue