Function subparse::get_subtitle_format
[−]
[src]
pub fn get_subtitle_format(
ending: &str,
content: &[u8]
) -> Option<SubtitleFormat>
Returns the subtitle format by the file ending and provided content.
Calling the function with the full file path or simply a get_subtitle_format(".sub", content)
both work. Returns None
if subtitle format could not be recognized.
It works exactly the same as get_subtitle_format_by_ending
(see documentation), but also handles the .sub
cases
correctly by using the provided content of the file as secondary info.