If the metadata that's stripped out of the files is added into the entity property info array it'll expose these values to projects like Services and RestWS.

patch coming

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

btopro created an issue. See original summary.

btopro’s picture

Status: Active » Needs review
FileSize
1.38 KB

patch adds support for everything exist tags since I can't figure that out since it's variable and a nested array. Most importantly this brings height, width and duration into scope of projects like RestWS so it's queryable.

mglaman’s picture

  1. +++ b/getid3.module
    @@ -298,3 +298,41 @@ function theme_getid3_sample_rate($variables) {
    +      'label' => t('Getid3 @id', array('@id' => $property)),
    

    Maybe just "ID3" since that's the actual metadata spec

  2. +++ b/getid3.module
    @@ -298,3 +298,41 @@ function theme_getid3_sample_rate($variables) {
    + * @see read_time_entity_property_info_alter()
    

    Should this be "getid3"?

  3. +++ b/getid3.module
    @@ -298,3 +298,41 @@ function theme_getid3_sample_rate($variables) {
    +  if (isset($file->metadata[$name])) {
    +    return $file->metadata[$name];
    +  }
    

    Shoot, it'd be nice if File entity had a helper for this.