[fixed] [JIRA MP1-2469] - DetectDrive method obsolete ? (1 Viewer)

azzuro

Test Group
  • Team MediaPortal
  • May 10, 2007
    9,948
    5,617
    France - IDF
    Home Country
    France France
    If you now have the whole drive shown, you can browse through all folders, even through the pin-ptotected ones - that is really not what we want ;)
    i understand, and i'm agree with you. and sure, if you have very personal stuff inside. :cool:
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    No, setting doesn't exist, only auto-load (auto list folders) USB removable device on connect.

    Fix is not easy as it seems and will involve skin changes (GUI settings) and new Configuration setting and will do significant changes in all plugins + core.

    @catavolt , you problem was in MP always, but can be created in older version only with USB thumbs :).
     
    Last edited:

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,368
    10,407
    Königstein (Taunus)
    Home Country
    Germany Germany
    Fix is not easy as it seems and will involve skin changes (GUI settings) and new Configuration setting and will do significant changes in all plugins + core.
    But before you made this change, all was fine ;)
    Can´t you just revert that change?
    If someone want to see the whole drive, he/she can just add it to the list in MPConfig ;)
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Fix is not easy as it seems and will involve skin changes (GUI settings) and new Configuration setting and will do significant changes in all plugins + core.
    But before you made this change, all was fine ;)
    Can´t you just revert that change?
    If someone want to see the whole drive, he/she can just add it to the list in MPConfig ;)

    We should not rush fixing this. Nor should we rush to revert the fix that caused the problem.

    First question - what is the difference between an external USB hard drive and a USB flash drive? Capacity is all really. Conceptually they are the same. So to have them handled differently would be wrong on one level.

    However, we can easily see a situation where someone might use a large external USB HD as their main static media storage, and then you would want to be able to define individual shares on that drive. You probably wouldn't want to define individual shares on a thumb drive.

    So, second question - how easy is it to distinguish a USB thumb drive from a USB hard drive?

    In config we have 'automatically switch to inserted removable drives'. I just tested with a USB drive, and this didn't do anything.

    However, I have the setting disabled for videos but enabled for music and pictures. So, in this case what is the expected behaviour? Which plugin will catch the drive? There is simply no way to define the correct and expected behaviour.

    However, if you are inside the plugin, all seems fine, apart from in a database view in music (setting is ignored).

    We still have the problem that you can see all files on the drive.

    I have to admit that I tend to think this is expected behaviour. For all we know, a user could have multiple drives, so we don't know which 'F: drive' has been detected. If I plug in a thumb drive and then my external HD, the thumb drive will be F and the external HD G. But if I change the order, the drive letters will swap as well. So the way video folders etc are defined does not allow us to be sure we are dealing with the same data.

    So, this will take a bit of time to be sure we know what we expect, before we start to fix it.

    No-one's fault, but there were issues with the USB drive fixes that were not spotted during testing. However, there will be some of the same issues with the previous code. We need to get this right.

    Mark
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    Hi.
    If I plug in a thumb drive and then my external HD, the thumb drive will be F and the external HD G. But if I change the order, the drive letters will swap as well.
    If you once set the drive letters in Windows manually they will stay as long as possible. So if you set your thumb drive as "F" and your external HDD as "G" then it doesn't matter in which order you plug them. Only if there is already a Drive "G" on time you plug it in then the HDD gets another letter, normally the first free one.
    If one will use an external HDD for storing Media (a really common use case for external drives, I think) it's better to once assign a dedicated drive letter to this and you're out of trouble.
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,368
    10,407
    Königstein (Taunus)
    Home Country
    Germany Germany
    I do have two external USB hard disks, one for videos and one for music and pictures.
    Both are always connected, both have fixed drive names.
    So Claus is right assuming that this is a common use case nowadays - same applies to the drive letters.
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,948
    5,617
    France - IDF
    Home Country
    France France
    So, second question - how easy is it to distinguish a USB thumb drive from a USB hard drive?
    we know already identified "real" removable usb key and USB hard-disk.

    if i'm not wrong, we use Win32_DiskDrive quote from Deda on Jira ticket
    Just to mention, on XP this will not work because it needs complete different approach. Reason for this is Win32_DiskDrive property MediaType:

    MediaType
    Data type: string
    Access type: Read-only

    Type of media used or accessed by this device.

    Starting with Windows Vista, possible values are:
    External hard disk media
    Removable media other than floppy
    Fixed hard disk media
    Format is unknown

    Windows Server 2003 and Windows XP: Possible values are:
    Removable media
    Fixed hard disk
    Unknown

    So for "InterfaceType = USB" on XP we can target only MediaType RemovableMedia which can be anything, on Vista+ we can target 'External hard disk media' which is exactly what we want and we will get with SQL query:
    SELECT DeviceID, Model FROM Win32_DiskDrive WHERE InterfaceType='USB' AND MediaType LIKE '%hard disk%'

    More at:
    http://msdn.microsoft.com/en-us/library/aa394132(v=vs.85).aspx

    No-one's fault,
    maybe a bit .... :(

    Why we want use letter drive only ? maybe we can read DeviceID or Name
    DeviceID
    Data type: string
    Access type: Read-only
    Qualifiers: Key


    Unique identifier of the disk drive with other devices on the system. This property is inherited from CIM_LogicalDevice.
    Name
    Data type: string
    Access type: Read-only


    Label by which the object is known. When subclassed, the property can be overridden to be a key property. This property is inherited from CIM_ManagedSystemElement.

    We can store the DeviceID or Name in sharefolder, like WOL name. and added to "blacklist" for ignore it.
    hum, you follow me ? ... :oops:
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    @azzuro - it is probably best to let @Deda or another developer look into this rather than speculating. I'd rather this discussion didn't get too bogged down so that we can't follow what needs to be done.

    The only thing we ALL need to worry about is what is the correct behaviour.

    I would say - USB hard drives - respect shares. USB flash drives - show the whole drive.
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,948
    5,617
    France - IDF
    Home Country
    France France
    I would say - USB hard drives - respect shares. USB flash drives - show the whole drive.
    depend on your use ...
    for me USB = mobility / extra storage / backup / and sharing with friends. but never use everyday.
    except for HTPC side, if you use MicroATX case without HDD space or none NAS. and for this i can understand this use ...
    Who are ESATA drive for test ?
     

    Users who are viewing this thread

    Top Bottom