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

Added comment to torrent details #541

Merged
merged 2 commits into from
Apr 19, 2022
Merged

Conversation

FinalDoom
Copy link
Contributor

Mostly simple as it's supported by the various clients, except in the case of rtorrent.

For rtorrent, tags are stored in custom1, consistent with other clients. For that reason, comment is being stored in custom2,
which is also consistent with other clients. In particular, rutorrent uses a prefix on the comment for some reason, which is duplicated in this change to preserve cross-compatibility.

Also turns http: and https: text in comments into links, also consistent with other clients (and a main utility of having comments in the first place).

Fixes #435

  • 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)

Mostly simple as it's supported by the various clients,
except in the case of rtorrent.

For rtorrent, tags are stored in custom1, consistent with other clients.
For that reason, comment is being stored in custom2,
which is also consistent with other clients.
In particular, rutorrent uses a prefix on the comment for some reason,
which is duplicated in this change to preserve cross-compatibility.
@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #541 (483a55a) into master (5a9f701) will increase coverage by 0.10%.
The diff coverage is 79.68%.

@@            Coverage Diff             @@
##           master     #541      +/-   ##
==========================================
+ Coverage   72.22%   72.33%   +0.10%     
==========================================
  Files          61       61              
  Lines       11227    11282      +55     
  Branches      717      983     +266     
==========================================
+ Hits         8109     8161      +52     
+ Misses       3118     3110       -8     
- Partials        0       11      +11     
Impacted Files Coverage Δ
server/services/Deluge/clientGatewayService.ts 13.44% <0.00%> (-0.06%) ⬇️
server/services/rTorrent/clientGatewayService.ts 73.69% <61.53%> (+0.74%) ⬆️
server/util/torrentFileUtil.ts 91.41% <90.00%> (+3.17%) ⬆️
server/services/Deluge/types/DelugeCoreMethods.ts 100.00% <100.00%> (ø)
...rver/services/Transmission/clientGatewayService.ts 70.39% <100.00%> (+0.11%) ⬆️
...erver/services/qBittorrent/clientGatewayService.ts 68.29% <100.00%> (-0.55%) ⬇️
...Torrent/constants/methodCallConfigs/torrentList.ts 100.00% <100.00%> (ø)
server/routes/api/auth.ts 94.67% <0.00%> (ø)
server/services/taxonomyService.ts 98.73% <0.00%> (ø)
... and 6 more

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 5a9f701...483a55a. Read the comment docs.

@jesec
Copy link
Owner

jesec commented Apr 11, 2022

Where does the comment come from?

If it is set by the user, Flood users should be able to set it, as well.

If it comes from the .torrent (metadata) file, I don't think rTorrent does the parsing, which means ruTorrent parses it. As such, Flood should parse it on add, as well. Better, add the command to rTorrent itself.

@FinalDoom
Copy link
Contributor Author

Precisely the latter. It comes from the torrent file. The non-rtorrent clients parse it themselves and report it themselves. While rTorrent does not. I mimicked the processing executed by ruTorrent for the rTorrent portion, to maintain consistency, and the comment is set in rTorrent by Flood.

Most clients/UIs allow setting the comment, as well, however I thought that would be too much for this objective. They also allow setting other parameters, such as torrent name (and data folder) which would use common logic/UI elements. So I may work on that in the future. Though it's a far less common use case, at least in my experience.

As for adding to rTorrent, are you referring to your repo of it? It looks like the rakshasha repo recieves little to no attention. I could take a look at adding it to your version, though C is my weakest language.

@jesec jesec merged commit 745d050 into jesec:master Apr 19, 2022
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.

Torrent Comments Missing from Torrent Details in Flood GUI
2 participants