Page MenuHomePhabricator

Video API calls listing video subtitle files twice
Open, Needs TriagePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

  • Produces a list of en-gb, en-gb, de, de, nl, nl subtitles

What should have happened instead?:

  • Produces a list of en-gb, de, nl subtitles

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Event Timeline

ashley subscribed.

So it seems that the relevant code originates from TimedMediaHandler's includes/ApiQueryVideoInfo.php file. However, while it is indeed true that as per the initial report, all three available languages are listed twice, this looks to be the "intended behavior" because they are different formats (srt and vtt) and ApiQueryVideoInfo#getInfo intentionally seems to construct a TextHandler instance that is passed both formats as the second parameter, i.e. "get me all subtitles in srt and also vrt formats".

From a consumer POV this is admittedly somewhat confusing and the API behavior should probably be clarified...

Thank you @ashley you are quite right. This is probably best fixed by explanation in the API documentation.