Author Topic: Corrupted links when dragging tracks into XMPlay  (Read 1560 times)

tenbob

  • Posts: 19
Hi. I've come across a problem when I drag and drop files from another application, MusicBee, into XMPlay. It looks like XMPlay is not correctly reading the file names. Instead it gets garbage characters and the file is not found. See attached screenshot.

This used to work perfectly. I have been using the system for many years in my DJ setup. XMPlay plays the music for the audience. In the background I use MusicBee with headphones to find the tracks I want, and then drag them into XMPlay.

The problem began when I updated MusicBee from 2.5.5804 to 3.5.8447. XMPlay is 3.8.5 on Windows 11. Now every time I drag and drop a track the link is corrupted. Obviously, I thought the problem must be with MusicBee, but I have done a lot of testing which indicates this may not be the case. I can drag and drop from MusicBee into several other applications without any issues. For example, I can drag tracks from MusicBee into Windows Media Player and into File Explorer. And I can drag files from other applications into XMPlay without issues. The only combination that doesn't work is from MusicBee 3.5.8447 to XMPlay any version.

For testing I used an experimental Python program as the drop target. I have learned that DnD is quite complicated. There can be all sorts of extra information transferred along with the link to the file. Certainly there are several differences when I compare the DnD payload for the different versions of MusicBee. But the crucial part labelled text/uri-list is always the same and seems to be correctly formatted.

What seems to be happening is that XMPlay is somehow misreading the DnD payload and picking up garbage characters from within the contents. The potential for this may have been around for some time but it is only now that it has been exposed by the new version of MusicBee.

Would anyone be able to look into this, please. I appreciate that testing may be a bit tricky without installing MusicBee. It may be possible to spot something by looking at the code.

Many thanks, Bob

Ian @ un4seen

  • Administrator
  • Posts: 26177
Re: Corrupted links when dragging tracks into XMPlay
« Reply #1 on: 11 Aug '23 - 16:09 »
I think I see what's going wrong. When something is dropped into XMPlay, it will first ask for the data in an internal playlist format that's used to transfer playlist entries between XMPlay instances (or the same instance), before asking for regular files (CF_HDROP) if that fails. The reason for asking in that order is because XMPlay can give both, but the former is more flexible than the latter, eg. the latter doesn't support URLs. The problem is that the latest MusicBee is saying that the XMPlay internal playlist format request was successful, but it's not actually returning any data, so here's an XMPlay update that will also check that data is returned:

   www.un4seen.com/stuff/xmplay.exe

Let me know if you still have any trouble with it.

tenbob

  • Posts: 19
Re: Corrupted links when dragging tracks into XMPlay
« Reply #2 on: 12 Aug '23 - 02:53 »
Excellent! I tried the new version from stuff and it has completely fixed the issue I was having. Well done Ian.

Many thanks.