fix: avoid duplicate nested dir

This commit is contained in:
Viktor Varland 2025-03-27 20:00:10 +01:00
parent 69ae19e512
commit 43709549dc
Signed by: varl
GPG key ID: 7459F0B410115EE8
2 changed files with 11 additions and 1 deletions

View file

@ -31,3 +31,13 @@ url = "https://www.youtube.com"
</body> </body>
</opml> </opml>
``` ```
## Result
```
vids
└── 2 Much ColinFurze
├── 2025
│   └── 20250327-Secret_Garage_Update_15_Questions_answered_and_Roofs_Covered-XN4HiUMuQdo.webm
└── archive.txt
```

View file

@ -17,7 +17,7 @@ type Download struct {
} }
func Get(d Download) { func Get(d Download) {
output := filepath.Join(d.Name, "%(upload_date>%Y)s/%(upload_date)s-%(title)s-%(id)s.%(ext)s") output := filepath.Join("%(upload_date>%Y)s/%(upload_date)s-%(title)s-%(id)s.%(ext)s")
archive := filepath.Join(d.OutDir, d.Name, "archive.txt") archive := filepath.Join(d.OutDir, d.Name, "archive.txt")
outdir := filepath.Join(d.OutDir, d.Name) outdir := filepath.Join(d.OutDir, d.Name)