mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 13:19:58 -05:00
Setting FileGroup.censored when refreshing channel files.
This commit is contained in:
parent
1fbfb990f1
commit
0fd545d2e8
5 changed files with 62 additions and 13 deletions
|
|
@ -657,15 +657,15 @@ class Channel(ModelHelper, Base):
|
|||
await refresh_files([self.directory], send_events=send_events)
|
||||
|
||||
# Apply any info_json (update view counts) second.
|
||||
from modules.videos.common import update_view_counts
|
||||
from modules.videos.common import update_view_counts_and_censored
|
||||
if PYTEST:
|
||||
await update_view_counts(self_id)
|
||||
await update_view_counts_and_censored(self_id)
|
||||
self.refreshed = True
|
||||
else:
|
||||
|
||||
# Perform info_json in background task. Channel will be marked as refreshed after this completes.
|
||||
async def _():
|
||||
await update_view_counts(self_id)
|
||||
await update_view_counts_and_censored(self_id)
|
||||
with get_db_session(commit=True) as session:
|
||||
channel: Channel = session.query(Channel).filter(Channel.id == self_id).one()
|
||||
channel.refreshed = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue