last_sent_time updated in submit_collection()
@@ -328,6 +328,7 @@ def submit_collection(self):
logger.info(f"Updated Trakt collection: {result}")
finally:
self.collection.clear()
+ self.last_sent_time = time()
def queue_size(self):
size = 0
@@ -345,7 +346,6 @@ def flush(self, force=False):
elapsed = time() - self.last_sent_time
if elapsed >= self.batch_delay or force is True:
self.submit_collection()
- self.last_sent_time = time()
def add_to_collection(self, media_type: str, item):
"""
