How unplug safe a drive (1 Viewer)

maker3

New Member
January 24, 2010
2
0
Home Country
Poland Poland
As you know MediaPortal automatically added to the list where they can be a photo / video a plugged pendrive.

I have a 2.5-inch disk in Welland box, which is reported to Windows as a drive, not than mass storage.
Therefore I can not display it automatically in Mediaportal.

Could somebody tell me how fix this problem? This may be partly fixed by adding all the drive letters.

But biggest problem is, how unplug safe a drive in Mediaportla menu? Only mass storage has this option.
 

rekenaar

Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    Hi maker3 :)

    I have just tried it with my 2.5" USB disk and I see the same as you: a regular USB stick shows up inside MP but the 2.5" USB disk does not.

    Not sure, in Windows, what is different between them. Thus difficult to decide if we should see this as a bug or a missing feature. I will ask around...
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    Seems that we currently use the windows function as described here:
    GetDriveType function

    From the comments on that page, it seems that not all USB drives are identified as removable drives.
    Of course I have no idea about the technical stuff ;) So if one of our devs are interested in to give USB HDD also a SafeRemove function, it will be much appreciated.

    From Util.cs
    public static int getDriveType(string drive)
    {
    if (drive == null) return 2;
    if ((GetDriveType(drive) & 5) == 5) return 5; //cd
    if ((GetDriveType(drive) & 3) == 3) return 3; //fixed
    if ((GetDriveType(drive) & 2) == 2) return 2; //removable
    if ((GetDriveType(drive) & 4) == 4) return 4; //remote disk
    if ((GetDriveType(drive) & 6) == 6) return 6; //ram disk
    return 0;
    }
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi folks

    I thought that the disk type could be set/chosen but it appears this is not the case. After a quick read, I think that disk type depends on the driver that Windows uses for the HDD. If you could force Windows to use a different driver (ie. one for a removeable disk) then it would work...

    mm
     

    Users who are viewing this thread

    Top Bottom