Git Product home page Git Product logo

Comments (3)

AlexPoint avatar AlexPoint commented on July 21, 2024 1

This is a good point!
I just fixed this behavior and published a new package (1.4.9) to nuget with this fix.
That must be one hell of a movie with subtitle items at more than 24 hours though! ;)
image

from subtitlesparser.

b-rad15 avatar b-rad15 commented on July 21, 2024

This code here

private int ParseVttTimecode(string s)
should parse hour numbers greater than 24 fine. What was the timecode that gave you the -1 error?

from subtitlesparser.

ElectiveRob avatar ElectiveRob commented on July 21, 2024

file i used to test

WEBVTT

00:01.000 --> 00:04.000
Never drink liquid nitrogen.

00:05.000 --> 00:09.000
 It will perforate your stomach.
 You could die.

23:00:05.000 --> 23:59:59.999
 It will perforate your stomach.
 You could die.

24:00:00.000 --> 55:00:00.000
 It will perforate your stomach.
 You could die.

See that 23:59:59.999 wil be parsed correctly
but 24:00:00.000 wil be -1

image

TimeSpan.TryParse doesn't seem to support the notation

if (TimeSpan.TryParse(timeString, out result))

from subtitlesparser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.