mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 20:00:15 +00:00
dont index playlists without videos
This commit is contained in:
parent
fef26a06b2
commit
85d12d6c68
@ -232,6 +232,14 @@ def index_channel_playlists(channel_id):
|
|||||||
playlist_id, all_youtube_ids=all_youtube_ids
|
playlist_id, all_youtube_ids=all_youtube_ids
|
||||||
)
|
)
|
||||||
playlist_handler.get_playlist_dict()
|
playlist_handler.get_playlist_dict()
|
||||||
|
# don't add if no videos downloaded
|
||||||
|
downloaded = [
|
||||||
|
i
|
||||||
|
for i in playlist_handler.playlist_dict["playlist_entries"]
|
||||||
|
if i["downloaded"]
|
||||||
|
]
|
||||||
|
if not downloaded:
|
||||||
|
continue
|
||||||
playlist_handler.upload_to_es()
|
playlist_handler.upload_to_es()
|
||||||
playlist_handler.add_vids_to_playlist()
|
playlist_handler.add_vids_to_playlist()
|
||||||
|
|
||||||
|
@ -782,9 +782,6 @@ class PlaylistView(View):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"filter": [
|
|
||||||
{"term": {"playlist_entries.downloaded": True}}
|
|
||||||
],
|
|
||||||
"minimum_should_match": 1,
|
"minimum_should_match": 1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user