Fix bug ignoring all candidates regardless of is_shorts.
In my hasty fix for the previous bug, I forgot part of the reason I had done the manual sql update. We need to set the is_shorts column. Also in my hasty fix I dropped the if entirely which auto ignored all shorts candidates instead of the ones confirmed by API.
This commit is contained in:
parent
b46dc1feb1
commit
39d4c8bb9f
1 changed files with 7 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue