fix(youtube/sponsorblock): Include milliseconds in the voting menu (#362)

This commit is contained in:
cane 2023-04-22 23:52:41 +02:00 committed by oSumAtrIX
parent 7fc8e882d8
commit 6952c50595
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -300,13 +300,13 @@ public class SponsorBlockUtils {
final long currentVideoLength = VideoInformation.getCurrentVideoLength(); final long currentVideoLength = VideoInformation.getCurrentVideoLength();
final String formatPattern; final String formatPattern;
if (currentVideoLength < (10 * 60 * 1000)) { if (currentVideoLength < (10 * 60 * 1000)) {
formatPattern = "m:ss"; // less than 10 minutes formatPattern = "m:ss.SSS"; // less than 10 minutes
} else if (currentVideoLength < (60 * 60 * 1000)) { } else if (currentVideoLength < (60 * 60 * 1000)) {
formatPattern = "mm:ss"; // less than 1 hour formatPattern = "mm:ss.SSS"; // less than 1 hour
} else if (currentVideoLength < (10 * 60 * 60 * 1000)) { } else if (currentVideoLength < (10 * 60 * 60 * 1000)) {
formatPattern = "H:mm:ss"; // less than 10 hours formatPattern = "H:mm:ss.SSS"; // less than 10 hours
} else { } else {
formatPattern = "HH:mm:ss"; // why is this on YouTube formatPattern = "HH:mm:ss.SSS"; // why is this on YouTube
} }
voteSegmentTimeFormatter.applyPattern(formatPattern); voteSegmentTimeFormatter.applyPattern(formatPattern);