Aggiunge i tornei con hub, pagina pubblica e tabellone per semifinali e finali.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -33,7 +33,11 @@ module Public
|
||||
.order(scheduled_at: :asc)
|
||||
.limit(50)
|
||||
|
||||
@online_paths = Mediamtx::Client.new.online_path_names
|
||||
tournaments = Tournament.listed_on_live.with_attached_logo_file.includes(:club).search_public(@query)
|
||||
tournaments = tournaments.where(club_id: @club.id) if @club
|
||||
@public_tournaments = tournaments.order(starts_on: :desc, name: :asc).limit(12)
|
||||
|
||||
@online_paths = fetch_online_paths
|
||||
|
||||
return unless logged_in? && @club
|
||||
|
||||
@@ -83,5 +87,13 @@ module Public
|
||||
score: session.score_state&.as_cable_payload
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def fetch_online_paths
|
||||
Mediamtx::Client.new.online_path_names
|
||||
rescue Mediamtx::Client::Error, Errno::ECONNREFUSED, SocketError
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user