Skip to content

Feature: Media Library: Add manual folder selection mode supporting hidden folders#1703

Open
groundstation1 wants to merge 1 commit into
anilbeesetti:mainfrom
groundstation1:feature/show-hidden-folders
Open

Feature: Media Library: Add manual folder selection mode supporting hidden folders#1703
groundstation1 wants to merge 1 commit into
anilbeesetti:mainfrom
groundstation1:feature/show-hidden-folders

Conversation

@groundstation1

@groundstation1 groundstation1 commented May 17, 2026

Copy link
Copy Markdown

Adds a 'Select folders manually' toggle in Media library settings. When enabled, the library is built only from folders the user picks with the system folder picker (OpenDocumentTree).

In this mode the app does its own folder scanning and does not rely on MediaStore.

Warning: coded with AI, take it or leave it, won't take any offense if you don't.

  • Each picked folder tree is crawledrecursively via DocumentsContract, so folders MediaStore never indexes (hidden/dot folders, folders with .nomedia, app folders like Telegram, etc.) are included. Normal (non-manual) MediaStore mode is untouched.
  • No broad storage permission: access is granted per-folder by the system folder picker (SAF) and kept via a persistable read URI permission. No MANAGE_EXTERNAL_STORAGE / All-files access, and no new manifest permissions.
  • Nested subfolders are scanned at any depth. The explicitly picked folder is always scanned; descendant folders containing a .nomedia are skipped.
  • Manage folders becomes an add/remove list in manual mode.
  • The MediaStore-only exclude-folders list is not applied in manual mode (manual selection is its own explicit list).
  • Thumbnails: the ffmpeg retriever can't open SAF content URIs, so it is now optional and the native retriever produces the frame; the video decoder also applies when the mime type is unknown/generic but the URI has a video extension.
  • Folder-tree recursion guarded against self-referential nodes.
  • Minimal delay on manual refresh so the pull-to-refresh spinner shows.

Closes #1038, Closes #1126, Closes #467, Closes #1719

Related to #965, #1086, #1132, #1193, #1209, #1210, #1373, #1694

image image image image

@groundstation1 groundstation1 force-pushed the feature/show-hidden-folders branch 2 times, most recently from 2806c44 to ec17636 Compare May 17, 2026 09:13
@groundstation1 groundstation1 marked this pull request as ready for review May 17, 2026 09:16
@groundstation1 groundstation1 changed the title Featerure: Media Library: Add manual folder selection mode supporting hidden folders Feature: Media Library: Add manual folder selection mode supporting hidden folders May 17, 2026
Adds a 'Select folders manually' toggle in Media library settings.
When enabled, the library is built only from folders the user picks
with the system folder picker (OpenDocumentTree), which can enter
hidden (dot) folders that MediaStore never indexes.

- Picked SAF tree URIs are persisted and scanned via DocumentsContract
  and fed into the existing library/sync pipeline; normal MediaStore
  mode is unchanged.
- Manage folders becomes an add/remove list in manual mode.
- Thumbnails: the ffmpeg retriever can't open SAF content URIs, so it
  is now optional and the native retriever produces the frame; the
  video decoder also applies when the mime type is unknown/generic but
  the URI has a video extension.
- Folder-tree recursion guarded against self-referential nodes.
- Minimal delay on manual refresh so the pull-to-refresh spinner shows.

Closes anilbeesetti#1038
@groundstation1 groundstation1 force-pushed the feature/show-hidden-folders branch from ec17636 to 83d0754 Compare May 17, 2026 09:25
hclgdb added a commit to hclgdb/nextplayer that referenced this pull request Jun 13, 2026
Merge commit '83d0754a' (Add manual folder selection supporting hidden
folders) into main.

- Adds 'Select folders manually' toggle with SAF folder picker
  (OpenDocumentTree) that can access hidden (dot) folders
- Replaces .nomedia toggle with manual folder selection approach
- Adds DocumentTreeScanner + LocalMediaSynchronizer manual mode
- Adds manual folder management in Manage Folders screen
- Updates domain use cases to support both modes

Resolved conflicts: took upstream version as the canonical solution
(6 files with content conflicts)
@anilbeesetti

Copy link
Copy Markdown
Owner

Hi @groundstation1, Sorry for late reply and thanks for the PR. I would love to see this merged, can you resolve the merge conflicts. And also i don't mind PRs coded with AI as long as it's good quality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants