Add alternate downloader

That works a lot faster, pog
This commit is contained in:
2024-11-05 15:36:08 +01:00
parent 7c02cbf0e4
commit f5c072360b
6 changed files with 162 additions and 8 deletions

View File

@@ -4,22 +4,17 @@ import (
"context"
"fmt"
"log"
"sync"
"github.com/gen2brain/beeep"
"github.com/lrstanley/go-ytdlp"
)
const OUTPUT_DIR = "C:/Users/Administrator/ytdlpVideos"
var ongoingDownloads = make(map[string]struct{})
var ongoingDownloadsMutex = &sync.Mutex{}
var dl = ytdlp.New().
// FormatSort("bestvideo[ext=mp4]+bestaudio[ext=m4a]").
FormatSort("res,ext:mp4:m4a").
Output("C:/Users/Administrator/ytdlpVideos/%(uploader)s/%(title)s.%(ext)s").
LimitRate(fmt.Sprintf("%dM", 100/DOWNLOAD_WORKERS)).
LimitRate(fmt.Sprintf("%dM", 150/DOWNLOAD_WORKERS)).
// HTTPChunkSize("20M").
MarkWatched().
SponsorblockMark("all").