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
|
* 2017-03-23 0.3
|
||||||
- Implement torrent-add
|
- Implement torrent-add
|
||||||
- Fix stats for magnets and downloads
|
- Fix stats for magnets and downloads
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<target name="plugin" depends="war">
|
<target name="plugin" depends="war">
|
||||||
<!-- get version number -->
|
<!-- get version number -->
|
||||||
<buildnumber file="scripts/build.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 -->
|
<!-- we don't bother with an update plugin, everything is in a single war -->
|
||||||
<copy file="LICENSE.txt" todir="plugin/" overwrite="true" />
|
<copy file="LICENSE.txt" todir="plugin/" overwrite="true" />
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name=i2psnark-rpc
|
name=i2psnark-rpc
|
||||||
signer=zzz-plugin@mail.i2p
|
signer=zzz-plugin@mail.i2p
|
||||||
consoleLinkName=I2PSnark Remote
|
consoleLinkName=I2PSnark-Remote
|
||||||
consoleLinkURL=/transmission/web/
|
consoleLinkURL=/transmission/web/
|
||||||
description=RPC and Web UI for i2psnark
|
description=RPC and Web UI for i2psnark
|
||||||
author=zzz@mail.i2p
|
author=zzz@mail.i2p
|
||||||
|
@ -24,6 +24,13 @@ public class RPCServlet extends HttpServlet {
|
|||||||
private SnarkManager _manager;
|
private SnarkManager _manager;
|
||||||
private XMWebUIPlugin _plugin;
|
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
|
@Override
|
||||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||||
XMWebUIPlugin plugin;
|
XMWebUIPlugin plugin;
|
||||||
|
@ -425,7 +425,7 @@ XMWebUIPlugin {
|
|||||||
generateSupport(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
generateSupport(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
boolean logit = trace_param;
|
boolean logit = trace_param;
|
||||||
if (logit) {
|
if (logit) {
|
||||||
log("-> " + request.getServletPath());
|
log("-> " + request.getMethod() + ' ' + request.getServletPath());
|
||||||
String qs = request.getQueryString();
|
String qs = request.getQueryString();
|
||||||
if (qs != null)
|
if (qs != null)
|
||||||
log( "-> query: " + qs);
|
log( "-> query: " + qs);
|
||||||
@ -440,10 +440,6 @@ XMWebUIPlugin {
|
|||||||
response.setStatus( 415 );
|
response.setStatus( 415 );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!request.getMethod().equals("POST")) {
|
|
||||||
response.setStatus( 405 );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
String session_id = getSessionID( request );
|
String session_id = getSessionID( request );
|
||||||
// Set cookie just in case client is looking for one..
|
// 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());
|
response.getOutputStream().write("You_didn_t_set_the_X-Transmission-Session-Id".getBytes());
|
||||||
return true;
|
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;
|
String session_id_plus = session_id;
|
||||||
// XXX getHeaders() keys are lowercase.. this line always null?
|
// XXX getHeaders() keys are lowercase.. this line always null?
|
||||||
String tid = request.getHeader( "X-XMRPC-Tunnel-ID" );
|
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( "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( "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( "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-rpc-version", VUZE_RPC_VERSION);
|
||||||
result.put( "az-version", az_version ); // string
|
result.put( "az-version", az_version ); // string
|
||||||
result.put( "az-mode", az_mode ); // string
|
result.put( "az-mode", az_mode ); // string
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<h2>i2psnark-rpc Plugin Version 0.3</h2>
|
<h2>i2psnark-rpc Plugin Version 0.4</h2>
|
||||||
<p>
|
<p>
|
||||||
This is a Transmission- and Vuze- compatible RPC server for i2psnark,
|
This is a Transmission- and Vuze- compatible RPC server for i2psnark,
|
||||||
with the Vuze-modified Transmission web UI.
|
with the Vuze-modified Transmission web UI.
|
||||||
@ -16,6 +16,11 @@ specify port 7657. For example, to list the torrents:
|
|||||||
transmission-remote 7657 -l
|
transmission-remote 7657 -l
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
For <a href="https://sonarr.tv/">Sonarr</a>:
|
||||||
|
Settings -> Download Client -> click "+" -> click "Transmission" -> change port to 7657 and click "Save"
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Most basic features are supported. Several advanced features are not supported.
|
Most basic features are supported. Several advanced features are not supported.
|
||||||
Some may be added in a future release.
|
Some may be added in a future release.
|
||||||
|
Reference in New Issue
Block a user