Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2829

macOS: multi directory selection dialog does not allow access to external drives

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0
    • 2.11.0rc1
    • Other
    • None
    • I took screenshot of the "About This Mac" information and attached it below.

      After updating to latest version it no longer "sees" my external hard drives. I have tried both a WD My Book and a Passport. I can still access, copy, move, and play the files on the Passport buy can't get MBP to. I have also attached screenshots of the MBP not seeing it, my file folder showing the Passport, and a few of the mp3 files in it.

      The debug report was to many characters to paste. I attached a pdf with it below.

      See https://community.metabrainz.org/t/since-updating-mbp-no-longer-recognizes-my-external-hard-drive/677580/

          [PICARD-2829] macOS: multi directory selection dialog does not allow access to external drives

          Sophist added a comment -

          And that, outsidecontext is why I think that MusicBrainz and Picard are the perfect example of how open source should work!!!! What brilliant support!!!

          Sophist added a comment - And that, outsidecontext is why I think that MusicBrainz and Picard are the perfect example of how open source should work!!!! What brilliant support!!!

          This worked better than I had first anticipated. Qt's file dialog allows customizing the left sidebar. I updated it so that it contains despite the main volume and the user's home folder also the primary music folder and any additional mounted volumes:

          The great thing is that this is OS independent and also applies to other systems. While on Windows and Linux there was no general issue that external drives where unreachable, the change also makes this more convenient on those systems. The sidebar is less empty and more useful.

          Currently it will likely take a while until we do our next release. So I recommend using one of the workarounds I mentioned in the meantime. Let me know if that works for you.

          Philipp Wolfer added a comment - This worked better than I had first anticipated. Qt's file dialog allows customizing the left sidebar. I updated it so that it contains despite the main volume and the user's home folder also the primary music folder and any additional mounted volumes: The great thing is that this is OS independent and also applies to other systems. While on Windows and Linux there was no general issue that external drives where unreachable, the change also makes this more convenient on those systems. The sidebar is less empty and more useful. Currently it will likely take a while until we do our next release. So I recommend using one of the workarounds I mentioned in the meantime. Let me know if that works for you.

          GitHub Bot added a comment -

          See code changes in pull request #2365 submitted by phw.

          GitHub Bot added a comment - See code changes in pull request #2365 submitted by phw .

          I looked a bit into this and we might be able to allow access to external drives in the macOS file picker when the Qt5 one is being used. It's a bit of a hack, but we already do similar manipulations to allow the multi directory selection.

          For current Picard there are two workarounds:

          1. As discussed, disable multi directory selection in options
          2. Use the built-in file browser pane (View > File Browser), which will show external volumes.

          The situation with external volumes on macOS is a bit awkward. All drives are generally available via /Volumes/. The main drive by default is called System. But /Volumes/System is a symlink to the root "/". By default file selectors show "/Volumes/System" but hide "/Volumes" itself.

          In the file browser pane (see filebrowser.py) we work around this by making "/Volumes" the root folder for the file tree. But then it changes paths and if you have a path like "/Users/yourname/Music" you instead now need to use "/Volumes/System/Users/yourname/Music".

          We can do similar things in the Qt file dialog. A quick test showed we can make same call to QTreeView.setRootIndex(model.index("/Volumes")) and then see "/Volumes" where one can select any drive.

          It's not the nicest presentation, though. Also it needs some work so the previously selected directory gets set as starting directory.

          Maybe we could even make the volumes visible on the left side (where it shows "Computer" and the user dir). But it's unclear whether this will work.

          What I don't understand is how it apparently worked on the previous version of Picard which used Qt5 and doesn't work on the current version which still uses Qt5.

          I don't think that is actually true. For me behavior on current and older version of Picard is identical. The native file picker shows the external volume, the Qt one not.

          Also a quick internet search suggests that Macs require you to allow access to external drives on an app-by-app basis.

          I'm not entirely sure, but this might only apply to sandboxed applications, which Picard is currently not. At least I have no trouble accessing external volumes with Picard.

          Philipp Wolfer added a comment - I looked a bit into this and we might be able to allow access to external drives in the macOS file picker when the Qt5 one is being used. It's a bit of a hack, but we already do similar manipulations to allow the multi directory selection. For current Picard there are two workarounds: As discussed, disable multi directory selection in options Use the built-in file browser pane (View > File Browser), which will show external volumes. The situation with external volumes on macOS is a bit awkward. All drives are generally available via /Volumes/. The main drive by default is called System. But /Volumes/System is a symlink to the root "/". By default file selectors show "/Volumes/System" but hide "/Volumes" itself. In the file browser pane (see filebrowser.py ) we work around this by making "/Volumes" the root folder for the file tree. But then it changes paths and if you have a path like "/Users/yourname/Music" you instead now need to use "/Volumes/System/Users/yourname/Music". We can do similar things in the Qt file dialog. A quick test showed we can make same call to QTreeView.setRootIndex(model.index("/Volumes")) and then see "/Volumes" where one can select any drive. It's not the nicest presentation, though. Also it needs some work so the previously selected directory gets set as starting directory. Maybe we could even make the volumes visible on the left side (where it shows "Computer" and the user dir). But it's unclear whether this will work. What I don't understand is how it apparently worked on the previous version of Picard which used Qt5 and doesn't work on the current version which still uses Qt5. I don't think that is actually true. For me behavior on current and older version of Picard is identical. The native file picker shows the external volume, the Qt one not. Also a quick internet search suggests that Macs require you to allow access to external drives on an app-by-app basis. I'm not entirely sure, but this might only apply to sandboxed applications , which Picard is currently not. At least I have no trouble accessing external volumes with Picard.

          Sophist added a comment - - edited

          Also a quick internet search suggests that Macs require you to allow access to external drives on an app-by-app basis. (I am not a Mac user, so I am only going on the quick research I did e.g. https://github.com/qbittorrent/qBittorrent/issues/18502.) 

          See also https://www.reddit.com/r/MacOS/comments/16v8r4d/please_help_external_hard_drive_permissions_issue/ in case that is any help.

          Sophist added a comment - - edited Also a quick internet search suggests that Macs require you to allow access to external drives on an app-by-app basis. (I am not a Mac user, so I am only going on the quick research I did e.g. https://github.com/qbittorrent/qBittorrent/issues/18502 .)  See also https://www.reddit.com/r/MacOS/comments/16v8r4d/please_help_external_hard_drive_permissions_issue/ in case that is any help.

          Sophist added a comment -

          What I don't understand is how it apparently worked on the previous version of Picard which used Qt5 and doesn't work on the current version which still uses Qt5.

          Sophist added a comment - What I don't understand is how it apparently worked on the previous version of Picard which used Qt5 and doesn't work on the current version which still uses Qt5.

          Bob Swift added a comment -

          I just added https://github.com/metabrainz/picard-docs/pull/219 to add a page to the "Troubleshooting" section (instead of the FAQ section) and also added a warning to the "Allow selection of multiple directories" option setting in the documentation.

          Bob Swift added a comment - I just added https://github.com/metabrainz/picard-docs/pull/219 to add a page to the "Troubleshooting" section (instead of the FAQ section) and also added a warning to the "Allow selection of multiple directories" option setting in the documentation.

          Thanks you for opening the ticket. The above screenshot looks like Picard is not using the OS native file picker but the custom Qt one.

          This can happen if "Allow selection of multiple directories" is selected. As multi directory selection is not possible in Qt when using native system file picker Picard then falls back to Qt's own file picker (see also discussion on PICARD-745).

          If that's the issue then you only have the choice between either enabling multiple directory selection and not see the external drive or disable this function and only select one directory at a time.

          We should probably add a FAQ entry about this and issue a warning when users enable this option (which is disabled by default for a reason).

          Philipp Wolfer added a comment - Thanks you for opening the ticket. The above screenshot looks like Picard is not using the OS native file picker but the custom Qt one. This can happen if "Allow selection of multiple directories" is selected. As multi directory selection is not possible in Qt when using native system file picker Picard then falls back to Qt's own file picker (see also discussion on PICARD-745 ). If that's the issue then you only have the choice between either enabling multiple directory selection and not see the external drive or disable this function and only select one directory at a time. We should probably add a FAQ entry about this and issue a warning when users enable this option (which is disabled by default for a reason).

            outsidecontext Philipp Wolfer
            SuperNovalee SuperNovalee
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Version Package
                3.0