Expand scan to Pictures/ subdirs, add app folder exclusions
AndroidConnector: scan both /storage/emulated/0/DCIM and /storage/emulated/0/Pictures — all subdirs of each. ExifFilter: add Slack, Teams, Zoom, Discord, sticker, gif, avatar, profile, thumbnail, cache to excluded path fragments. These land in the Other section of the folder panel.
This commit is contained in:
@@ -70,12 +70,15 @@ class AndroidConnector(
|
||||
val serial = requireSerial(device)
|
||||
val photos = mutableListOf<PhonePhoto>()
|
||||
|
||||
// /sdcard is a symlink to /storage/emulated/0 on most Android devices.
|
||||
// Scan only /storage/emulated/0/DCIM to avoid listing every photo twice.
|
||||
val dcimRoots = listOf("/storage/emulated/0/DCIM")
|
||||
// Scan all subdirectories under DCIM and Pictures.
|
||||
// /sdcard is a symlink to /storage/emulated/0 — scan only the canonical path.
|
||||
val scanRoots = listOf(
|
||||
"/storage/emulated/0/DCIM",
|
||||
"/storage/emulated/0/Pictures",
|
||||
)
|
||||
val cameraDirs = mutableListOf<String>()
|
||||
|
||||
for (root in dcimRoots) {
|
||||
for (root in scanRoots) {
|
||||
val lsOutput = runAdb(serial, "shell", "ls", root, "2>/dev/null")
|
||||
if (lsOutput.contains("No such file") || lsOutput.isBlank()) continue
|
||||
lsOutput.lines()
|
||||
@@ -84,9 +87,6 @@ class AndroidConnector(
|
||||
.forEach { subdir -> cameraDirs.add("$root/$subdir") }
|
||||
}
|
||||
|
||||
// Also check Pictures/Camera (some Samsung models store there)
|
||||
cameraDirs.add("/storage/emulated/0/Pictures/Camera")
|
||||
|
||||
// Fall back to hardcoded list if dynamic discovery found nothing
|
||||
val dirsToScan = cameraDirs.ifEmpty { fallbackCameraDirs }
|
||||
|
||||
|
||||
@@ -41,9 +41,19 @@ object ExifFilter {
|
||||
"twitter",
|
||||
"facebook",
|
||||
"tiktok",
|
||||
"slack",
|
||||
"teams",
|
||||
"zoom",
|
||||
"discord",
|
||||
"share",
|
||||
"temp",
|
||||
"resize",
|
||||
"sticker",
|
||||
"gif",
|
||||
"avatar",
|
||||
"profile",
|
||||
"thumbnail",
|
||||
"cache",
|
||||
)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user