getmusicbee.com

Support => Developers' Area => Topic started by: milos on February 07, 2021, 11:45:37 PM

Title: Dropping files into Muscbee
Post by: milos on February 07, 2021, 11:45:37 PM
What format does the program accept as a drop? When trying to drop files as FileDrop the program shows crossed circle. Other programs don't have issues accepting dropped files from my file manager

Code
string dataFormat = DataFormats.FileDrop;
DataObject obj = new DataObject();
obj.SetFileDropList(path_to_file);
DragDrop.DoDragDrop(this, obj, DragDropEffects.All);
Title: Re: Dropping files into Muscbee
Post by: phred on February 08, 2021, 01:31:15 AM
What version of MB are you using? (Help > About)
How was MB installed? (Installer, Portable, Store)

MB accepts just about any audio file. Preferences > General > File types.
So that begs the question - what file type are you dropping?

You also may not have permission to access the directory where you're dropping.
Title: Re: Dropping files into Muscbee
Post by: milos on February 08, 2021, 02:44:12 AM
Thanks for reply @phred; I've actually got it...
so Musicbee won't accept dropped mp3 file if I use

Code
DragDrop.DoDragDrop(this, obj, DragDropEffects.All);
or
Code
DragDrop.DoDragDrop(this, obj, DragDropEffects.Copy | DragDropEffects.Move);
regardless if in addition I hold ctrl/shift/alt

but it will accept
Code
DragDrop.DoDragDrop(this, obj, DragDropEffects.Copy);

I was afraid I'd have to deal with some complicated  memorystreams, so this is good.
Cheers