mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-06-17 15:05:39 +02:00
feat yandex desktop downloads
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
qobuzprovider "streamrip-go/internal/provider/qobuz"
|
||||
soundcloudprovider "streamrip-go/internal/provider/soundcloud"
|
||||
tidalprovider "streamrip-go/internal/provider/tidal"
|
||||
yandexprovider "streamrip-go/internal/provider/yandex"
|
||||
"streamrip-go/internal/store"
|
||||
"streamrip-go/internal/verbose"
|
||||
)
|
||||
@@ -112,6 +113,7 @@ func New(cfg *config.Config) (*Main, error) {
|
||||
"qobuz": qobuzprovider.New(cfg),
|
||||
"tidal": tidalprovider.New(cfg),
|
||||
"deezer": deezerprovider.New(cfg),
|
||||
"yandex": yandexprovider.New(cfg),
|
||||
"soundcloud": soundcloudprovider.New(cfg),
|
||||
}
|
||||
|
||||
@@ -888,6 +890,9 @@ func (m *Main) ripTrack(ctx context.Context, p provider.Client, source, id, fall
|
||||
}
|
||||
return m.DL.FileDeezerEncrypted(ctx, d.URL, outPath, trackID)
|
||||
}
|
||||
if d.Source == "yandex" && strings.EqualFold(strings.TrimSpace(d.Cipher), "AES_CTR") {
|
||||
return m.DL.FileYandexEncrypted(ctx, d.URL, outPath, d.Key)
|
||||
}
|
||||
return m.DL.File(ctx, d.URL, outPath)
|
||||
}
|
||||
if err = downloadOnce(); err != nil {
|
||||
@@ -964,6 +969,8 @@ func (m *Main) qualityForSource(source string) int {
|
||||
return m.Config.Session.Tidal.Quality
|
||||
case "deezer":
|
||||
return m.Config.Session.Deezer.Quality
|
||||
case "yandex":
|
||||
return m.Config.Session.Yandex.Quality
|
||||
case "soundcloud":
|
||||
return m.Config.Session.Soundcloud.Quality
|
||||
default:
|
||||
@@ -994,6 +1001,8 @@ func (m *Main) qualityProfileForSource(source string) (int, string) {
|
||||
default:
|
||||
return 16, "44.1"
|
||||
}
|
||||
case "yandex":
|
||||
return 16, "44.1"
|
||||
default:
|
||||
return 16, "44.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user