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>
21 lines
537 B
Ruby
21 lines
537 B
Ruby
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
|