App: scelta canale YouTube MLTV/società, privacy e condivisione link.
Premium Full può forzare il canale piattaforma; visibilità non in elenco o privato; share_url unificato per Match Live TV e YouTube. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -90,6 +90,21 @@ class StreamSession < ApplicationRecord
|
||||
"#{MatchLiveTv.app_public_url.chomp('/')}/live/#{id}"
|
||||
end
|
||||
|
||||
def youtube_watch_url
|
||||
return nil if youtube_broadcast_id.blank?
|
||||
return nil if youtube_broadcast_id.to_s.start_with?("mock_")
|
||||
|
||||
"https://www.youtube.com/watch?v=#{youtube_broadcast_id}"
|
||||
end
|
||||
|
||||
def share_url
|
||||
if platform == "youtube"
|
||||
youtube_watch_url.presence || watch_page_url
|
||||
else
|
||||
watch_page_url
|
||||
end
|
||||
end
|
||||
|
||||
def terminal?
|
||||
status.in?(%w[ended error])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user