WGBH-MLA / mlavalon

Apache License 2.0
0 stars 0 forks source link

'Add An Audio/Video Facet' -> add facet for 'Resource Type' field #109

Closed foglabs-zen closed 3 years ago

foglabs-zen commented 4 years ago

Done When: -There is a facet for the 'Resource Type' Field -'Resource Type' only accepts either 'Sound Recording' or 'Moving Image' as values, to enable faceting of resource type field

foglabs-zen commented 4 years ago

There is already a facet for avalon_resource_type, but the facet is labelled as 'Format'. There is both a 'Format' and a 'Resource Type' field on the Ingest API soooooo... gonna have to figure out what's going on there.

foglabs-zen commented 4 years ago

Resource Type column's value is getting wiped out on ingest because its not duplicated on MasterFile#file_format:


  def set_resource_types!
    self.avalon_resource_type = master_files.reject {|mf| mf.file_format.blank? }.collect{ |mf|
      case mf.file_format
      when 'Moving image'
        'moving image'
      when 'Sound'
        'sound recording'
      else
        mf.file_format.downcase
      end
    }.uniq
  end
foglabs-zen commented 4 years ago

We should probably omit the 'resource type' column and instead require 'file format' for each file, since the former will be wiped out in lieu of the latter unless we hack dat.

foglabs-zen commented 4 years ago

^ Confirmed

singlesoliloquy commented 4 years ago

@foglabs-zen I'm not seeing this. Should there be a facet called "Resource Type" or am I misreading something?