Skip to content

Commit

Permalink
Link the apple_hosted_audio_asset_container_id when upload is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
svevang committed Aug 7, 2023
1 parent dffaba5 commit 711ef50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/apple/publisher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ def sync_podcast_containers!(eps)
res = Apple::PodcastContainer.create_podcast_containers(api, eps)
Rails.logger.info("Created remote and local state for podcast containers.", {count: res.length})

res = Apple::Episode.update_audio_container_reference(api, eps)
Rails.logger.info("Updated remote container references for episodes.", {count: res.length})

reset = Apple::PodcastContainer.reset_source_file_metadata(eps)
Rails.logger.info("Reset podcast containers for expired source urls.", {reset_count: reset.length})

Expand Down Expand Up @@ -247,6 +244,9 @@ def mark_delivery_files_uploaded!(eps)
Rails.logger.tagged("##{__method__}") do
pdfs = eps.map(&:podcast_delivery_files).flatten
::Apple::PodcastDeliveryFile.mark_uploaded(api, pdfs)

res = Apple::Episode.update_audio_container_reference(api, eps)
Rails.logger.info("Updated remote container references for episodes.", {count: res.length})
end
end

Expand Down

0 comments on commit 711ef50

Please sign in to comment.