-
Notifications
You must be signed in to change notification settings - Fork 12
/
conf.php
66 lines (53 loc) · 2.44 KB
/
conf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
global $pathToExternals;
// set with fullpath to binary or leave empty
$pathToExternals['rar'] = '';
$pathToExternals['7zip'] = '/usr/bin/7z';
$config['debug'] = false;
// slower workaround using rTask to support unicode emoji characters.
// temporary till it gets fixed in rtorrent upstreams
// issue: https://github.com/rakshasa/rtorrent/pull/1309
// set to false for utf8 with no emoji chars support
$config['unicode_emoji_fix'] = true;
$config['mkdperm'] = 755; // default permission to set to new created directories
// files that are viewable as text
$config['textExtensions'] = 'log|txt|nfo|sfv|xml|html';
// see what 7zip extraction supports as type by file extension
$config['fileExtractExtensions'] = '(7z|bzip2|t?bz2|tgz|gz(ip)?|iso|img|lzma|rar|tar|t?xz|zip|z01|wim)(\.[0-9]+)?';
// see what 7zip i supports for hashers
$config['checksumExtensions'] = [
"CRC32" => 'sfv',
"SHA256" => 'sha256sum'
];
// archive creation, see archiver man page before editing
// archive.fileExt -> config
$config['archive']['type'] = [
'7z' => [
'bin' => '7zip',
'compression' => [1, 5, 9],
],
'rar' => [
'bin' => 'rar',
'compression' => [0, 3, 5],
// 'wrapper' => \Flm\Rar::class
]];
$config['archive']['type']['zip'] = $config['archive']['type']['7z'];
$config['archive']['type']['tar'] = $config['archive']['type']['7z'];
$config['archive']['type']['tar']['has_password'] = false;
$config['archive']['type']['bz2'] = $config['archive']['type']['tar'];
$config['archive']['type']['gz'] = $config['archive']['type']['tar'];
$config['archive']['type']['tar.7z'] = $config['archive']['type']['tar'];
$config['archive']['type']['tar.bz2'] = $config['archive']['type']['tar'];
$config['archive']['type']['tar.gz'] = $config['archive']['type']['tar'];
$config['archive']['type']['tar.xz'] = $config['archive']['type']['tar'];
// multiple passes for archiving and compression
$config['archive']['type']['tar.gz']['multipass'] = ['tar', 'gzip'];
$config['archive']['type']['tar.bz2']['multipass'] = ['tar', 'bzip2'];
$config['archive']['type']['tar.7z']['multipass'] = ['tar', '7z'];
$config['archive']['type']['tar.xz']['multipass'] = ['tar', 'xz'];
$config['extensions'] = [
'checksum' => $config['checksumExtensions'],
// make checksum files available to the text viewer
'text' => $config['textExtensions'] . '|' . implode("|", $config['checksumExtensions']),
'fileExtract' => $config['fileExtractExtensions']
];