mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-25 21:20:15 +00:00
fix duplication issue with download_now
This commit is contained in:
parent
fb1913f912
commit
91a57cc780
@ -146,6 +146,7 @@ class RedisQueue:
|
||||
|
||||
def add_priority(self, to_add):
|
||||
"""add single video to front of queue"""
|
||||
self.clear_item(to_add)
|
||||
self.conn.execute_command("LPUSH", self.key, to_add)
|
||||
|
||||
def get_next(self):
|
||||
@ -161,6 +162,10 @@ class RedisQueue:
|
||||
"""delete list from redis"""
|
||||
self.conn.execute_command("DEL", self.key)
|
||||
|
||||
def clear_item(self, to_clear):
|
||||
"""remove single item from list if it's there"""
|
||||
self.conn.execute_command("LREM", self.key, 0, to_clear)
|
||||
|
||||
|
||||
class DurationConverter:
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user