add filesystem rescan to video migration

This commit is contained in:
simon
2023-05-07 15:40:01 +07:00
parent 774780d520
commit c327e94726

View File

@@ -11,6 +11,7 @@ from django.core.management.base import BaseCommand, CommandError
from home.src.es.connect import ElasticWrap, IndexPaginate
from home.src.es.index_setup import ElasitIndexWrap
from home.src.es.snapshot import ElasticSnapshot
from home.src.index.filesystem import Filesystem
from home.src.index.video_streams import MediaStreamExtractor
from home.src.ta.config import AppConfig, ReleaseVersion
from home.src.ta.helper import clear_dl_cache
@@ -162,6 +163,8 @@ class Command(BaseCommand):
self.stdout.write(" no videos need updating")
return
self.stdout.write(" start filesystem rescan")
Filesystem().process()
total = len(all_missing)
for idx, missing in enumerate(all_missing):
media_url = missing["media_url"]