Abilita l'embed YouTube sulle dirette e tiene la copia locale se il VOD non è incorporabile.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-28 15:05:12 +02:00
co-authored by Cursor
parent 05ef56c56d
commit 42dadb993d
6 changed files with 104 additions and 32 deletions
@@ -15,7 +15,16 @@ module Recordings
result = Recordings::VerifyYoutubeReplay.new(recording).call
if result.ok?
Recordings::ClearTemporaryMediaJob.perform_async(recording.id, "verified")
recording.reload
embeddable = recording.metadata.is_a?(Hash) && recording.metadata.dig("youtube", "embeddable") != false
if embeddable
Recordings::ClearTemporaryMediaJob.perform_async(recording.id, "verified")
else
Rails.logger.warn(
"[Recordings::VerifyYoutubeReplayJob] keep_temp recording=#{recording.id} " \
"youtube_not_embeddable"
)
end
return
end