chore: pass all options to download
All checks were successful
Pre-commit / pre-commit (pull_request) Successful in 5m26s
Update alr-git / changelog (push) Successful in 24s

This commit is contained in:
2025-06-25 19:52:54 +03:00
parent 5e1eeabd04
commit 401c41160c
4 changed files with 16 additions and 26 deletions

View File

@ -11,7 +11,7 @@
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="33.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
<text x="33.5" y="14">coverage</text>
<text x="86" y="15" fill="#010101" fill-opacity=".3">19.7%</text>
<text x="86" y="14">19.7%</text>
<text x="86" y="15" fill="#010101" fill-opacity=".3">19.8%</text>
<text x="86" y="14">19.8%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 926 B

View File

@ -445,15 +445,15 @@ msgstr ""
msgid "Source can be updated, updating if required"
msgstr ""
#: pkg/dl/dl.go:201
#: pkg/dl/dl.go:196
msgid "Source found in cache and linked to destination"
msgstr ""
#: pkg/dl/dl.go:208
#: pkg/dl/dl.go:203
msgid "Source updated and linked to destination"
msgstr ""
#: pkg/dl/dl.go:222
#: pkg/dl/dl.go:217
msgid "Downloading source"
msgstr ""

View File

@ -461,15 +461,15 @@ msgstr "Ошибка при запуске приложения"
msgid "Source can be updated, updating if required"
msgstr "Исходный код можно обновлять, обновляя при необходимости"
#: pkg/dl/dl.go:201
#: pkg/dl/dl.go:196
msgid "Source found in cache and linked to destination"
msgstr "Источник найден в кэше и связан с пунктом назначения"
#: pkg/dl/dl.go:208
#: pkg/dl/dl.go:203
msgid "Source updated and linked to destination"
msgstr "Источник обновлён и связан с пунктом назначения"
#: pkg/dl/dl.go:222
#: pkg/dl/dl.go:217
msgid "Downloading source"
msgstr "Скачивание источника"

View File

@ -172,15 +172,10 @@ func Download(ctx context.Context, opts Options) (err error) {
"downloader", d.Name(),
)
updated, err = d.Update(Options{
Hash: opts.Hash,
HashAlgorithm: opts.HashAlgorithm,
Name: opts.Name,
URL: opts.URL,
Destination: cacheDir,
Progress: opts.Progress,
LocalDir: opts.LocalDir,
})
newOpts := opts
newOpts.Destination = cacheDir
updated, err = d.Update(newOpts)
if err != nil {
return err
}
@ -226,15 +221,10 @@ func Download(ctx context.Context, opts Options) (err error) {
return err
}
t, name, err := d.Download(ctx, Options{
Hash: opts.Hash,
HashAlgorithm: opts.HashAlgorithm,
Name: opts.Name,
URL: opts.URL,
Destination: cacheDir,
Progress: opts.Progress,
LocalDir: opts.LocalDir,
})
newOpts := opts
newOpts.Destination = cacheDir
t, name, err := d.Download(ctx, newOpts)
if err != nil {
return err
}