mirror of
https://github.com/Alvin-Zilverstand/Twitter-X-Media-Batch-Downloader.git
synced 2026-11-21 13:53:13 +01:00
Merge pull request #103 from asdfghjkkly/fix-windows-folder-and-reposts
Fix repost folder routing and Windows folder opening
This commit is contained in:
2 files changed
+5
-4
No files matched your search
@@ -350,9 +350,9 @@ func (a *App) DownloadMediaWithMetadata(req DownloadMediaWithMetadataRequest) (D
|
||||
}
|
||||
|
||||
username := req.Username
|
||||
if item.AuthorUsername != "" {
|
||||
username = item.AuthorUsername
|
||||
}
|
||||
if (req.Username == "bookmarks" || req.Username == "likes") && item.AuthorUsername != "" {
|
||||
username = item.AuthorUsername
|
||||
}
|
||||
|
||||
items[i] = backend.MediaItem{
|
||||
URL: item.URL,
|
||||
|
||||
+2
-1
@@ -11,6 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func OpenFolderInExplorer(path string) error {
|
||||
os.WriteFile(filepath.Join(os.TempDir(), "openfolder.txt"), []byte(path), 0644)
|
||||
info, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -23,7 +24,7 @@ func OpenFolderInExplorer(path string) error {
|
||||
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
cmd = exec.Command("explorer", path)
|
||||
cmd = exec.Command("cmd", "/C", "start", "", path)
|
||||
case "darwin":
|
||||
cmd = exec.Command("open", path)
|
||||
case "linux":
|
||||
|
||||
Reference in new issue
Block a user