just some helpful little utility functions that are used by generate_subtitle_map and cache_subtitles