Don't show prompt after the segment has ended (#152)
If the user has `HidePromptAdjustment` set to a value larger then the intro length, the prompt would be visible after the intro has ended. Additionally, setting this value to a ridiculously high number allows user to make the prompt visible until the end of the segment.
This commit is contained in:
parent
8f5e283970
commit
8edb8f173c
@ -91,6 +91,12 @@ public class SkipIntroController : ControllerBase
|
|||||||
segment.HideSkipPromptAt = segment.IntroStart + config.HidePromptAdjustment;
|
segment.HideSkipPromptAt = segment.IntroStart + config.HidePromptAdjustment;
|
||||||
segment.IntroEnd -= config.SecondsOfIntroToPlay;
|
segment.IntroEnd -= config.SecondsOfIntroToPlay;
|
||||||
|
|
||||||
|
// Don't show prompt after the segment has ended
|
||||||
|
if (segment.HideSkipPromptAt > segment.IntroEnd)
|
||||||
|
{
|
||||||
|
segment.HideSkipPromptAt = segment.IntroEnd;
|
||||||
|
}
|
||||||
|
|
||||||
return segment;
|
return segment;
|
||||||
}
|
}
|
||||||
catch (KeyNotFoundException)
|
catch (KeyNotFoundException)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user