Skip to content

Commit

Permalink
fix(youtube/sponsorblock): Include milliseconds in the voting menu (#362
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mlnrDev authored and oSumAtrIX committed Apr 24, 2023
1 parent 7fc8e88 commit 6952c50
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -300,13 +300,13 @@ public static void onVotingClicked(@NonNull Context context) {
final long currentVideoLength = VideoInformation.getCurrentVideoLength();
final String formatPattern;
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)) {
formatPattern = "mm:ss"; // less than 1 hour
formatPattern = "mm:ss.SSS"; // less than 1 hour
} 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 {
formatPattern = "HH:mm:ss"; // why is this on YouTube
formatPattern = "HH:mm:ss.SSS"; // why is this on YouTube
}
voteSegmentTimeFormatter.applyPattern(formatPattern);

Expand Down

0 comments on commit 6952c50

Please sign in to comment.