Skip to content

mpv-copyTime does not work properly when seconds counter is between 30 and 60 #17

@wireless2web

Description

@wireless2web

When the second counter in video is between 30 and 60, the "copied to clipboard" time value displayed on the screen is incorrectly incremented to the next minute. The problem is demonstrated in this video: https://youtu.be/TDMy5ifh1d8

In the video, I repetitively press ctrl-C. As you can see, the "copied to clipboard" value is correct up to 29 seconds. After 29 seconds the "copied to clipboard" is one minute greater than it should be.

It looks like the divmod function needs a math.floor() around the "a/b".

local function divmod(a, b)
return math.floor(a / b), a % b
end

Thanks for the useful code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions