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>
35 lines
956 B
Ruby
35 lines
956 B
Ruby
module Recordings
|
|
class ReplayMailer < ApplicationMailer
|
|
default from: -> { MatchLiveTv.mail_from }
|
|
|
|
def replay_ready(recording:, recipient:)
|
|
@recording = recording
|
|
@team = recording.team
|
|
@club = @team.club
|
|
@recipient = recipient
|
|
@replay_url = recording.replay_url
|
|
@expires_at = recording.expires_at
|
|
|
|
mail(
|
|
to: recipient.email,
|
|
subject: "Replay pronto — #{recording.title_or_default}"
|
|
)
|
|
end
|
|
|
|
def replay_expiring_soon(recording:, recipient:)
|
|
@recording = recording
|
|
@team = recording.team
|
|
@club = @team.club
|
|
@recipient = recipient
|
|
@replay_url = recording.replay_url
|
|
@expires_at = recording.expires_at
|
|
@days_left = ((recording.expires_at - Time.current) / 1.day).ceil
|
|
|
|
mail(
|
|
to: recipient.email,
|
|
subject: "Replay in scadenza tra #{@days_left} giorni — #{recording.title_or_default}"
|
|
)
|
|
end
|
|
end
|
|
end
|