[PLUGIN] Mixcloud

@dvo, @Marcin_Kruk,

I’ve tested using the stock MPD 0.20.18 that came with Volumio and experienced the cut-off as well. Here’s what I get in MPD’s log:

$ cat /var/log/mpd.log
Mar 09 13:47 : ffmpeg/aac: Input buffer exhausted before END element found
Mar 09 13:47 : ffmpeg: decoding failed, frame skipped: Invalid data found when processing input
Mar 09 13:47 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, offset 0x38c560: partial file
Mar 09 13:47 : exception: CURL failed: GnuTLS recv error (-9): A TLS packet with unexpected length was received.
Mar 09 13:47 : player: played "<Stream URL>"

(I hid the stream URL because I don’t want to expose it here)

To put it simply, the cut-off was due to the connection closing unexpectedly due to a bug in a library used by MPD.

Could you guys confirm that you’re seeing this too in your MPD’s log?

The custom MPD 0.21.16, which I have been using, works because it was compiled with libraries slightly more recent than those provided by Buster (and many versions ahead of those in Volumio 2.x). But I would like to see this plugin working without the need to update MPD. A simple change to the code should do the trick but let me test it first for an hour or so.