mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 11:50:14 +00:00
fix linting, update doc string
This commit is contained in:
parent
9a2dead76c
commit
e858bba944
@ -2,6 +2,7 @@
|
|||||||
Functionality:
|
Functionality:
|
||||||
- handele the download queue
|
- handele the download queue
|
||||||
- manage subscriptions to channels
|
- manage subscriptions to channels
|
||||||
|
- manage subscriptions to playlists
|
||||||
- downloading videos
|
- downloading videos
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -786,11 +787,11 @@ class VideoDownloader:
|
|||||||
now_lte = now - autodelete_days * 24 * 60 * 60
|
now_lte = now - autodelete_days * 24 * 60 * 60
|
||||||
data = {
|
data = {
|
||||||
"query": {"range": {"player.watched_date": {"lte": now_lte}}},
|
"query": {"range": {"player.watched_date": {"lte": now_lte}}},
|
||||||
"sort": [{"player.watched_date": {"order": "asc"}}]
|
"sort": [{"player.watched_date": {"order": "asc"}}],
|
||||||
}
|
}
|
||||||
all_to_delete = IndexPaginate("ta_video", data).get_results()
|
all_to_delete = IndexPaginate("ta_video", data).get_results()
|
||||||
|
|
||||||
for to_delete in all_to_delete:
|
for to_delete in all_to_delete:
|
||||||
youtube_id = to_delete["youtube_id"]
|
youtube_id = to_delete["youtube_id"]
|
||||||
print(f"autodelete {youtube_id}")
|
print(f"autodelete {youtube_id}")
|
||||||
YoutubeVideo(youtube_id).delete_media_file()
|
YoutubeVideo(youtube_id).delete_media_file()
|
||||||
|
Loading…
Reference in New Issue
Block a user