Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: transmission eta #432

Merged
merged 5 commits into from
Oct 24, 2021
Merged

fix: transmission eta #432

merged 5 commits into from
Oct 24, 2021

Conversation

trim21
Copy link
Collaborator

@trim21 trim21 commented Oct 15, 2021

Description

transmission eta maybe -1 or -2

Related Issue

close #431

Screenshots

see issue

Types of changes

  • Breaking change (changes that break backward compatibility of public API or CLI - semver MAJOR)
  • New feature (non-breaking change which adds functionality - semver MINOR)
  • Bug fix (non-breaking change which fixes an issue - semver PATCH)

@trim21 trim21 changed the title Update clientGatewayService.ts fix: transmission eta Oct 15, 2021
@codecov
Copy link

codecov bot commented Oct 15, 2021

Codecov Report

Merging #432 (b4fd8f6) into master (cb148f7) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #432      +/-   ##
==========================================
- Coverage   70.86%   70.80%   -0.07%     
==========================================
  Files          62       62              
  Lines       11344    11344              
  Branches      994      996       +2     
==========================================
- Hits         8039     8032       -7     
- Misses       3305     3312       +7     
Impacted Files Coverage Δ
...rver/services/Transmission/clientGatewayService.ts 73.92% <100.00%> (ø)
server/models/FeedReader.ts 83.78% <0.00%> (-9.46%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb148f7...b4fd8f6. Read the comment docs.

@jesec
Copy link
Owner

jesec commented Oct 22, 2021

Looks good to me in general.

However, I would have to dig into the documentation of Transmission to see what -2 means first. Another concern is that certain torrent clients allow users to set the upload target, and displays ETA for that.

@trim21
Copy link
Collaborator Author

trim21 commented Oct 22, 2021

Ok, this is a little bit more explanation of this eta field from transmission:

-1 means unavailable, magnet link for a task (unknown total size) or no ratio limit for a seeding torrent.

-2 means unknown, which means torrent has no download speed for unfinished torrent, and no upload speed for a seeding torrent.

some source code link:
https://github.com/transmission/transmission/blob/8cdc2c633e0f1a2ee09b2fdef09b02df34efbe1f/libtransmission/transmission.h#L1763
https://github.com/transmission/transmission/blob/b491da0ce48114d4f1573730645a6cdeb1af59ed/libtransmission/torrent.cc#L1335

In either way, we should omit its value and display it as inf.

and for a seeding torrent, eta indeed is the rest time for reading its' radio limit, I'll update for that.

(CI failure has nothing to do with this patch...)

@jesec jesec merged commit 1a3f3ff into jesec:master Oct 24, 2021
@trim21 trim21 deleted the patch-1 branch October 24, 2021 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eta become 58s for non-active transmission task
2 participants