Page MenuHomePhabricator

Scribunto's mw.title file metadata should include length for audio/video files
Closed, ResolvedPublic

Description

There's some file metadata available via mw.title: https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#File_metadata

I was thinking this functionality could be used to enhance https://en.wikipedia.org/wiki/Template:Listen which suggests users to manually include length information.

Related Objects

Event Timeline

Anomie subscribed.

Should be easy enough, just add

'length' => $file->getLength(),

to the array returned by Scribunto_LuaTitleLibrary::getFileInfo() (link).

Change 650107 had a related patch set uploaded (by Shubham656jain; owner: Shubham656jain):
[mediawiki/extensions/Scribunto@master] Add length attribute in TitleLibrary.php

https://gerrit.wikimedia.org/r/650107

Change 650107 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@master] Add length attribute in TitleLibrary.php

https://gerrit.wikimedia.org/r/650107

Ammarpad assigned this task to Shubham656jain.