fix(downloads): support Transmission and aria2 end to end

Fixes #65
This commit is contained in:
ShukeBta
2026-08-10 21:04:04 +08:00
parent c0d743d89d
commit 42ef19b7e5
43 changed files with 2350 additions and 480 deletions
@@ -137,11 +137,11 @@ func (s *SubscriptionService) downloadTaskCountsAsPending(ctx context.Context, r
}
func (s *SubscriptionService) addLiveTorrentAvailability(ctx context.Context, queries []string, out *LocalAvailability) {
if s == nil || s.downloads == nil || s.downloads.qb == nil || out == nil {
if s == nil || s.downloads == nil || out == nil {
return
}
live, err := s.downloads.qb.List(ctx, "")
if err != nil {
live, err := s.downloads.listLiveTorrents(ctx, "")
if err != nil && len(live) == 0 {
return
}
for _, torrent := range live {