Page MenuHomePhabricator

Include file information (imageinfo) in JSON output of MediaInfo entities
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
The JSON output for MediaInfo entities should include the same file information that is included for RDF formats.

For example, https://commons.wikimedia.org/wiki/Special:EntityData/M1547.ttl includes

sdc:M1547 a schema:MediaObject,
            schema:AudioObject ;
          schema:encodingFormat "application/ogg" ;
          schema:contentUrl <https://upload.wikimedia.org/wikipedia/commons/d/db/Nl-Nederlands.ogg> ;
          schema:url <http://commons.wikimedia.org/wiki/Special:FilePath/Nl-Nederlands.ogg> ;
          schema:contentSize "26195"^^xsd:integer ;
          schema:duration "PT1.369977324263S"^^xsd:duration .

The only similar information included in https://commons.wikimedia.org/wiki/Special:EntityData/M1547.json is "title": "File:Nl-Nederlands.ogg".

Some other properties included in the RDF output but not the JSON output are schema:height, schema:width and schema:numberOfPages.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Users have started running bots to duplicate this information as statements in the structured data (discussion here) where it can get out of sync.

Benefits (why should this be implemented?):

It would provide users of the JSON data with the same information as users of the RDF data.
There would be no need to duplicate the data as statements, which requires less maintenance and the data would not get out of sync.