mantas-done / subtitles

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

Load subtitles from string documentation is misleading #92

Closed kminek closed 1 month ago

kminek commented 1 month 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 1 month 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.