diff --git a/frontends/ycdl_flask/backend/common.py b/frontends/ycdl_flask/backend/common.py index e85da64..81ce48e 100644 --- a/frontends/ycdl_flask/backend/common.py +++ b/frontends/ycdl_flask/backend/common.py @@ -151,7 +151,13 @@ def ignore_shorts_thread(rate): is_shorts = ycdl.ytapi.video_is_shorts(video.id) except Exception as exc: log.warning(traceback.format_exc()) - video.mark_state('ignored') + continue + video.is_shorts = is_shorts + pairs = {'id': video.id, 'is_shorts': int(is_shorts)} + if is_shorts: + pairs['state'] = 'ignored' + video.state = 'ignored' + ycdldb.update(table=ycdl.objects.Video, pairs=pairs, where_key='id') time.sleep(rate) def start_refresher_thread(rate):