Page MenuHomePhabricator

Scribunto's mw.title file metadata should include length for audio/video files
Open, Needs TriagePublic

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.

Event Timeline

Legoktm created this task.Nov 16 2018, 7:39 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 16 2018, 7:39 AM
Anomie added a subscriber: Anomie.

Should be easy enough, just add

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

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

Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:01 PM