mirror of
https://github.com/Alvin-Zilverstand/Twitter-X-Media-Batch-Downloader.git
synced 2026-11-29 09:37:54 +01:00
v4.5
This commit is contained in:
1 parent
84b067ebd4
commit
e67d09a248
47 files changed
+3688
-958
No files matched your search
@@ -61,6 +61,25 @@ func CheckFolderExists(basePath, username string) bool {
|
||||
return info.IsDir()
|
||||
}
|
||||
|
||||
func CheckFoldersExist(basePath string, usernames []string) map[string]bool {
|
||||
results := make(map[string]bool, len(usernames))
|
||||
if basePath == "" {
|
||||
return results
|
||||
}
|
||||
|
||||
checked := make(map[string]bool, len(usernames))
|
||||
for _, username := range usernames {
|
||||
if _, alreadyChecked := checked[username]; alreadyChecked {
|
||||
continue
|
||||
}
|
||||
exists := CheckFolderExists(basePath, username)
|
||||
checked[username] = exists
|
||||
results[username] = exists
|
||||
}
|
||||
|
||||
return results
|
||||
}
|
||||
|
||||
func CheckGifsFolderExists(basePath, username string) bool {
|
||||
gifsPath := filepath.Join(basePath, username, "gifs")
|
||||
info, err := os.Stat(gifsPath)
|
||||
|
||||
Reference in new issue
Block a user