Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
De-deuplicate file lists generated from structMaps
Browse files Browse the repository at this point in the history
  • Loading branch information
escowles committed Dec 20, 2016
1 parent 3a786ae commit 023c31a
Show file tree
Hide file tree
Showing 3 changed files with 15,073 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/mets_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def label_for_volume(volume_id)
end

def files_for_volume(volume_id)
@mets.xpath("//mets:div[@ID='#{volume_id}']//mets:fptr/@FILEID").map do |file_id|
file_info(@mets.xpath("//mets:file[@ID='#{file_id.value}']"), volume_id)
@mets.xpath("//mets:div[@ID='#{volume_id}']//mets:fptr/@FILEID").map(&:value).uniq.each do |file_id|
file_info(@mets.xpath("//mets:file[@ID='#{file_id}']"), volume_id)
end
end

Expand Down

0 comments on commit 023c31a

Please sign in to comment.