Compare commits
1 Commits
i2psnark-r
...
i2psnark-r
Author | SHA1 | Date | |
---|---|---|---|
4025f49581 |
@ -1,3 +1,6 @@
|
||||
* 2017-03-26 0.4
|
||||
- Fixes for Sonarr
|
||||
|
||||
* 2017-03-23 0.3
|
||||
- Implement torrent-add
|
||||
- Fix stats for magnets and downloads
|
||||
|
@ -11,7 +11,7 @@
|
||||
<target name="plugin" depends="war">
|
||||
<!-- get version number -->
|
||||
<buildnumber file="scripts/build.number" />
|
||||
<property name="release.number" value="0.3" />
|
||||
<property name="release.number" value="0.4" />
|
||||
|
||||
<!-- we don't bother with an update plugin, everything is in a single war -->
|
||||
<copy file="LICENSE.txt" todir="plugin/" overwrite="true" />
|
||||
|
@ -1,6 +1,6 @@
|
||||
name=i2psnark-rpc
|
||||
signer=zzz-plugin@mail.i2p
|
||||
consoleLinkName=I2PSnark Remote
|
||||
consoleLinkName=I2PSnark-Remote
|
||||
consoleLinkURL=/transmission/web/
|
||||
description=RPC and Web UI for i2psnark
|
||||
author=zzz@mail.i2p
|
||||
|
@ -24,6 +24,13 @@ public class RPCServlet extends HttpServlet {
|
||||
private SnarkManager _manager;
|
||||
private XMWebUIPlugin _plugin;
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
// Sonarr does a GET to test,
|
||||
// pass it through so it will get the 409 response
|
||||
doPost(req, resp);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
XMWebUIPlugin plugin;
|
||||
|
@ -425,7 +425,7 @@ XMWebUIPlugin {
|
||||
generateSupport(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
boolean logit = trace_param;
|
||||
if (logit) {
|
||||
log("-> " + request.getServletPath());
|
||||
log("-> " + request.getMethod() + ' ' + request.getServletPath());
|
||||
String qs = request.getQueryString();
|
||||
if (qs != null)
|
||||
log( "-> query: " + qs);
|
||||
@ -440,10 +440,6 @@ XMWebUIPlugin {
|
||||
response.setStatus( 415 );
|
||||
return true;
|
||||
}
|
||||
if (!request.getMethod().equals("POST")) {
|
||||
response.setStatus( 405 );
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
String session_id = getSessionID( request );
|
||||
// Set cookie just in case client is looking for one..
|
||||
@ -458,6 +454,12 @@ XMWebUIPlugin {
|
||||
response.getOutputStream().write("You_didn_t_set_the_X-Transmission-Session-Id".getBytes());
|
||||
return true;
|
||||
}
|
||||
if (!request.getMethod().equals("POST")) {
|
||||
// Sonarr does a GET for testing and to get the 409, shouldn't go past here
|
||||
response.setContentType("text/plain; charset=UTF-8");
|
||||
response.setStatus(200);
|
||||
return true;
|
||||
}
|
||||
String session_id_plus = session_id;
|
||||
// XXX getHeaders() keys are lowercase.. this line always null?
|
||||
String tid = request.getHeader( "X-XMRPC-Tunnel-ID" );
|
||||
@ -1925,7 +1927,8 @@ XMWebUIPlugin {
|
||||
result.put( "rpc-version-minimum", Long.valueOf(6)); // number the minimum RPC API version supported
|
||||
result.put( "seedRatioLimit", Double.valueOf(100.0) ); // double the default seed ratio for torrents to use
|
||||
result.put( "seedRatioLimited", Boolean.FALSE ); // boolean true if seedRatioLimit is honored by default
|
||||
result.put( "version", CoreVersion.VERSION); // string
|
||||
result.put( "version", "2.80"); // This must match the RPC API from the spec to make Sonarr happy
|
||||
result.put( "i2p-version", CoreVersion.VERSION); // unused
|
||||
result.put( "az-rpc-version", VUZE_RPC_VERSION);
|
||||
result.put( "az-version", az_version ); // string
|
||||
result.put( "az-mode", az_mode ); // string
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
<h2>i2psnark-rpc Plugin Version 0.3</h2>
|
||||
<h2>i2psnark-rpc Plugin Version 0.4</h2>
|
||||
<p>
|
||||
This is a Transmission- and Vuze- compatible RPC server for i2psnark,
|
||||
with the Vuze-modified Transmission web UI.
|
||||
@ -16,6 +16,11 @@ specify port 7657. For example, to list the torrents:
|
||||
transmission-remote 7657 -l
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
For <a href="https://sonarr.tv/">Sonarr</a>:
|
||||
Settings -> Download Client -> click "+" -> click "Transmission" -> change port to 7657 and click "Save"
|
||||
|
||||
|
||||
<p>
|
||||
Most basic features are supported. Several advanced features are not supported.
|
||||
Some may be added in a future release.
|
||||
|
Reference in New Issue
Block a user