Skip to content

{{youtube-timestamp }} value parsing issues #9920

@jf

Description

@jf

Search first

  • I searched and no similar issues were found

What Happened?

2 things: the first is an issue, and the second would IMO be considered an issue, and definitely less than ideal

  1. For youtube timestamps in the following format: {{youtube-timestamp N:N:NN}} (e.g. {{youtube-timestamp 0:1:03}}, or {{youtube-timestamp 0:01:3}}), parsing fails, and nothing shows in Logseq. One would expect (in the case of the given example) a timestamp of 01:03 (1m, 3s)... but in this case, nothing shows. You NEED to give Logseq 2 digits, for both minutes, and seconds. But Logseq has no issues with a single digit for the hour marker
  2. in the case of timestamps with "NN:NN", Logseq also assumes "hour:min"... instead of probably the more common use case of "min:sec" (so {{youtube-timestamp 10:44}} would hour 10, minute 44, instead of minute 10, second 44). This is especially counter-intuitive, given how in the displayed UI for the timestamp, an "NN:NN" is always "min:sec". To get {{youtube-timestamp}} to display 10m44s, you would NEED to give 0 for the hour (so {{youtube-timestamp 0:10:44}})

Reproduce the Bug

See "What Happened?"

Expected Behavior

No response

Screenshots

No response

Desktop or Mobile Platform Information

macOS, Desktop App v0.9.11 (64)

Additional Context

(just as a note, I'm willing to submit a PR, but I've yet to dive into the code)

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    parserMarkdown/Org parser related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions