spoolman: filter spool_id before setting it active
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
17ffb4455e
commit
a71c5c159d
|
@ -107,6 +107,9 @@ class SpoolManager:
|
|||
await self.track_filament_usage()
|
||||
|
||||
async def set_active_spool(self, spool_id: Optional[int]) -> None:
|
||||
if self.spool_id == spool_id:
|
||||
logging.info(f"Spool ID already set to: {spool_id}")
|
||||
return
|
||||
# Store the current spool usage before switching
|
||||
if self.spool_id is not None:
|
||||
await self.track_filament_usage()
|
||||
|
|
Loading…
Reference in New Issue