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

How update 'Source' plugin to download multiple .torrent files and save them in a single .zip file? #606

Open
kdantas opened this issue Sep 19, 2022 · 0 comments

Comments

@kdantas
Copy link

kdantas commented Sep 19, 2022

Hi, my seedbox with rTorrent/ruTorrent was installed through the arakasi script. The seedbox is running on Ubuntu 16.04 Server Armhf_32. I know it's obsolete, but it's ok for me. The ruTorrent is v3.8 and the rTorrent is v0.9.7/0.13.7. My question is: how can I update the Source Plugin to download multiple .torrent files and save them in a single .zip file?

The action.php in source plugin folder is:

`<?php
require_once( '../../php/rtorrent.php' );

if(isset($_REQUEST['result']))
cachedEcho('noty(theUILang.cantFindTorrent,"error");',"text/html");
if(isset($_REQUEST['hash']))
{
$torrent = rTorrent::getSource($_REQUEST['hash']);
if($torrent)
$torrent->send();
}
header("HTTP/1.0 302 Moved Temporarily");
header("Location: ".$_SERVER['PHP_SELF'].'?result=0');`

The init.js in source plugin folder is:

plugin.loadLang();

if(plugin.canChangeMenu())
{
theWebUI.getSource = function( id )
{
$("#srchash").val(id);
$("#getsource").submit();
}

plugin.createMenu = theWebUI.createMenu;
theWebUI.createMenu = function( e, id )
{
	plugin.createMenu.call(this, e, id);
	if(plugin.enabled)
	{
		var el = theContextMenu.get( theUILang.Properties );
		if( el )
			theContextMenu.add( el, [theUILang.getSource,  (this.getTable("trt").selCount > 1) || (id.length>40) ? null : "theWebUI.getSource('" + id + "')"] );
	}
}

}

plugin.onLangLoaded = function()
{
$(document.body).append($("<iframe name='srcfrm'/>").css({visibility: "hidden"}).attr( { name: "srcfrm", id: "srcfrm" } ).width(0).height(0).load(function()
{
$("#srchash").val('');
var d = (this.contentDocument || this.contentWindow.document);
if(d && (d.location.href != "about:blank"))
try { eval(d.body.textContent ? d.body.textContent : d.body.innerText); } catch(e) {}
}));
$(document.body).append(
$('

'+
''+
'').width(0).height(0));
}

plugin.onRemove = function()
{
$('#srcfrm').remove();
$('#getsource').remove();
}

`root@ns3127440:/# rtversion
rtorrent installed: 0.9.7
rtorrent available:

RuTorrent installed: 3.8
RuTorrent available: 4.0

rtinst
Current Release: rtinst v1.7.3
Use rtsetup to update to rtinst v1.8.19`

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

No branches or pull requests

1 participant