Skip to content
nelu edited this page Dec 19, 2024 · 5 revisions

Welcome to the ruTorrent File Manager plugin wiki!

Configuration

The plugin runs jailed inside the path configured in $topDirectory variable in rutorrent/conf/config.php. Its important that this variable is properly including the TRAILING /, the default is '/', meaning the root filesystem. which is not ideal in most cases, since rtorrent SHOULD NOT BE RUN AS ROOT!

Debug support

This will log all debug information (rtorrent commands) in $log_file configured in rtorrent config.php and on the js side it will:

  • enable debug messages in the javascript console
  • disable twigjs template cache - useful when working on views

Enble debug mode by setting $config['debug'] to true.

$config['debug'] = false;

Text Viewer

You can specify what file extensions are supported for viewing files as text:

$config['textExtensions'] = 'log|txt|nfo|sfv|xml|html';

Archives

Currently the plugin supports handling archive files with 7zip and rar (non free). All archive manipulation is done with the use of 7zip, while rar is used ONLY for creation.

The paths for each archive util can be configured by changing with a value suited for your linux distribution in conf.php:

// sample config for debian based
$pathToExternals['rar'] = '';
$pathToExternals['7zip'] = '/usr/bin/7z';

For a hint on how to add support for rar see this

Since all extraction is handled by 7zip, you can specify which file extensions are available for extraction using a regex syntax:

// see what 7zip extraction supports as type by file extension
$config['fileExtractExtensions'] = '7z|bzip2|t?bz2|t?g|gz[ip]?|iso|img|lzma|rar|tar|t?xz|zip|z01|wim';

See what archive formats your 7zip supports with: 7z i

Configuration for creating different archive formats is done by specifing each archive extension with its configuration:

// archive type extension and binary for new archive
$config['archive']['type'] = [
    '7z' => [
        'bin' =>'7zip',
        'compression' => [0, 5, 9],
    ],
    'rar' => [
        'bin' =>'rar',
        'compression' => range(0, 5),
    ]];

// using 7z for zip file creation
$config['archive']['type']['zip'] = $config['archive']['type']['7z'];

In the example above we are adding .zip archive support (as extension) by using the same config as for .7z

The 'bin' value must a be a valid $pathToExternals key, ex:

$pathToExternals['7zip']
...
        'bin' =>'7zip',

File Checksum

Enables specific algos with its file extension

// see what 7zip i supports for hashers
$config['checksumExtensions'] = [
    "CRC32" => 'sfv',
    "SHA256" => 'sha256sum'
];

Unicode support

Right now most of rTorrent instances do not support full utf8 unicode characters like emoji

To workaround this limitation, the config option $config['unicode_emoji_fix'] comes in handy, by using the rTask plugin to run all commands as rTorrent user, the tradeoff comes with a performance decrease in the execution times, since this a slower approach than the one used in filemanager.

Right now its enabled by default till a newer rTorrent will be adopted by most distros, which will include this fix: https://github.com/rakshasa/rtorrent/pull/1309 - You can disable this workaround by setting its value to false

$config['unicode_emoji_fix'] = true;
Clone this wiki locally