mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 21:39:49 +00:00
ignore now also removes itself from redis queue
This commit is contained in:
@@ -15,6 +15,7 @@ from django.views import View
|
|||||||
from home.src.config import AppConfig
|
from home.src.config import AppConfig
|
||||||
from home.src.download import ChannelSubscription, PendingList
|
from home.src.download import ChannelSubscription, PendingList
|
||||||
from home.src.helper import (
|
from home.src.helper import (
|
||||||
|
RedisQueue,
|
||||||
get_dl_message,
|
get_dl_message,
|
||||||
get_message,
|
get_message,
|
||||||
process_url_list,
|
process_url_list,
|
||||||
@@ -506,10 +507,12 @@ class PostData:
|
|||||||
|
|
||||||
def ignore(self):
|
def ignore(self):
|
||||||
"""ignore from download queue"""
|
"""ignore from download queue"""
|
||||||
print("ignore video")
|
id_to_ignore = self.exec_val
|
||||||
|
print("ignore video " + id_to_ignore)
|
||||||
handler = PendingList()
|
handler = PendingList()
|
||||||
ignore_list = self.exec_val
|
handler.ignore_from_pending([id_to_ignore])
|
||||||
handler.ignore_from_pending([ignore_list])
|
# also clear from redis queue
|
||||||
|
RedisQueue("dl_queue").clear_item(id_to_ignore)
|
||||||
return {"success": True}
|
return {"success": True}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user