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:
20
backend/app/services/recordings/club_stats.rb
Normal file
20
backend/app/services/recordings/club_stats.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
module Recordings
|
||||
class ClubStats
|
||||
def initialize(club)
|
||||
@club = club
|
||||
end
|
||||
|
||||
def call
|
||||
scope = Recording.for_club(@club).not_deleted
|
||||
ready = scope.ready
|
||||
{
|
||||
available_count: ready.count,
|
||||
expiring_soon_count: ready.expiring_within(7).count,
|
||||
total_bytes: ready.sum(:byte_size).to_i,
|
||||
total_views: ready.sum(:view_count).to_i,
|
||||
processing_count: scope.where(status: "processing").count,
|
||||
failed_count: scope.where(status: "failed").count
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user