Mantiene la copertina YouTube se il telefono cade e avvia ffmpeg sul nodo, non via SSH.
Il relay HLS→RTMPS resta sul worker/agent del nodo assegnato, così tre dirette contemporanee restano in onda sul sito e sul canale della società senza schermo nero. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,7 +32,8 @@ module Youtube
|
||||
end
|
||||
|
||||
def team_channel_available?
|
||||
@ent.youtube_enabled? && @ent.premium_full? && @mode == "team" && @team.club.youtube_credential.present?
|
||||
@ent.youtube_enabled? && @ent.premium_full? && @mode == "team" &&
|
||||
@team.club.youtube_credential&.usable?
|
||||
end
|
||||
|
||||
def effective_channel
|
||||
|
||||
@@ -63,7 +63,6 @@ module Youtube
|
||||
return
|
||||
end
|
||||
|
||||
Mediamtx::Client.for_session(session).set_always_available(session, enabled: false)
|
||||
session.go_live! if session.may_go_live?
|
||||
session.reconnect! if session.reconnecting? && session.may_reconnect?
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ module Youtube
|
||||
when "matchlivetv_light"
|
||||
PlatformCredential.configured?
|
||||
when "team"
|
||||
@team.club.youtube_credential.present? || PlatformCredential.configured?
|
||||
@team.club.youtube_credential&.usable? || PlatformCredential.configured?
|
||||
else
|
||||
false
|
||||
end
|
||||
@@ -31,7 +31,7 @@ module Youtube
|
||||
if @mode == "matchlivetv_light"
|
||||
PlatformCredential.configured?
|
||||
elsif @mode == "team"
|
||||
@team.club.youtube_credential.blank? && PlatformCredential.configured?
|
||||
!@team.club.youtube_credential&.usable? && PlatformCredential.configured?
|
||||
else
|
||||
false
|
||||
end
|
||||
@@ -46,7 +46,7 @@ module Youtube
|
||||
end
|
||||
|
||||
def needs_team_oauth?
|
||||
@mode == "team" && @ent.premium_full? && @team.club.youtube_credential.blank? && !PlatformCredential.configured?
|
||||
@mode == "team" && @ent.premium_full? && !@team.club.youtube_credential&.usable? && !PlatformCredential.configured?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user