@maru-sama ok, the more I think about this the more I'm convinced it is an idea worth persuing :D What I would propose is something along the lines of this:
apply_object_quirks(we could later do a
data_structures.DidlObject.from_element, as the very first thing pass element though that apply quirks function
What do you think?
So in the spotify direct case the following would happen.
We could also put logging in the function to inform the user if any quirks were applied. So if in the future sonos decides to fix this we can disable the quirk again.
Right now I think the worst thing that can happen is that we build this up just for this specific case and nothing else will use it, but on the other hand we keep the standard code clean and move all the special case handling to a separate module.