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