-
Notifications
You must be signed in to change notification settings - Fork 701
Description
I've been working on an extension that was basically meant to override and "enhance" the basic MPD frontend, giving the ability to configure what actions users can perform on a playlist, how many requests can be sent from a particular IP, etc. As a proof of concept I made an extension that just overrides the base mpd module, and it worked perfectly except for a problem I ran into with this line:
https://github.com/mopidy/mopidy/blob/develop/mopidy/mpd/protocol/connection.py#L42
I had disabled the mpd module, but wanted to reuse the protocol, and mopidy.mpd.protocol was still referencing the mpd configuration in just that one instance. I was able to get around this by writing a special case to override that particular handler method, but it felt a bit dirty.
My question is: would it make sense to abstract the protocol module a bit more to make it more reusable? Or am I approaching this whole thing the wrong way?