Coder Social home page Coder Social logo

transmission-rpc-java's Introduction

Transmission RPC Java

Java implementation of the Transmission RPC API.

Note

This API is still under development and it needs lots of cleanup. When the code is cleaned up the API will be provided through a Maven repository.

Maven

The project is available on a Maven repository. See: https://github.com/stil4m/maven-repository

Functionality

Command Not Implemented Implemented
torrent-start x
torrent-start-now x
torrent-stop x
torrent-verify x
torrent-reannounce x
torrent-set x
torrent-get x
torrent-add x
torrent-remove x
torrent-set-location x
torrent-rename-path x
session-set x
session-get x
session-stats x
blocklist-update x
port-test x
session-close x
queue-move-top x
queue-move-up x
queue-move-down x
queue-move-bottom x
free-space x

transmission-rpc-java's People

Contributors

orange-buffalo avatar red-avtovo avatar stil4m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

transmission-rpc-java's Issues

[question] Active development?

Hello,

I'm thinking in use this library in a personal Project. What do you mean with PARTIALLY implementation in get and add methods?

And... Do you plan to continue with the development?

Thanks!

Delete torrent doesn't delete the downloaded data, only the torrent file

Hello,
I'm using this call from a desktop computer to the delete a torrent with the downloaded files on my Raspberry Pi2 with Openelec:

client.removeTorrent(new RemoveTorrentInfo(new NumberListIds(id),true));

This removes the torrent files, but nothing happens with the downloaded files. The second boolean parameter is for deleting the local data, but maybe I misunderstood that.
What am I doing wrong? Maybe this is an transmission rpc problem? Thanks in advance!

java.lang.NullPointerException

Hi,

Issue is reproduced due to sending the POST request to add the torrent file.
`
2018-02-07 12:24:51 DEBUG DefaultClientConnection:274 - Sending request: POST /transmission/rpc HTTP/1.1
2018-02-07 12:24:51 DEBUG wire:73 - >> "POST /transmission/rpc HTTP/1.1[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - >> "Content-Length: 99[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - >> "Content-Type: text/plain; charset=UTF-8[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - >> "Host: localhost:9091[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - >> "Connection: Keep-Alive[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - >> "[\r][\n]"
2018-02-07 12:24:51 DEBUG headers:278 - >> POST /transmission/rpc HTTP/1.1
2018-02-07 12:24:51 DEBUG headers:281 - >> Content-Length: 99
2018-02-07 12:24:51 DEBUG headers:281 - >> Content-Type: text/plain; charset=UTF-8
2018-02-07 12:24:51 DEBUG headers:281 - >> Host: localhost:9091
2018-02-07 12:24:51 DEBUG headers:281 - >> Connection: Keep-Alive
2018-02-07 12:24:51 DEBUG headers:281 - >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)
2018-02-07 12:24:51 DEBUG wire:87 - >> "{"method":"torrent-add","arguments":{"filename":"/mnt/32g/torrentConnector/file0.torrent"},"tag":1}"
2018-02-07 12:24:51 DEBUG wire:73 - << "HTTP/1.1 401 Unauthorized[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - << "Server: Transmission[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - << "WWW-Authenticate: Basic realm="Transmission"[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - << "Date: Wed, 07 Feb 2018 12:24:51 GMT[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - << "Content-Length: 43[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - << "Content-Type: text/html; charset=ISO-8859-1[\r][\n]"
2018-02-07 12:24:51 DEBUG wire:73 - << "[\r][\n]"
2018-02-07 12:24:51 DEBUG DefaultClientConnection:259 - Receiving response: HTTP/1.1 401 Unauthorized
2018-02-07 12:24:51 DEBUG headers:262 - << HTTP/1.1 401 Unauthorized
2018-02-07 12:24:51 DEBUG headers:265 - << Server: Transmission
2018-02-07 12:24:51 DEBUG headers:265 - << WWW-Authenticate: Basic realm="Transmission"
2018-02-07 12:24:51 DEBUG headers:265 - << Date: Wed, 07 Feb 2018 12:24:51 GMT
2018-02-07 12:24:51 DEBUG headers:265 - << Content-Length: 43
2018-02-07 12:24:51 DEBUG headers:265 - << Content-Type: text/html; charset=ISO-8859-1
2018-02-07 12:24:51 DEBUG DefaultHttpClient:509 - Connection can be kept alive indefinitely
2018-02-07 12:24:51 DEBUG DefaultHttpClient:77 - Authentication required
2018-02-07 12:24:51 DEBUG DefaultHttpClient:107 - localhost:9091 requested authentication
2018-02-07 12:24:51 DEBUG TargetAuthenticationStrategy:175 - Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, Digest, Basic]
2018-02-07 12:24:51 DEBUG TargetAuthenticationStrategy:204 - Challenge for Negotiate authentication scheme not available
2018-02-07 12:24:51 DEBUG TargetAuthenticationStrategy:204 - Challenge for Kerberos authentication scheme not available
2018-02-07 12:24:51 DEBUG TargetAuthenticationStrategy:204 - Challenge for NTLM authentication scheme not available
2018-02-07 12:24:51 DEBUG TargetAuthenticationStrategy:204 - Challenge for Digest authentication scheme not available
2018-02-07 12:24:52 DEBUG wire:87 - << "

401: Unauthorized

Unauthorized User"

I suppose the problem could be caused by the incorrect header of the http request. in method putSessionHeader.
Exception in thread "main" java.lang.NullPointerException at nl.stil4m.transmission.rpc.RpcClient.putSessionHeader(RpcClient.java:101) at nl.stil4m.transmission.rpc.RpcClient.setup(RpcClient.java:81) at nl.stil4m.transmission.rpc.RpcClient.execute(RpcClient.java:46) at nl.stil4m.transmission.rpc.RpcClient.executeWithHeaders(RpcClient.java:97) at nl.stil4m.transmission.api.TransmissionRpcClient.executeCommand(TransmissionRpcClient.java:88) at nl.stil4m.transmission.api.TransmissionRpcClient.addTorrent(TransmissionRpcClient.java:61) at com.epam.RSSTorrentConnector.TorrentClients.TransmissionClient.addTorrent(TransmissionClient.java:56) at com.epam.RSSTorrentConnector.RSSTorrentConnector.main(RSSTorrentConnector.java:31)

ENVIRONMENT:
Linux raspberrypi 4.9.59+ #1047 Sun Oct 29 11:47:10 GMT 2017 armv6l GNU/Linux
Transmission version: 2.92-2

`rateDownload` is empty

When I first used it, there was a JSON parsing error on TorrentInfo.rateDownload.
so I added a annotation to make it work .(@JsonProperty("rateDownload (B/s)"))
but now , function getAllTorrentsInfo return torrentInfo.rateDownload is empty.
This is also the case for the rateUpload
How to solve it,please

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.