mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:49:31 +00:00
dont index playlists without videos
This commit is contained in:
@@ -232,6 +232,14 @@ def index_channel_playlists(channel_id):
|
||||
playlist_id, all_youtube_ids=all_youtube_ids
|
||||
)
|
||||
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.add_vids_to_playlist()
|
||||
|
||||
|
||||
@@ -782,9 +782,6 @@ class PlaylistView(View):
|
||||
}
|
||||
}
|
||||
],
|
||||
"filter": [
|
||||
{"term": {"playlist_entries.downloaded": True}}
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user