File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,13 @@ export const conf = convict({
442
442
default : true ,
443
443
} ,
444
444
} ,
445
+ video : {
446
+ enable_sponsorblock : {
447
+ doc : "Whether to enable fetching skipable segments from sponsorblock." ,
448
+ format : Boolean ,
449
+ default : true ,
450
+ } ,
451
+ } ,
445
452
} ) ;
446
453
447
454
function getExtraBaseConfig ( ) : string | undefined {
Original file line number Diff line number Diff line change @@ -540,7 +540,11 @@ export class Room implements RoomState {
540
540
this . currentSource = null ;
541
541
}
542
542
543
- if ( this . autoSkipSegmentCategories . length > 0 && this . currentSource ) {
543
+ if (
544
+ conf . get ( "video.enable_sponsorblock" ) &&
545
+ this . autoSkipSegmentCategories . length > 0 &&
546
+ this . currentSource
547
+ ) {
544
548
this . wantSponsorBlock = true ;
545
549
}
546
550
if ( ! this . currentSource && this . videoSegments . length > 0 ) {
@@ -762,7 +766,7 @@ export class Room implements RoomState {
762
766
) ;
763
767
}
764
768
765
- if ( this . autoSkipSegmentCategories . length > 0 ) {
769
+ if ( conf . get ( "video.enable_sponsorblock" ) && this . autoSkipSegmentCategories . length > 0 ) {
766
770
if ( this . wantSponsorBlock ) {
767
771
this . wantSponsorBlock = false ; // Disable this before the request to avoid spamming the sponsorblock if the request takes too long.
768
772
try {
You can’t perform that action at this time.
0 commit comments