Fix: race condition in provider config handling
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 22 Feb 2025 09:20:23 +0000 (10:20 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 22 Feb 2025 09:20:23 +0000 (10:20 +0100)
commit23927bab0776b5d6e310ddb2ec8ac263ebffdae2
tree4442a546b84d60f5326520ccf4bfcdbf1985e05b
parent5cb6399cb3ab14fe8918d8143237a4ca3a114e84
Fix: race condition in provider config handling

The config object within a provider is meant to be read-only but it was being used by providers also to update refresh tokens etc. This lead to race conditions because the provider has a cached copy of the config object. Also a failed login when the provider was already loaded was not properly handled. That is all adjusted now.
music_assistant/controllers/config.py
music_assistant/mass.py
music_assistant/models/provider.py
music_assistant/providers/builtin/__init__.py
music_assistant/providers/radiobrowser/__init__.py
music_assistant/providers/spotify/__init__.py
music_assistant/providers/tidal/__init__.py