metadata: move metadata parsing into ExifTool::Metadata.
Move the metadata parsing code from MediaAsset to ExifTool::Metadata so we can use it outside the context of a MediaAsset, in particular when dealing with a MediaFile that hasn't been saved to disk yet.
This commit is contained in:
@@ -23,4 +23,8 @@ class MediaMetadata < ApplicationRecord
|
||||
def file=(file_or_path)
|
||||
self.metadata = MediaFile.open(file_or_path).metadata
|
||||
end
|
||||
|
||||
def metadata
|
||||
ExifTool::Metadata.new(self[:metadata])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user