cybercase / webminidisc

Upload your Music to NetMD MiniDisc devices thanks to WebUSB and WASM
GNU General Public License v2.0
306 stars 88 forks source link

Creating groups, moving items into groups causes subsequent transfer to fail #128

Open optoisolated opened 1 year ago

optoisolated commented 1 year ago

I noticed an issue whereby when I transfer files, then group them, the subsequent transfers will fail with an error as shown below.

Error: Failed to execute 'controlTransferIn' on 'USBDevice': A transfer error has occurred.

This only happens when I create a group and then try to transfer more files. If i transfer all the files first, then group them, it's completely fine. The only way to continue transferring and working on the disc is to physically disconnect the player and re-connect the player.

Steps to reproduce:

  1. Connect to Minidisc player
  2. Transfer any file(s)
  3. Select any file(s) and click the Group button
  4. Transfer another file.
asivery commented 1 year ago

What device are you using @optoisolated ?

optoisolated commented 1 year ago

It's a Sony MZ-N707.

optoisolated commented 1 year ago

Upon further use, I've noticed that the issue seems to happen whenever I try to make any change to the TOC, such as adding or changing a group, doing a rename of a track, or re-ordering a track, and then trying to upload a new song. I have to close the app, and disconnect and reconnect the recorder, then reopen and connect the app. As a workaround I've been doing all the uploads first, then doing all the renaming, grouping etc at the end. That works.

optoisolated commented 1 year ago

A simpler workaround I've figured out is simply to hit the "Stop" button on the MZ-N707, triggering the TOC commit. When committed, I can then copy files again. I assume then the issue is that the TOC isn't being written after each file move/rename/change/group etc...

asivery commented 1 year ago

@optoisolated Yes, I have been able to reproduce the problem with my MZ-N505. Seems like it's another issue with the current implementation of Type-R devices. I'll try to fix it, but not sure if the fix will come in the next version of WMDPro, or the one after that, since this update is pretty big...