rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.07k stars 408 forks source link

[Request] Add 'added' date to RPC #1054

Open owenashurst opened 3 years ago

owenashurst commented 3 years ago

Are there any plans to add an 'added' date to RPC when getting the torrents list? Just noticed this is a missing feature so that clients don't have to hold their own database of when torrents were added.

pyroscope commented 3 years ago

All that needs is 2 lines of config, so just add it.

owenashurst commented 3 years ago

All that needs is 2 lines of config, so just add it.

Sorry, I'm not sure where or what you mean. Would that allow it to come through over RPC?

pyroscope commented 3 years ago

https://github.com/pyroscope/pyrocore/search?q=tm_downloaded

owenashurst commented 3 years ago

https://github.com/pyroscope/pyrocore/search?q=tm_downloaded

Correct me if I'm wrong, "pyro._tm_downloaded_init" this is using your third party software isn't it? Is there not a native way?

owenashurst commented 3 years ago

Never mind. I realised that RuTorrent sends a request with a key value of "cmd" and "d.custom=addtime". Combined with the key value of "mode" and "list", it adds an extra string onto the array of the torrent hash in the response that is the added datetime. All I needed to do was multiply this by 1000 and then parse it as a DateTime which then matched what the web interface displayed.