Commiting using channel session.

This commit is contained in:
Roland 2022-01-07 14:46:03 -07:00
parent a96d6f97f3
commit 8f48e1b0d2
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -176,10 +176,8 @@ def refresh_channel_videos(channel: Channel):
logger.info(f'{channel.name}: {len(new_videos)} new videos, {len(existing_paths)} already existed. ')
with get_db_session(commit=True) as session:
# All videos have been discovered, mark the channel as refreshed.
channel.refreshed = True
session.add(channel)
channel.refreshed = True
Session.object_session(channel).commit()
apply_info_json(channel.id)