Aggiunge modulo Replay, Garage dev e YouTube a livello società.
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>
This commit is contained in:
@@ -96,5 +96,49 @@ module MatchLiveTv
|
||||
def password_reset_expiry_hours
|
||||
ENV.fetch("PASSWORD_RESET_EXPIRY_HOURS", "2").to_i
|
||||
end
|
||||
|
||||
def replay_storage_configured?
|
||||
replay_storage_endpoint.present? || replay_storage_local?
|
||||
end
|
||||
|
||||
def replay_storage_endpoint
|
||||
ENV["REPLAY_STORAGE_ENDPOINT"].presence
|
||||
end
|
||||
|
||||
def replay_storage_bucket
|
||||
ENV.fetch("REPLAY_STORAGE_BUCKET", "matchlivetv-replays")
|
||||
end
|
||||
|
||||
def replay_storage_region
|
||||
ENV.fetch("REPLAY_STORAGE_REGION", "garage")
|
||||
end
|
||||
|
||||
def replay_storage_access_key_id
|
||||
ENV["REPLAY_STORAGE_ACCESS_KEY_ID"].presence
|
||||
end
|
||||
|
||||
def replay_storage_secret_access_key
|
||||
ENV["REPLAY_STORAGE_SECRET_ACCESS_KEY"].presence
|
||||
end
|
||||
|
||||
def replay_storage_force_path_style?
|
||||
ENV.fetch("REPLAY_STORAGE_FORCE_PATH_STYLE", "true") == "true"
|
||||
end
|
||||
|
||||
def replay_storage_local?
|
||||
replay_storage_endpoint.blank?
|
||||
end
|
||||
|
||||
def recordings_local_path
|
||||
ENV.fetch("RECORDINGS_PATH", "/recordings")
|
||||
end
|
||||
|
||||
def replay_presigned_url_ttl_seconds
|
||||
ENV.fetch("REPLAY_PRESIGNED_URL_TTL_SECONDS", "7200").to_i
|
||||
end
|
||||
|
||||
def replay_download_url_ttl_seconds
|
||||
ENV.fetch("REPLAY_DOWNLOAD_URL_TTL_SECONDS", "900").to_i
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -24,6 +24,13 @@ Rails.application.routes.draw do
|
||||
get "youtube/authorize", to: "youtube#authorize"
|
||||
end
|
||||
|
||||
resources :recordings, only: %i[update destroy], controller: "recordings" do
|
||||
member do
|
||||
get :download
|
||||
post :publish_youtube
|
||||
end
|
||||
end
|
||||
|
||||
resources :matches, only: %i[show update destroy] do
|
||||
resources :sessions, only: %i[create], controller: "stream_sessions"
|
||||
end
|
||||
@@ -87,7 +94,11 @@ Rails.application.routes.draw do
|
||||
get "live", to: "public/live#index", as: :public_live_index
|
||||
get "live/:id", to: "public/live#show", as: :public_live
|
||||
get "live/:id/status.json", to: "public/live#status", as: :public_live_status
|
||||
get "replay", to: "public/replay#index", as: :public_replay_index
|
||||
get "replay/:id", to: "public/replay#show", as: :public_replay
|
||||
get "replay/:id/stream", to: "public/replay#stream", as: :public_replay_stream
|
||||
get "replay/:id/thumbnail", to: "public/replay#thumbnail", as: :public_replay_thumbnail
|
||||
get "replay/:id/download", to: "public/replay#download", as: :public_replay_download
|
||||
|
||||
get "regia/:token", to: "public/regia#show", as: :public_regia
|
||||
get "regia/:token/status.json", to: "public/regia#status", as: :public_regia_status
|
||||
@@ -121,12 +132,18 @@ Rails.application.routes.draw do
|
||||
get "clubs/:id/edit", to: "clubs#edit", as: :edit_club
|
||||
patch "clubs/:id", to: "clubs#update"
|
||||
get "clubs/:id/billing", to: "clubs#billing", as: :club_billing
|
||||
get "clubs/:club_id/replays", to: "club_recordings#index", as: :club_recordings
|
||||
patch "clubs/:club_id/replays/:id", to: "club_recordings#update", as: :club_recording
|
||||
delete "clubs/:club_id/replays/:id", to: "club_recordings#destroy"
|
||||
post "clubs/:club_id/replays/:id/publish_youtube", to: "club_recordings#publish_youtube", as: :club_recording_publish_youtube
|
||||
get "clubs/:id/billing/profile", to: "club_billing#profile", as: :club_billing_profile
|
||||
patch "clubs/:id/billing/profile", to: "club_billing#update_profile"
|
||||
post "clubs/:id/billing/cancel_subscription", to: "club_billing#cancel_subscription", as: :club_billing_cancel_subscription
|
||||
get "clubs/:id/billing/invoices/:invoice_id", to: "club_billing#download_invoice", as: :club_billing_invoice
|
||||
get "clubs/:id/checkout", to: "clubs#checkout", as: :club_checkout
|
||||
post "clubs/:id/portal", to: "clubs#portal", as: :club_portal
|
||||
get "clubs/:id/youtube/connect", to: "clubs#youtube_connect", as: :club_youtube_connect
|
||||
delete "clubs/:id/youtube/disconnect", to: "clubs#youtube_disconnect", as: :club_youtube_disconnect
|
||||
get "clubs/:club_id/matches/new", to: "club_matches#new", as: :new_club_match
|
||||
post "clubs/:club_id/matches", to: "club_matches#create", as: :club_matches
|
||||
get "teams/new", to: redirect("/clubs/new")
|
||||
|
||||
Reference in New Issue
Block a user