Aggiunge modulo Replay, Garage dev e YouTube a livello società.

Pipeline registrazione/upload con storage S3, archivio web e app, proxy replay
per il browser, OAuth YouTube sulla pagina club (Premium Full) e footer legale.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-03 07:53:11 +02:00
parent a87cda156b
commit 1f273f849d
87 changed files with 2952 additions and 195 deletions

View File

@@ -0,0 +1,28 @@
module Recordings
class DownloadUrl
class NotAllowed < StandardError; end
def initialize(recording, viewer: nil)
@recording = recording
@viewer = viewer
end
def call
raise NotAllowed, "Download non disponibile per questo piano" unless download_allowed?
raise ArgumentError, "Replay non pronto" unless @recording.ready?
raise ArgumentError, "File non disponibile" if @recording.storage_key.blank?
"#{MatchLiveTv.app_public_url.chomp('/')}/replay/#{@recording.stream_session_id}/download"
end
private
def download_allowed?
ent = @recording.team.entitlements
return false unless ent.phone_download_enabled?
policy = Recordings::AccessPolicy.new(@recording, viewer: @viewer)
policy.allowed? || policy.manage_allowed?
end
end
end