mantas-done / subtitles

Subtitle/caption converter
https://gotranscript.com/subtitle-converter
MIT License
143 stars 50 forks source link

Load subtitles from string documentation is misleading #92

Closed kminek closed 2 months ago

kminek commented 2 months ago

Hi,

according to the docs:

$subtitles = Subtitles::loadFromString($string, 'srt');

but in fact second param is boolean strict flag and the format is detected from string contents. IMHO it should be option to explictly pass format to invoke selected parser and skip auto-detection from string contents.

mantas-done commented 2 months ago

Hi, Fixed the docs. When using an older version of library (before 1.x) you needed to specify the format of a string. But the current library reliably detects the format of the file from it's content.