fix - cleared status too early before it could be read for live status updated. Musicbrainz
This commit is contained in:
parent
2a4cab3f96
commit
8cdf548561
1 changed files with 4 additions and 4 deletions
|
|
@ -112,12 +112,14 @@ class MusicBrainzWorker:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Clear previous item before getting next
|
||||||
|
self.current_item = None
|
||||||
|
|
||||||
# Get next item to process
|
# Get next item to process
|
||||||
item = self._get_next_item()
|
item = self._get_next_item()
|
||||||
|
|
||||||
if not item:
|
if not item:
|
||||||
# No more items - sleep for a bit
|
# No more items - sleep for a bit
|
||||||
self.current_item = None
|
|
||||||
logger.debug("No pending items, sleeping...")
|
logger.debug("No pending items, sleeping...")
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
continue
|
continue
|
||||||
|
|
@ -128,9 +130,7 @@ class MusicBrainzWorker:
|
||||||
# Process the item
|
# Process the item
|
||||||
self._process_item(item)
|
self._process_item(item)
|
||||||
|
|
||||||
# Clear current item after processing
|
# Keep current_item set during sleep so UI can see what was just processed
|
||||||
self.current_item = None
|
|
||||||
|
|
||||||
# Rate limit: 1 request per second
|
# Rate limit: 1 request per second
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue