mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:59:39 +00:00
fix unknown videos at startup
This commit is contained in:
@@ -128,11 +128,23 @@ class StartupCheck:
|
|||||||
ReleaseVersion().is_updated()
|
ReleaseVersion().is_updated()
|
||||||
|
|
||||||
def es_set_vid_type(self):
|
def es_set_vid_type(self):
|
||||||
"""update path 0.3.0 to 0.3.1, set default vid_type to video"""
|
"""
|
||||||
|
update path 0.3.0 to 0.3.1, set default vid_type to video
|
||||||
|
fix unidentified vids in unstable
|
||||||
|
"""
|
||||||
index_list = ["ta_video", "ta_download"]
|
index_list = ["ta_video", "ta_download"]
|
||||||
data = {
|
data = {
|
||||||
"query": {
|
"query": {
|
||||||
"bool": {"must_not": [{"exists": {"field": "vid_type"}}]}
|
"bool": {
|
||||||
|
"should": [
|
||||||
|
{
|
||||||
|
"bool": {
|
||||||
|
"must_not": [{"exists": {"field": "vid_type"}}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{"term": {"vid_type": {"value": "unknown"}}},
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"script": {"source": "ctx._source['vid_type'] = 'videos'"},
|
"script": {"source": "ctx._source['vid_type'] = 'videos'"},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user