record-and-playback: Fixed bug in original state of recordings.

This commit is contained in:
jfederico 2016-02-09 17:26:29 -05:00
parent 3346a93a72
commit 0c2eaf5f11

View File

@ -997,11 +997,13 @@ begin
recording = metadata.root recording = metadata.root
state = recording.at_xpath("state") state = recording.at_xpath("state")
state.content = "published" state.content = "published"
published = recording.at_xpath("published")
published.content = "true"
## Remove empty playback ## Remove empty playback
metadata.search('//recording/playback').each do |playback| metadata.search('//recording/playback').each do |playback|
playback.remove playback.remove
end end
## Update status and add the actual playback ## Add the actual playback
metadata_with_playback = Nokogiri::XML::Builder.with(metadata.at('recording')) do |xml| metadata_with_playback = Nokogiri::XML::Builder.with(metadata.at('recording')) do |xml|
xml.playback { xml.playback {
xml.format("presentation") xml.format("presentation")