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