Completa modulo Replay: S3, retention, sync YouTube e gestione società.
Streaming chunked da Garage, purge con delete YouTube, privacy sincronizzata, archivio club migliorato, retention 30/90 separata da stato abbonamento. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -141,6 +141,28 @@ class Recording < ApplicationRecord
|
||||
count == 1 ? "1 visualizzazione" : "#{count} visualizzazioni"
|
||||
end
|
||||
|
||||
def source_platform
|
||||
metadata.is_a?(Hash) ? metadata["source_platform"].presence : nil
|
||||
end
|
||||
|
||||
def source_platform_label
|
||||
case source_platform
|
||||
when "youtube" then "YouTube"
|
||||
when "matchlivetv" then "Match Live TV"
|
||||
else "—"
|
||||
end
|
||||
end
|
||||
|
||||
def playable_on_site?
|
||||
ready? && storage_key.present?
|
||||
end
|
||||
|
||||
def days_until_expiry
|
||||
return nil unless expires_at
|
||||
|
||||
((expires_at - Time.current) / 1.day).ceil
|
||||
end
|
||||
|
||||
def status_label
|
||||
return "Eliminato" if deleted?
|
||||
return "Scaduto" if status == "expired"
|
||||
|
||||
Reference in New Issue
Block a user