mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 12:26:19 -05:00
Changing video view_count to bigint for popular videos.
This commit is contained in:
parent
387ef6dfe8
commit
a5dee64af2
3 changed files with 31 additions and 2 deletions
|
|
@ -351,7 +351,7 @@ async def update_view_counts_and_censored(channel_id: int):
|
|||
with get_db_curs(commit=True) as curs:
|
||||
# Update the view_count for each video.
|
||||
stmt = '''
|
||||
WITH source AS (select * from json_to_recordset(%s::json) as (id text, view_count int))
|
||||
WITH source AS (select * from json_to_recordset(%s::json) as (id text, view_count bigint))
|
||||
UPDATE video
|
||||
SET view_count = s.view_count
|
||||
FROM source as s
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class Video(ModelHelper, Base):
|
|||
id = Column(Integer, primary_key=True)
|
||||
|
||||
source_id = Column(String) # The id from yt-dlp
|
||||
view_count = Column(Integer) # The view count from the ChannelDownloader (or from initial download)
|
||||
view_count = Column(BigInteger) # The view count from the ChannelDownloader (or from initial download)
|
||||
ffprobe_json = deferred(Column(JSONB)) # Data that is fetched once from ffprobe (ffmpeg)
|
||||
have_comments = Column(Boolean, default=False) # see `get_missing_videos_comments`
|
||||
comments_failed = Column(Boolean, default=False) # see `get_missing_videos_comments`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue