mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-16 13:26:33 +00:00
Add trac wiki export and migration scripts
This commit is contained in:
parent
00b8e60b7a
commit
5f20e0aa66
BIN
trac_wiki_export/__pycache__/migrate.cpython-310.pyc
Normal file
BIN
trac_wiki_export/__pycache__/migrate.cpython-310.pyc
Normal file
Binary file not shown.
3536
trac_wiki_export/migrate.py
Normal file
3536
trac_wiki_export/migrate.py
Normal file
File diff suppressed because it is too large
Load Diff
6
trac_wiki_export/requirements.txt
Normal file
6
trac_wiki_export/requirements.txt
Normal file
@ -0,0 +1,6 @@
|
||||
pygithub @ git+https://github.com/sagemath/PyGithub.git
|
||||
requests
|
||||
markdown
|
||||
roman
|
||||
diskcache
|
||||
rich
|
24
trac_wiki_export/trac_wiki_md.py
Normal file
24
trac_wiki_export/trac_wiki_md.py
Normal file
@ -0,0 +1,24 @@
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
import migrate
|
||||
|
||||
|
||||
def main(wiki_dir):
|
||||
pagenames = [page.name for page in wiki_dir.iterdir()]
|
||||
conv_help = migrate.WikiConversionHelper(pagenames=pagenames)
|
||||
|
||||
for wiki_page in wiki_dir.iterdir():
|
||||
conv_help.set_wikipage_paths(wiki_page.name)
|
||||
print("Converting wiki page:", wiki_page.name)
|
||||
|
||||
md_text = migrate.trac2markdown(wiki_page.read_text(), ".", conv_help)
|
||||
out_filepath = Path("md_output", conv_help._wiki_path)
|
||||
out_filepath = out_filepath.with_suffix(".md")
|
||||
out_filepath.parent.mkdir(parents=True, exist_ok=True)
|
||||
out_filepath.write_text(md_text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
wiki_dir = Path(sys.argv[1])
|
||||
main(wiki_dir)
|
45
trac_wiki_export/wiki_dir/About
Normal file
45
trac_wiki_export/wiki_dir/About
Normal file
@ -0,0 +1,45 @@
|
||||
= About =
|
||||
|
||||
== What is Deluge? ==
|
||||
|
||||
Deluge is a full-featured [http://en.wikipedia.org/wiki/BitTorrent BitTorrent] client for Linux, OS X, Unix and Windows. It uses [http://www.libtorrent.org/ libtorrent] in its backend and features multiple user-interfaces including: GTK+, web and console. It has been designed using the client server model with a daemon process that handles all the bittorrent activity. The Deluge daemon is able to run on headless machines with the user-interfaces being able to connect remotely from any platform.
|
||||
|
||||
Deluge features a rich plugin collection; in fact, most of Deluge's functionality is available in the form of plugins.
|
||||
|
||||
Deluge was created with the intention of being lightweight and unobtrusive. It is our belief that downloading shouldn't be the primary task on your computer and therefore shouldn't monopolize system resources.
|
||||
|
||||
Deluge is not designed for any one desktop environment and will work just fine in GNOME, KDE, XFCE and others. We do our best to adhere to the [http://freedesktop.org freedesktop] standards.
|
||||
|
||||
Deluge is [http://www.gnu.org/philosophy/free-sw.html Free Software] and is licensed under the [http://www.gnu.org/licenses/gpl.txt GNU General Public License].
|
||||
|
||||
== Who made Deluge? ==
|
||||
|
||||
The ''Deluge Team'' consists of Andrew Resch, Damien Churchill and John Garland. Previous developers and contributors include Zach Tibbitts, Alon Zakai, Marcos Pinto, Martijn Voncken, Sadrul Habib Chowdhury, Alex Dedul, Ido Abramovich.
|
||||
|
||||
The [http://www.libtorrent.org libtorrent] library is a huge part of Deluge and is developed by Arvid Norberg.
|
||||
|
||||
== What about features? ==
|
||||
|
||||
Deluge has a wide-array of features, including:
|
||||
* Core/UI split allowing Deluge to run as a daemon
|
||||
* Connect remotely to the Deluge daemon
|
||||
* Web UI
|
||||
* Console UI
|
||||
* GTK+ UI
|
||||
* !BitTorrent Protocol Encryption
|
||||
* Mainline DHT
|
||||
* Local Peer Discovery (aka LSD)
|
||||
* FAST protocol extension
|
||||
* µTorrent Peer Exchange
|
||||
* UPnP and NAT-PMP
|
||||
* Proxy support
|
||||
* Web seed
|
||||
* Private Torrents
|
||||
* Global and per-torrent speed limits
|
||||
* Configurable bandwidth scheduler
|
||||
* Password protection
|
||||
* RSS (via Plugin)
|
||||
* Other [http://www.rasterbar.com/products/libtorrent/features.html libtorrent features]
|
||||
* And much more!
|
||||
|
||||
['Download'] the latest release and give it a try!
|
201
trac_wiki_export/wiki_dir/Building%2Flibtorrent
Normal file
201
trac_wiki_export/wiki_dir/Building%2Flibtorrent
Normal file
@ -0,0 +1,201 @@
|
||||
= Build libtorrent from source =
|
||||
|
||||
[[PageOutline(2-4,,inline, unnumbered)]]
|
||||
|
||||
Check libtorrent [http://www.libtorrent.org/building.html documentation] for any updates to build procedures.
|
||||
|
||||
== Ubuntu / Debian ==
|
||||
|
||||
1. Install dependencies for libtorrent build automatically using `build-dep`:
|
||||
{{{
|
||||
sudo apt-get build-dep libtorrent-rasterbar
|
||||
sudo apt-get install checkinstall
|
||||
}}}
|
||||
|
||||
'''OR''' if that fails manually install them:
|
||||
{{{
|
||||
sudo apt-get install build-essential checkinstall libboost-system-dev libboost-python-dev libboost-chrono-dev libboost-random-dev libssl-dev
|
||||
}}}
|
||||
|
||||
2. Download [https://github.com/arvidn/libtorrent/releases libtorrent] and extract:
|
||||
{{{
|
||||
tar xf libtorrent-rasterbar.tar.gz
|
||||
cd libtorrent-rasterbar
|
||||
}}}
|
||||
3. Configure:
|
||||
{{{
|
||||
./configure --enable-python-binding --with-libiconv
|
||||
}}}
|
||||
- Missing `configure` script: (e.g. source code from git) create it with `./autotool.sh` (requires extra packages: `sudo apt-get install autoconf automake libtool`).
|
||||
- ''Logging:'' Add `--enable-logging=default` to get logs in the current working directory. `verbose` and `error` can also be used.
|
||||
- ''Debug:'' To create a debug build add `--enable-debug=yes`.
|
||||
- ARM architecture (Raspberry Pi, etc): add `--with-boost-libdir=/usr/lib/arm-linux-gnueabihf` at the end to avoid boost library error.
|
||||
|
||||
4. Build:
|
||||
{{{
|
||||
make -j$(nproc)
|
||||
}}}
|
||||
- ''CPU Cores:'' The `make` option `-j$(nproc)` will utilize all available cpu cores.
|
||||
- ''Non-specific errors:'' e.g. `g++: internal compiler error: Killed (program cc1plus)` try using a [#TemporarySwapFileforRasperryPiorlowmemorysystems temporary swap file]
|
||||
|
||||
5. Install library and python bindings:
|
||||
{{{
|
||||
sudo checkinstall
|
||||
sudo ldconfig
|
||||
}}}
|
||||
''Substituted `make install` for `checkinstall` as it creates a deb package for easier removal/re-install by `dpkg`.'' [[br]]
|
||||
''Running `ldconfig` avoids an `ImportError` for `libtorrent-rasterbar.so`, a result of Python being unable to find the main library.''
|
||||
|
||||
6. Verify libtorrent and the python bindings are installed correctly:
|
||||
{{{
|
||||
python3 -c "import libtorrent; print (libtorrent.version)"
|
||||
>> 1.0.6.0
|
||||
}}}
|
||||
|
||||
|
||||
=== Temporary Swap File for Rasperry Pi or low memory systems ===
|
||||
|
||||
Compiling libtorrent requires a lot of memory/swap during the `make` process ~1-2GB.
|
||||
|
||||
If you get an internal error during the make phase on a computer with low memory and/or no swap partition (verify with `free -m` ) you can try the below procedure.
|
||||
|
||||
1. Create a 1GB empty swap file, (use a drive location that has enough free space):
|
||||
{{{
|
||||
dd if=/dev/zero of=/.swapfile bs=1M count=1024
|
||||
}}}
|
||||
2. Format swap file:
|
||||
{{{
|
||||
mkswap /.swapfile
|
||||
}}}
|
||||
3. Activate swap file:
|
||||
{{{
|
||||
sudo swapon /.swapfile
|
||||
}}}
|
||||
4. Verify swap file is recognized:
|
||||
{{{
|
||||
swapon -s
|
||||
}}}
|
||||
5. Start/restart your libtorrent build.
|
||||
6. Disable swap file:
|
||||
{{{
|
||||
swapoff /.swapfile
|
||||
}}}
|
||||
7. Delete swap file:
|
||||
{{{
|
||||
rm -f /.swapfile
|
||||
}}}
|
||||
|
||||
|
||||
|
||||
== Windows ==
|
||||
|
||||
1. Download and install/extract these packages:
|
||||
* [http://www.microsoft.com/en-us/download/details.aspx?id=44266 MS VC++ Compiler for Python]
|
||||
* [https://openssl.org/source/ OpenSSL] requirement needs [http://dev.deluge-torrent.org/wiki/Building/openssl#BuildingOpenSSLforWindows building from source].
|
||||
* [http://www.python.org/ Python 2.7]
|
||||
* [http://www.microsoft.com/en-us/download/details.aspx?id=5582 MSVC 2008 SP1 Redist Package (x86)]
|
||||
* [https://www.microsoft.com/en-gb/download/details.aspx?id=21 .NET Framework 3.5]
|
||||
* [http://sourceforge.net/projects/boost/files/boost/ Boost]
|
||||
* [https://github.com/arvidn/libtorrent/releases libtorrent]
|
||||
''Note: Install or extract to a path without spaces e.g. `C:\` drive.''
|
||||
|
||||
2. Setup the Windows Command Prompt by executing `VC for Python` `vcvarsall.bat`, e.g.:
|
||||
{{{
|
||||
"%USERPROFILE%\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat"
|
||||
}}}
|
||||
''Note: If using Visual Studio simple open a `Visual Studio 2008 Command Prompt`.''
|
||||
|
||||
3. Boost Build Steps:
|
||||
|
||||
In the boost directory run the following:
|
||||
{{{
|
||||
bootstrap.bat
|
||||
}}}
|
||||
Due to a [https://svn.boost.org/trac/boost/ticket/10817 boost bug] with `VC for Python`, need to edit `project-config.jam` in boost folder to the following:
|
||||
{{{
|
||||
using msvc : : : <setup>"%USERPROFILE%\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\vcvarsall.bat" ;
|
||||
}}}
|
||||
Then run:
|
||||
{{{
|
||||
b2 --with-system --with-date_time --with-python --with-chrono --with-random
|
||||
}}}
|
||||
|
||||
5. Create a Boost `user-config.jam` file in the toplevel folder (e.g. `C:\boost`) with the following to force `msvc` version:
|
||||
{{{
|
||||
using msvc : 9.0 : : <setup>"%USERPROFILE%\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\vcvarsall.bat" ;
|
||||
}}}
|
||||
''Note: For Visual Studio, simply `using msvc : 9.0 ;` is required.
|
||||
|
||||
6. libtorrent Build Steps:
|
||||
a. Setup the Environmental Variables:
|
||||
{{{
|
||||
set BOOST_BUILD_PATH=C:\boost
|
||||
set PATH=%BOOST_BUILD_PATH%;%PATH%
|
||||
}}}
|
||||
b. Navigate to libtorrent Python bindings folder:
|
||||
{{{
|
||||
cd C:\libtorrent-rasterbar\bindings\python
|
||||
}}}
|
||||
c. Build libtorrent with Python bindings:
|
||||
{{{
|
||||
b2 boost=source libtorrent-link=static geoip=static boost-link=static release optimization=space encryption=openssl include=C:\OpenSSL-Win32\include linkflags=/LIBPATH:C:\OpenSSL-Win32\lib -j%NUMBER_OF_PROCESSORS% --hash
|
||||
}}}
|
||||
''Note1: Modify the paths for OpenSSL if installed to a different location.'' [[br]]
|
||||
''Note2: For libtorrent versions <=1.0.6 rename `libtorrent-link` to `link`.''
|
||||
|
||||
For libtorrent versions >=1.1:
|
||||
{{{
|
||||
b2 libtorrent-link=static boost-link=static release optimization=space encryption=on crypto=openssl include=C:\OpenSSL-Win32\include linkflags=/LIBPATH:C:\OpenSSL-Win32\lib -j%NUMBER_OF_PROCESSORS% --hash
|
||||
}}}
|
||||
|
||||
{{{#!comment
|
||||
These are the old instructions but the setup.py in 0.16 does not build with openssl so not useful.
|
||||
{{{
|
||||
C:\python27\python.exe setup.py build
|
||||
}}}
|
||||
|
||||
If there is no `setup.py` (i.e. tarball from version control repo) use `setup.py.in` instead.
|
||||
|
||||
You can create setup.py on Ubuntu: (although makes no difference to the windows section of the script)
|
||||
{{{
|
||||
sudo apt-get install libtool libboost1.46-all-dev
|
||||
./autotool.sh
|
||||
./configure --enable-python-binding
|
||||
}}}
|
||||
|
||||
There might be an error at the end about `shutil` unable to move the lib but can be ignored.
|
||||
|
||||
Upon a successful build the resulting library file is named `libtorrent.pyd` and is located under this directory: `libtorrent-rasterbar\bindings\python\bin\msvc-9.0\release\boost-source\geoip-static\link-static\optimization-space`
|
||||
}}}
|
||||
Upon a successful build the library file named `libtorrent.pyd` is created in the current `bindings/python` directory.
|
||||
|
||||
|
||||
|
||||
|
||||
=== Debugging libtorrent on Windows ===
|
||||
|
||||
* Download and install just the `debug tools`:
|
||||
* [http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx Standalone Debugging Tools for Windows (WinDbg)]
|
||||
* Build libtorrent with debug enabled by changing `release` to `debug` in the `b2` build line.
|
||||
* Open `windbg` ''(C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe)'':
|
||||
* `File|Open Executable` and tick `Debug child processes`
|
||||
* Hit `F5` or `Go` a few times to get the program running
|
||||
* After the crash execute: `!analyze -v -f`.
|
||||
* Symbols for libtorrent will be in the build output path:
|
||||
{{{
|
||||
C:\libtorrent-rasterbar\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi
|
||||
}}}
|
||||
So the full symbols line should look something like this:
|
||||
{{{
|
||||
srv*;C:\libtorrent-rasterbar\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi;C:\Python27\symbols;srv*c:\Symbols*http://msdl.microsoft.com/download/symbols
|
||||
}}}
|
||||
|
||||
Debug References:
|
||||
* [https://developer.mozilla.org/en/docs/How_to_get_a_stacktrace_with_WinDbg Mozilla WinDbg stacktrace]
|
||||
* [http://gui-at.blogspot.co.uk/2010/01/windbg-for-beginners.html Windbg for Beginners]
|
||||
|
||||
== Further Resources ==
|
||||
|
||||
* [http://libtorrent.org/building.html libtorrent]
|
||||
* [http://leechcraft.org/development-building-from-source-win32#Building_libtorrent Leechcraft]
|
||||
* [https://github.com/qbittorrent/qBittorrent/wiki/Compiling-with-MSVC-2008%28static-linkage%29 QBittorrent]
|
29
trac_wiki_export/wiki_dir/Building%2Fopenssl
Normal file
29
trac_wiki_export/wiki_dir/Building%2Fopenssl
Normal file
@ -0,0 +1,29 @@
|
||||
= Building OpenSSL for Windows =
|
||||
|
||||
These steps were sourced from http://www.magicsplat.com/blog/building-openssl-tls/
|
||||
|
||||
== Install Dependencies ==
|
||||
|
||||
* [http://www.activestate.com/activeperl/downloads ActivePerl]
|
||||
* [http://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D nasm]
|
||||
* [http://www.microsoft.com/en-us/download/details.aspx?id=44266 MS VC++ Compiler for Python]
|
||||
|
||||
== Build ==
|
||||
|
||||
* Extract OpenSSL source and navigate to it in VC++ prompt.
|
||||
|
||||
* In Visual C++ 2008 32-bit Command Prompt:
|
||||
{{{
|
||||
set PATH=C:\Users\IEUser\AppData\Local\nasm;%PATH%
|
||||
perl Configure VC-WIN32 --prefix=C:\OpenSSL-Win32
|
||||
ms\do_nasm
|
||||
nmake -f ms\ntdll.mak
|
||||
nmake -f ms\ntdll.mak test
|
||||
nmake -f ms\ntdll.mak install
|
||||
}}}
|
||||
|
||||
== Precompiled ==
|
||||
There are precompiled but need to ensure the compiler is `msvc 9.0 (2008)` along with the openssl `include` and `lib` folders for libtorrent to link to.
|
||||
|
||||
* http://www.npcglib.org/~stathis/blog/precompiled-openssl/
|
||||
* https://indy.fulgan.com/SSL/?C=M;O=A
|
7
trac_wiki_export/wiki_dir/ContactUs
Normal file
7
trac_wiki_export/wiki_dir/ContactUs
Normal file
@ -0,0 +1,7 @@
|
||||
= Contact Us =
|
||||
|
||||
* [http://forum.deluge-torrent.org Forum] - Forum for support and discussion
|
||||
|
||||
* [irc://irc.libera.chat/deluge IRC] - IRC chat in '''#deluge''' on '''irc.libera.chat'''
|
||||
|
||||
* [http://groups.google.com/group/deluge-dev Deluge-Dev Mailing List] - Development Mailing List
|
80
trac_wiki_export/wiki_dir/Contributing%2FBugReporting
Normal file
80
trac_wiki_export/wiki_dir/Contributing%2FBugReporting
Normal file
@ -0,0 +1,80 @@
|
||||
= Before Reporting a Bug =
|
||||
|
||||
* Install the latest version of Deluge: '''[[Include(http://download.deluge-torrent.org/version)]]'''
|
||||
|
||||
* Check the '''[wiki:Faq Frequently Asked Questions]'''.
|
||||
|
||||
== Search for Existing Issues ==
|
||||
|
||||
''Frequently questions from users often relate to already fixed or known about bugs in Deluge so please search before asking.''
|
||||
|
||||
* '''[search: Deluge Bug Tickets]'''
|
||||
|
||||
* '''[http://forum.deluge-torrent.org/search.php Deluge Forum]'''
|
||||
|
||||
* Deluge site search using a [https://www.google.co.uk/search?q=site:deluge-torrent.org Search Engine]
|
||||
|
||||
== Ask your Question Effectively ==
|
||||
Two links that provide helpful generic tips for reporting software problems.
|
||||
|
||||
[http://www.catb.org/~esr/faqs/smart-questions.html#before How To Ask Questions The Smart Way][[br]]
|
||||
[http://www.chiark.greenend.org.uk/~sgtatham/bugs.html How to Report Bugs Effectively]
|
||||
|
||||
|
||||
= Collect Bug Information =
|
||||
|
||||
You will need the following information when reporting a bug, Deluge and libtorrent versions are essential:
|
||||
|
||||
* Version Information:
|
||||
* [wiki:Troubleshooting#DelugeVersion Deluge version].
|
||||
* [wiki:Troubleshooting#libtorrentversion libtorrent version].
|
||||
* Operating System and version.
|
||||
* Browser and version ''(if using WebUI)''.
|
||||
|
||||
* Plugins enabled.
|
||||
* Language in use ''(if not in English)''.
|
||||
* Installation method ''i.e. from source, package or installer''.
|
||||
|
||||
* Precise steps to reproduce the bug.
|
||||
|
||||
* [wiki:Troubleshooting#EnableDelugeLogging Deluge Logs] (`error` level is usually fine in first instance).
|
||||
* Information of any errors or traces.
|
||||
* [wiki:Faq#WheredoesDelugestoreitssettings Config] files.
|
||||
* Screenshots and screencasts are helpful for GUI issues.
|
||||
|
||||
''Note: If you are using Client and Daemon you may need version or logs from both.''
|
||||
|
||||
== Hard Crashes of Deluge (or libtorrent) ==
|
||||
A backtrace using `gdb` may be required for hard crashes of Deluge (crashes without an obvious error in Deluge logs).
|
||||
|
||||
Here is a ''deluged'' example:
|
||||
{{{
|
||||
gdb --args python /usr/bin/deluged -d
|
||||
(gdb) run
|
||||
## After Crash ##
|
||||
(gdb) thread apply all backtrace
|
||||
}}}
|
||||
|
||||
= Opening a Bug Ticket =
|
||||
|
||||
The bug ticket system we use is called Trac. [/register Sign up] if you haven't already.
|
||||
|
||||
''Note: The Trac user account is separate to the Forum user account.''
|
||||
|
||||
1. [/newticket Create a new bug ticket]
|
||||
2. Fill in the boxes, making sure the following are completed:
|
||||
* ''Summary:'' Short description of issue
|
||||
* ''Description:'' Include the steps to reproduce and other collected information, use `{{{ }}}` markup for pasting code or errors.
|
||||
* ''Version:'' Deluge version
|
||||
* ''Component:'' Best guess as to where the problem occurs
|
||||
3. Attach any logs, screenshots or patches
|
||||
|
||||
= External bug trackers =
|
||||
|
||||
These sites also track bugs relating to Deluge or libtorrent.
|
||||
|
||||
* [https://bugs.launchpad.net/ubuntu/+source/deluge Ubuntu], [https://apps.fedoraproject.org/packages/deluge/bugs Fedora], [http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=deluge Debian], [https://bugs.archlinux.org/index.php?string=deluge Arch], [https://bugs.gentoo.org/buglist.cgi?quicksearch=deluge Gentoo], [http://trac.macports.org/query?status=assigned&status=new&status=reopened&order=priority&port=deluge MacPorts]
|
||||
|
||||
'''libtorrent (rasterbar) Bugs:'''
|
||||
|
||||
* [https://github.com/arvidn/libtorrent/issues libtorrent issue tracker], also [https://bugs.launchpad.net/ubuntu/+source/libtorrent-rasterbar Ubuntu], [https://admin.fedoraproject.org/pkgdb/acls/bugs/rb_libtorrent Fedora], [http://trac.macports.org/query?status=assigned&status=new&status=reopened&order=priority&port=libtorrent-rasterbar MacPorts]
|
82
trac_wiki_export/wiki_dir/Contributing%2FCodingStyle
Normal file
82
trac_wiki_export/wiki_dir/Contributing%2FCodingStyle
Normal file
@ -0,0 +1,82 @@
|
||||
[[PageOutline(2-4,,inline)]]
|
||||
|
||||
= Coding Styles =
|
||||
|
||||
== Common ==
|
||||
* Line length: Maximum of `119` rather than usual `79`. That said, where possible keep it between `79-99` to keep it readable.
|
||||
* Indent: `4 spaces`, no tabs.
|
||||
* All code should use `'single quotes'`.
|
||||
|
||||
== Python ==
|
||||
Deluge follows [http://www.python.org/dev/peps/pep-0008/ PEP8] and [http://docs.python-guide.org/en/latest/writing/style/ Python Code Style] with line length the only exception.
|
||||
|
||||
* Code '''must''' pass [https://pypi.python.org/pypi/flake8 flake8] (w/[https://pypi.python.org/pypi/flake8-quotes flake8-quotes]), [https://pypi.python.org/pypi/isort isort] and [http://www.pylint.org/ Pylint] source code checkers.
|
||||
{{{
|
||||
flake8 deluge
|
||||
isort -rc -df deluge
|
||||
pylint deluge
|
||||
pylint deluge/plugins/*/deluge/
|
||||
}}}
|
||||
|
||||
* Using the [http://pre-commit.com/ pre-common] app can aid in picking up issues before creating git commits.
|
||||
|
||||
* All byte strings (`str`) should be decoded to strings (unicode strings, `unicode`) on input and encoded back to byte strings on output. [http://stackoverflow.com/a/606199/175584 From Stackoverflow:]
|
||||
{{{
|
||||
>>> b"abcde"
|
||||
b'abcde'
|
||||
>>> b"abcde".decode("utf-8")
|
||||
'abcde'
|
||||
}}}
|
||||
''Notes:''
|
||||
* ''PyGTK/GTK+ will accept `str` (utf8 encoded) or `unicode` but will only return `str`. See [http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html GTK+ Unicode] docs. ''[[br]]
|
||||
* ''There is also a `bytearray` type which enables in-place modification of a string. See [http://stackoverflow.com/a/9099337/175584 Python Bytearrays] ''[[br]]
|
||||
* ''For reference Python 3 renames `unicode` to `str` type and byte strings become `bytes` type. ''[[br]]
|
||||
|
||||
* All relative path separators used within code should be converted to posix format `/`, so should not contain `\` or `\\`. This is to prevent confusion when dealing with cross-platform clients and servers.
|
||||
|
||||
=== Docstrings ===
|
||||
|
||||
You will find a mix of the older [http://docutils.sourceforge.net/docs/user/rst/quickref.html reStructuredText] and newer, easier to read, [http://sphinxcontrib-napoleon.readthedocs.org/en/latest/ Sphinx Napoleon] format.
|
||||
|
||||
Going forward the Napoleon [http://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html Google Style] will be used for all new doctrings and eventually convert over the rest.
|
||||
|
||||
Google Style short example:
|
||||
{{{
|
||||
def func(arg):
|
||||
"""Function purpose.
|
||||
|
||||
Args:
|
||||
arg (type): Description.
|
||||
|
||||
Returns:
|
||||
type: Description. If the line is too, long indent next
|
||||
line with three spaces.
|
||||
|
||||
"""
|
||||
}}}
|
||||
|
||||
Most common sections are `Args` and `Returns`. See complete list of [https://sphinxcontrib-napoleon.readthedocs.io/en/latest/#docstring-sections supported headers].
|
||||
|
||||
Verify that the documentation parses correctly with:
|
||||
{{{
|
||||
python setup.py build_docs
|
||||
}}}
|
||||
|
||||
=== Python References ===
|
||||
|
||||
Useful links to style guides from other projects:
|
||||
|
||||
* [http://docs.ckan.org/en/latest/contributing/python.html CKAN Python coding standards]
|
||||
* [http://google-styleguide.googlecode.com/svn/trunk/pyguide.html Google Python Style Guide]
|
||||
* [https://gist.github.com/sloria/7001839 Best of the Best Practices Guide for Python]
|
||||
|
||||
== Javascript ==
|
||||
|
||||
Using [https://github.com/jedmao/codepainter codepainter] with `hautelook` style will ensure a consistent coding style.
|
||||
{{{
|
||||
codepaint xform -p hautelook "file.js"
|
||||
}}}
|
||||
|
||||
* Classes should follow the Ext coding style.
|
||||
* Class names should be in !CamelCase
|
||||
* Instances of classes should use camelCase.
|
1
trac_wiki_export/wiki_dir/Contributing%2FPullRequests
Normal file
1
trac_wiki_export/wiki_dir/Contributing%2FPullRequests
Normal file
@ -0,0 +1 @@
|
||||
Moved to: https://deluge.readthedocs.io/en/develop/contributing/code.html
|
64
trac_wiki_export/wiki_dir/Development
Normal file
64
trac_wiki_export/wiki_dir/Development
Normal file
@ -0,0 +1,64 @@
|
||||
[[PageOutline(2-4,,inline)]]
|
||||
|
||||
= Development =
|
||||
|
||||
[wiki:ProjectGoals Deluge Project Goals]
|
||||
|
||||
== Source Code ==
|
||||
|
||||
The latest and greatest versions of Deluge are here:
|
||||
|
||||
* '''[https://ftp.osuosl.org/pub/deluge/source/?C=M;O=D Source Tarballs]'''
|
||||
* '''[https://git.deluge-torrent.org/deluge Git Repository]'''
|
||||
|
||||
Guides:
|
||||
|
||||
* [wiki:Installing/Source Installing from Source]
|
||||
* [GitRepo Using git repository]
|
||||
|
||||
== Bug Tracking ==
|
||||
|
||||
* [/report/2 View bug tickets]
|
||||
* [/newticket Create bug ticket]
|
||||
|
||||
== Development Documentation ==
|
||||
|
||||
* [https://deluge.readthedocs.io/en/latest/reference/index.html Reference Documentation]
|
||||
|
||||
=== Coding ===
|
||||
|
||||
* [wiki:'Development/1.3/UIClient' HowTo - Writing a Client]
|
||||
|
||||
=== Testing ===
|
||||
|
||||
* [https://deluge.readthedocs.io/en/latest/contributing/testing.html Running tests]
|
||||
|
||||
=== Plugins ===
|
||||
|
||||
* [wiki:'Development/1.3/Plugin' HowTo - Writing a Plugin]
|
||||
* [wiki:'Development/PluginIdeas' Plugin Ideas]
|
||||
* [wiki:'Plugins' Current Plugins]
|
||||
|
||||
=== Performance ===
|
||||
|
||||
* [wiki:'Development/Profiling' Profiling Deluge]
|
||||
* [wiki:'Development/Vast_amount_of_torrents' Making deluge handle thousands of torrents]
|
||||
|
||||
== Packaging ==
|
||||
|
||||
* [wiki:'Development/Packaging' Packaging]
|
||||
|
||||
== Contributing ==
|
||||
|
||||
* [https://deluge.readthedocs.io/en/latest/contributing/translations.html Translation]
|
||||
* [https://deluge.readthedocs.io/en/latest/contributing/code.html Provide Patches or Pull Requests]
|
||||
|
||||
== Community ==
|
||||
|
||||
* [https://forum.deluge-torrent.org/viewforum.php?f=8 Development Forum] - Forum for ideas and discussion
|
||||
* [irc://irc.libera.chat/deluge IRC] - IRC chat in '''#deluge''' on '''irc.libera.chat'''
|
||||
|
||||
=== Deluge Development Team ===
|
||||
* Calum Lind (cas) - [[Image(https://s3.amazonaws.com/patreon_public_assets/favicon.ico)]] [https://www.patreon.com/deluge_cas Support Cas on Patreon]
|
||||
* Andrew Resch (andar)
|
||||
|
270
trac_wiki_export/wiki_dir/Development%2F1.2%2FPlugin
Normal file
270
trac_wiki_export/wiki_dir/Development%2F1.2%2FPlugin
Normal file
@ -0,0 +1,270 @@
|
||||
|
||||
== Introduction ==
|
||||
|
||||
When considering to write a plugin for Deluge, one must first understand the basic design of Deluge. Deluge is split in two, the core and the user-interface of which there could be many. When writing your plugin you will be writing a Core portion and, perhaps, many different UI portions. This may sound complicated and at times it can be, but once you get the hang of it, it becomes second-hand.
|
||||
|
||||
=== Skill Checklist ===
|
||||
|
||||
This is a list of recommended skills or knowledge that you may need to successfully write a plugin. This is by no means required, but can serve as a starting point if you're not sure what you need to know. It may also be a good idea to read [http://dev.deluge-torrent.org/wiki/Development/UiClient1.2 How To Write a Client] first, to give you some idea of how a UI would interact with the Core.
|
||||
|
||||
* Python
|
||||
* Twisted, specifically Deferreds
|
||||
* GTK and possibly Glade
|
||||
* Javascript for the WebUI portions
|
||||
|
||||
=== Designing Your Plugin ===
|
||||
|
||||
Deluge has the ability to function in a headless environment with only the daemon (Core) portion running. Various user-interfaces will connect from time to time and view or modify the session, but may not be connected all the time, so the "smarts" of your plugin should reside in the core. You should also be aware that multiple UIs may be connected at the same time and they will need to behave correctly in terms of your plugin. Typically, the best place to start writing your plugin is in the Core portion since it will contain most of the plugin logic, with the UI portions typically responsible for displaying and modifying plugin configuration or providing the user with status updates.
|
||||
|
||||
Conceptually you'll want to view your plugin as a collection of separate programs with your UI programs interfacing with your Core program through an RPC interface. They do not share the same space in memory and may in fact be run on different computers, so information from the Core will need to be accessible to the clients through it's RPC exported functions -- and you can't send any object over this interface, only the basic types.
|
||||
|
||||
== Getting Started ==
|
||||
|
||||
The easiest way to get started is to use the [http://git.deluge-torrent.org/deluge/plain/deluge/scripts/create_plugin.py?h=1.3-stable create_plugin.py] script in the appropriate branch in our GitRepo. Alternatively, you can use other plugins as a template if you prefer.
|
||||
|
||||
Running the script:
|
||||
{{{
|
||||
$ python create_plugin.py --name MyPlugin --basepath . --author-name "Your Name" --author-email "yourname@example.com"
|
||||
}}}
|
||||
|
||||
This should create a directory called `myplugin` under which should be a collection of directories and files which will form the base of your plugin.
|
||||
|
||||
The file structure should look like this (perhaps a bit more since it does a build right away):
|
||||
{{{
|
||||
myplugin/
|
||||
|-- create_dev_link.sh
|
||||
|-- myplugin
|
||||
| |-- __init__.py
|
||||
| |-- common.py
|
||||
| |-- core.py
|
||||
| |-- data
|
||||
| | `-- config.glade
|
||||
| |-- gtkui.py
|
||||
| |-- template
|
||||
| | `-- default.html
|
||||
| `-- webui.py
|
||||
`-- setup.py
|
||||
}}}
|
||||
|
||||
=== Modifying Metadata ===
|
||||
|
||||
You may want to change or add some stuff to your plugin's metadata, such as the description or perhaps a URL for your project. To do this, navigate to your `myplugin` directory and open up the `setup.py` file. You will see a few different properties and modifying them should be self-explanatory, but you should refrain from changing the plugin name.
|
||||
|
||||
=== Building The Plugin ===
|
||||
|
||||
Whenever you want to test out your plugin in Deluge, you will need to build it into an egg.
|
||||
|
||||
First off, navigate to your `myplugin` base directory, you should see a `setup.py` file in there. Next, run the following command:
|
||||
{{{
|
||||
$ python setup.py bdist_egg
|
||||
}}}
|
||||
|
||||
It's as simple as that. You can also use this method to create an egg for distribution to other Deluge users. The egg will be located in the `dist` directory.
|
||||
|
||||
== Core Plugin ==
|
||||
|
||||
=== Introduction ===
|
||||
|
||||
We'll start off by writing the Core portion of our plugin. In this example, we'll do some pretty trivial things to demonstrate some of the ideas and components associated with the plugin development process. We'll look at configuration, exporting rpc functions, interacting with Core components and timers.
|
||||
|
||||
=== Hello Wo...UI! ===
|
||||
|
||||
Let's start with a look at what our `create_plugin.py` script created for us in the `core.py` file.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
from deluge.log import LOG as log
|
||||
from deluge.plugins.pluginbase import CorePluginBase
|
||||
import deluge.component as component
|
||||
import deluge.configmanager
|
||||
from deluge.core.rpcserver import export
|
||||
|
||||
DEFAULT_PREFS = {
|
||||
"test":"NiNiNi"
|
||||
}
|
||||
|
||||
class Core(CorePluginBase):
|
||||
def enable(self):
|
||||
self.config = deluge.configmanager.ConfigManager("myplugin.conf", DEFAULT_PREFS)
|
||||
|
||||
def disable(self):
|
||||
pass
|
||||
|
||||
def update(self):
|
||||
pass
|
||||
|
||||
@export
|
||||
def set_config(self, config):
|
||||
"sets the config dictionary"
|
||||
for key in config.keys():
|
||||
self.config[key] = config[key]
|
||||
self.config.save()
|
||||
|
||||
@export
|
||||
def get_config(self):
|
||||
"returns the config dictionary"
|
||||
return self.config.config
|
||||
}}}
|
||||
|
||||
==== Imports ====
|
||||
|
||||
There are a number of imports at the top of this file and you may not end up using all of them. I will describe what they are for.
|
||||
|
||||
* log - This is the Deluge logging object. It can be handy for logging debug information or anything else you want printed to the log. It has a few methods: log.debug("Message"), log.error("Message"), log.info("Message"), etc.. You can see the rest defined in the python logging module documentation.
|
||||
* !CorePluginBase - This is the base class we use for our Core plugin.
|
||||
* component - This provides access to the component registry where you can reference any of the Deluge components for use in your plugin.
|
||||
* configmanager - This allows access to the Deluge !ConfigManager which is how you will access config files.
|
||||
* export - This is a decorator function we use to ''export'' RPC methods.
|
||||
|
||||
==== Special Methods ====
|
||||
|
||||
You may notice that we have a few methods at the top of this class: `enable()`, `disable()`, `update()`. These methods are overloaded from the base class and are called at different times.
|
||||
* enable() - This method is called when the plugin is enabled, either by the user or when the program starts.
|
||||
* disable() - This method is called when the plugin is disabled, either by the user or by exiting the program.
|
||||
* update() - This method is called every second while the plugin is enabled.
|
||||
|
||||
You don't need to necessarily ''do'' anything in these methods, but you should at least define them and put a `pass` statement in.
|
||||
|
||||
|
||||
==== Configuration ====
|
||||
|
||||
We'll get started by examining what is already going on in this plugin template and that is a basic setup to handle configuration setting and getting.
|
||||
|
||||
The first thing that is done, is creating the Config object when the plugin is enabled.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
self.config = deluge.configmanager.ConfigManager("myplugin.conf", DEFAULT_PREFS)
|
||||
}}}
|
||||
|
||||
We see here that we're using Deluge's !ConfigManager to handle loading our config with some default preferences. All you really need to know is that this `config` object will act much like a dictionary object, but has some special methods like `save()` for writing the config to disk. You don't need to necessarily call `save()` yourself, as the config object will handle this on it's own when the config values change.
|
||||
|
||||
You can read here: http://deluge-torrent.org/docs/current/modules/config.html for more information on the Config class.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
@export
|
||||
def set_config(self, config):
|
||||
"sets the config dictionary"
|
||||
for key in config.keys():
|
||||
self.config[key] = config[key]
|
||||
self.config.save()
|
||||
|
||||
@export
|
||||
def get_config(self):
|
||||
"returns the config dictionary"
|
||||
return self.config.config
|
||||
}}}
|
||||
|
||||
Whoa, what's this? It's our first two RPC exported methods of course! You may be asking yourself, "What does that mean?", it means that the UI portions of our plugins will be able to call these methods over RPC. This is the primary method for your plugin portions to communicate.
|
||||
|
||||
You'll notice that we use a decorator function (@export) to mark methods as being exportable, this makes it very easy to export functions.
|
||||
|
||||
To get back to what we're looking at, you'll see that `set_config()` takes an argument `config` and in this case it is a dictionary object. The UI portion will be ''sending'' this dictionary to the Core portion to update it's Config object. This is important because many config options you'll want to have available for the Core to use -- you don't want to be saving config options on the UI side that the Core portion needs because they may not be on the same computer and cannot access the same config file.
|
||||
|
||||
The `get_config()` method will simply return a dict object representing all the key/value pairs in our Config object back to the requestor.
|
||||
|
||||
A example of how calling these methods would look like from the UI perspective:
|
||||
{{{
|
||||
#!python
|
||||
|
||||
def on_get_config(result):
|
||||
result["test"] = "i want to change this value"
|
||||
client.myplugin.set_config(result)
|
||||
|
||||
client.myplugin.get_config().addCallback(on_get_config)
|
||||
}}}
|
||||
|
||||
Don't worry if you don't quite understand this example, we'll get to that when we start working on our UI portions of the plugin.
|
||||
|
||||
==== Functionality ====
|
||||
|
||||
Now that we have configuration covered, it's time to start expanding our plugin so that it does something useful. In this tutorial, we will have our plugin keep track of our overall downloaded and uploaded byte totals and make this information available to the UI portions of the plugin. We will also be using the configuration system we just examined to save the totals during restarts and shutdowns of the daemon so that our values will remain persistent between sessions.
|
||||
|
||||
First off, since we're going to be storing values we want to be persistent, let's add these to our config dictionary.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
DEFAULT_PREFS = {
|
||||
"total_download": 0,
|
||||
"total_upload": 0
|
||||
}
|
||||
}}}
|
||||
|
||||
Great! Now we have a place to store our data that will be persistent between sessions.
|
||||
|
||||
Let's modify our `enable()` method to initialize some object members to the values contained in the config file.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
def enable(self):
|
||||
self.config = deluge.configmanager.ConfigManager("myplugin.conf", DEFAULT_PREFS)
|
||||
self.total_download = self.config["total_download"]
|
||||
self.total_upload = self.config["total_upload"]
|
||||
}}}
|
||||
|
||||
Now, every time the plugin is enabled, it will initialize these member variables to what was saved in the config file. This means that we need to make sure we're saving this data when then plugin is disabled or shutdown!
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
def disable(self):
|
||||
self.config["total_upload"] = self.total_upload
|
||||
self.config["total_download"] = self.total_download
|
||||
}}}
|
||||
|
||||
Ok, now our stats should be persistent and we can now move on to updating our `total_upload` and `total_download` member variables based on the session status from the Core.
|
||||
|
||||
We'll want to poll the core every few seconds to get the latest byte count. What we'll do is setup a timer function to get the latest data and update our member variables.
|
||||
|
||||
Let's start by creating the method that will be called by the timer.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
def update_stats(self):
|
||||
status = component.get("Core").get_session_status(["total_download", "total_upload"])
|
||||
self.total_upload = self.config["total_upload"] + status["total_upload"]
|
||||
self.total_download = self.config["total_download"] + status["total_download"]
|
||||
}}}
|
||||
|
||||
The first thing you'll notice about this method is that it's using the `component` module to access the Core object. You can view the documentation for the Core object here: http://deluge-torrent.org/docs/current/modules/core/core.html
|
||||
|
||||
You'll see that we're updating our member variables `total_upload` and `total_download` with the values in our config dictionary plus the session byte count. This will give us a total download/upload count over all our sessions.
|
||||
|
||||
At this point the function isn't doing anything because it isn't called anywhere! So it's time to add our `LoopingCall` to take care of this for us.
|
||||
|
||||
We need to import the `LoopingCall` class first. Since we use Twisted for our mainloop, we import this class from there. You will want to put this import with the rest at the top of the file.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
from twisted.internet.task import LoopingCall
|
||||
}}}
|
||||
|
||||
Now, we want to setup and start the `LoopingCall` when the plugin is enabled, so lets modify `enable()` again.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
def enable(self):
|
||||
self.config = deluge.configmanager.ConfigManager("myplugin.conf", DEFAULT_PREFS)
|
||||
self.total_download = self.config["total_download"]
|
||||
self.total_upload = self.config["total_upload"]
|
||||
|
||||
self.update_status_timer = LoopingCall(self.update_stats)
|
||||
self.update_status_timer.start(2)
|
||||
|
||||
def disable(self):
|
||||
self.update_status_timer.stop()
|
||||
|
||||
self.config["total_upload"] = self.total_upload
|
||||
self.config["total_download"] = self.total_download
|
||||
}}}
|
||||
|
||||
The syntax for the `LoopingCall` is simple, it just takes function you wish to call in the timer. Next, we simply `start()` the timer with a value in seconds that determines it's frequency, in this case the function will be called every 2 seconds. In our `disable()` method we `stop()` the timer.
|
||||
|
1
trac_wiki_export/wiki_dir/Development%2F1.3%2FPlugin
Normal file
1
trac_wiki_export/wiki_dir/Development%2F1.3%2FPlugin
Normal file
@ -0,0 +1 @@
|
||||
[[Include(Development/1.2/Plugin)]]
|
1
trac_wiki_export/wiki_dir/Development%2F1.3%2FUIClient
Normal file
1
trac_wiki_export/wiki_dir/Development%2F1.3%2FUIClient
Normal file
@ -0,0 +1 @@
|
||||
[[Include(Development/UiClient1.2)]]
|
1
trac_wiki_export/wiki_dir/Development%2FDelugeRPC
Normal file
1
trac_wiki_export/wiki_dir/Development%2FDelugeRPC
Normal file
@ -0,0 +1 @@
|
||||
Moved to: https://deluge.readthedocs.io/en/develop/reference/rpc.html
|
35
trac_wiki_export/wiki_dir/Development%2FDocumentation
Normal file
35
trac_wiki_export/wiki_dir/Development%2FDocumentation
Normal file
@ -0,0 +1,35 @@
|
||||
= Documentation =
|
||||
|
||||
== Sphinx ==
|
||||
We use Sphinx to create the documentation from docstrings in code.
|
||||
|
||||
{{{
|
||||
pip install sphinx
|
||||
pip install sphinxcontrib-napoleon
|
||||
}}}
|
||||
|
||||
The Sphinx config is located in `docs/conf.py`
|
||||
|
||||
If new source files are added, auto-create the new `rst` files:
|
||||
{{{
|
||||
sphinx-apidoc -o docs/source/modules -T deluge deluge/tests
|
||||
}}}
|
||||
|
||||
The manually updated `rst` files are:
|
||||
- `index.rst` - The index page for Deluge documentation
|
||||
- `docs/source/interfaces/` - User info on the different clients
|
||||
- `docs/source/core/` - Documentation of the DelugeRPC
|
||||
|
||||
To build the docs:
|
||||
{{{
|
||||
python setup.py build_docs
|
||||
}}}
|
||||
|
||||
=== Notes ===
|
||||
There are two uses of `Mock` classes for catching/ignoring import errors:
|
||||
- In `conf.py` it is only applied to modules listed in `MOCK_MODULES`.
|
||||
- In `setup.py` it is used for any other `ImportError` or `Exception`.
|
||||
|
||||
== man pages ==
|
||||
|
||||
Located in `docs/man`
|
25
trac_wiki_export/wiki_dir/Development%2FGroupsTags
Normal file
25
trac_wiki_export/wiki_dir/Development%2FGroupsTags
Normal file
@ -0,0 +1,25 @@
|
||||
A node to discuss changing the Labels plugin by moving to a concept of torrent groups and tags.
|
||||
|
||||
== Groups ==
|
||||
|
||||
* a new level of control for torrents
|
||||
* sits between global and per-torrent settings
|
||||
* defines bandwidth settings
|
||||
* should it also define move completed locations?
|
||||
* can a torrent belong to multiple groups?
|
||||
|
||||
== Tags ==
|
||||
|
||||
* tags torrents based on pattern matching
|
||||
* can match against tracker or filenames
|
||||
* a single torrent can have multiple tags
|
||||
* this is going to require a bit of thinking
|
||||
* by itself tags just allow easier filtering
|
||||
|
||||
== Organiser Plugin ==
|
||||
|
||||
* tag-based organiser
|
||||
* rules are based on tags
|
||||
* allows for moving torrents on completion, possibly renaming / restructuring
|
||||
* should it handle linking tags <-> groups or should this be done in the core?
|
||||
* organiser could simply link a tag to a group to achieve custom move completed paths
|
5
trac_wiki_export/wiki_dir/Development%2FHooks
Normal file
5
trac_wiki_export/wiki_dir/Development%2FHooks
Normal file
@ -0,0 +1,5 @@
|
||||
Instead of using the current plugin system it has been proposed that we use hooks instead. Hooks can be executed in a few ways:
|
||||
|
||||
* in-process hooks written in python
|
||||
* executables stored on the filesystem, run once per hook fire
|
||||
* long-running processes than communicate with the daemon
|
5
trac_wiki_export/wiki_dir/Development%2FPackaging
Normal file
5
trac_wiki_export/wiki_dir/Development%2FPackaging
Normal file
@ -0,0 +1,5 @@
|
||||
= Packaging Deluge =
|
||||
|
||||
Instructions for creating Deluge packages/installers for various operating systems.
|
||||
|
||||
[[TitleIndex(Development/Packaging)]]
|
85
trac_wiki_export/wiki_dir/Development%2FPackaging%2FOSX
Normal file
85
trac_wiki_export/wiki_dir/Development%2FPackaging%2FOSX
Normal file
@ -0,0 +1,85 @@
|
||||
= Deluge.app for OSX =
|
||||
|
||||
== Manual Steps (Tested on Yosemite VM) ==
|
||||
|
||||
1. Install XCode
|
||||
1. Jhbuild install and update Python:
|
||||
{{{
|
||||
wget https://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh
|
||||
sh gtk-osx-build-setup.sh
|
||||
export PATH=~/.local/bin:~/gtk/inst/bin:$PATH
|
||||
jhbuild build bootstrap
|
||||
jhbuild build python
|
||||
}}}
|
||||
* Uncomment `_gtk_osx_use_jhbuild_python = True` in `.jhbuildrc-custom`.
|
||||
1. [https://wiki.gnome.org/Projects/GTK+/OSX/Building GTK OSX Build]:
|
||||
{{{
|
||||
jhbuild build meta-gtk-osx-bootstrap
|
||||
}}}
|
||||
1. [https://wiki.gnome.org/Projects/GTK+/OSX/Python PyGTK] (Includes `meta-gtk-osx-core`)
|
||||
{{{
|
||||
jhbuild build libglade
|
||||
jhbuild build meta-gtk-osx-python
|
||||
}}}
|
||||
* A [https://git.gnome.org/browse/pygobject/commit/?h=pygobject-2-28&id=42d01f060c5d764baa881d13c103d68897163a49 pygobject patch] to apply to fix annoying console warnings.
|
||||
1. GTK OSX Themes:
|
||||
{{{
|
||||
jhbuild build meta-gtk-osx-themes
|
||||
jhbuild build gtk-quartz-engine
|
||||
}}}
|
||||
* ''Note:'' [https://www.xpra.org/trac/attachment/ticket/533/quartz-style-fix.patch Quartz patch] if build error: `'height' is uninitialized`.
|
||||
1. [https://wiki.gnome.org/Projects/GTK%2B/OSX/Bundling Bundler] for Packaging Deluge.
|
||||
{{{
|
||||
wget http://ftp.gnome.org/pub/gnome/sources/gtk-mac-bundler/0.7/gtk-mac-bundler-0.7.4.tar.xz
|
||||
tar xf gtk-mac-bundler-0.7.4.tar.xz
|
||||
cd gtk-mac-bundler-0.7.4
|
||||
make install
|
||||
}}}
|
||||
1. Build libtorrent and deps using [https://gist.github.com/cas--/d1df3758d6e794c0ca4e libtorrent.modules]:
|
||||
{{{
|
||||
wget http://git.deluge-torrent.org/deluge/plain/osx/libtorrent.modules?h=1.3-stable
|
||||
jhbuild -m libtorrent.modules build meta_libtorrent
|
||||
}}}
|
||||
- OpenSSL requires "Skip Module (2)" when install stage fails as unable to use DESTDIR path. See [https://github.com/elelay/gpodder-osx-bundle/blob/master/modulesets/patches/openssl-respect-destdir.patch patch].
|
||||
- ''Note on potential OpenSSL Error:'' 'libcrypto is a fat file' is due to mixing arch types (i386, x64) in build process.
|
||||
1. Install Deluge dependencies using [https://pip.pypa.io/en/latest/installing/ pip]:
|
||||
{{{
|
||||
jhbuild shell
|
||||
wget https://bootstrap.pypa.io/get-pip.py
|
||||
python get-pip.py
|
||||
pip install twisted[tls] chardet mako pyxdg setproctitle pillow py2app cython
|
||||
pip install rencode
|
||||
pip install setuptools==19.2
|
||||
}}}
|
||||
- ''Note1:'' pygame for Notifications plugin need installed separately.
|
||||
- ''Note2:'' rencode requires cython before attempting pip install. [https://github.com/aresch/rencode/issues/11 (rencode issue)]
|
||||
- ''Note3:'' Due to bug in setuptools require version 19.2 [https://github.com/pypa/setuptools/issues/517 (setuptools issue)]
|
||||
1. Install and package Deluge:
|
||||
a. If using release tarball download required `setup.cfg` and `osx` directory from git, run commands in deluge source directory:
|
||||
{{{
|
||||
wget --content-disposition http://git.deluge-torrent.org/deluge/plain/setup.cfg?h=1.3-stable
|
||||
wget -rnd -np -e robots=off --reject "index.html*" --content-disposition http://git.deluge-torrent.org/deluge/plain/osx/?h=1.3-stable -P osx
|
||||
}}}
|
||||
- ''Note:'' In setup.cfg need to remove 'dev' line and set arch to 'x86_64'.
|
||||
a. Build and install Deluge using py2app:
|
||||
{{{
|
||||
jhbuild shell
|
||||
python setup.py py2app
|
||||
python setup.py install
|
||||
}}}
|
||||
* For error `dyld_find() got an unexpected keyword argument 'loader'` either uninstall `pillow` or [https://bitbucket.org/ronaldoussoren/macholib/pull-requests/10/ patch MachOGraph.py]
|
||||
a. Package Deluge into app in `osx/app/` using gtk-mac-bundler script:
|
||||
{{{
|
||||
jhbuild shell
|
||||
cd osx
|
||||
./make-app
|
||||
}}}
|
||||
* Fix for pango_module_version error [https://github.com/jralls/gtk-mac-bundler/commit/5a348d5a9405c958ee0e85fb0af58a8dc0dd999c on github]
|
||||
1. Optionally create dmg image:
|
||||
{{{
|
||||
hdiutil create -format UDBZ -srcfolder Deluge.app -volname deluge-1.3.13-osx-x64-0 deluge-1.3.13-osx-x64-0.dmg
|
||||
}}}
|
||||
|
||||
== Old Semi-Automated Guide ==
|
||||
[[Include(http://git.deluge-torrent.org/deluge/plain/osx/README.rst?h=1.3-stable, text/x-rst)]]
|
||||
|
@ -0,0 +1,2 @@
|
||||
[[Include(http://git.deluge-torrent.org/deluge/plain/win32/Win32%20README.txt?h=1.3-stable, text/x-trac-wiki)]]
|
||||
|
52
trac_wiki_export/wiki_dir/Development%2FPluginIdeas
Normal file
52
trac_wiki_export/wiki_dir/Development%2FPluginIdeas
Normal file
@ -0,0 +1,52 @@
|
||||
|
||||
= Plugin Ideas =
|
||||
|
||||
== Plugin Requests on Trac ==
|
||||
|
||||
Below is a list of [query:status=accepted|new|assigned|reopened&type=plugin-request Plugin Request] tickets
|
||||
[[TicketQuery(max=10,status=accepted|new|assigned|reopened,type=plugin-request,order=time,desc=1,format=table,col=summary)]]
|
||||
|
||||
|
||||
== Notification Plugin ==
|
||||
|
||||
''Currently working on this:'' Solexious
|
||||
|
||||
The Notification component currently in Deluge should be moved into a plugin.
|
||||
|
||||
== Importer Plugin ==
|
||||
|
||||
''Currently working on this:'' Nobody
|
||||
|
||||
This plugin would be used for importing states from other torrent clients to ease migration. It would be best to start with the more popular clients, such as uTorrent, Vuze and Transmission. uTorrent's state file is just a bencoded dict, which should be pretty easy to read and convert to Deluge. There will be some care needed to ensure the paths match up, especially if converting from another OS.
|
||||
|
||||
== Download in Order ==
|
||||
|
||||
''Currently working on this:'' Nobody
|
||||
|
||||
This plugin would download individual files within a torrent in a specified order, likely alphabetical. It would essentially set the first one with normal priority and the rest with 'do not download' and so forth as the files download.
|
||||
|
||||
== Auto Move Storage ==
|
||||
|
||||
''Currently working on this:'' Nobody
|
||||
|
||||
''Currently implemented in:'' Label plugin, but through an additional level of abstraction ("Labels"). Auto-move by label, and assign trackers to label.
|
||||
|
||||
This plugin would automatically change the target path of newly added torrents based on its tracker, with a configuration UI where you can specify simple tracker -> directory mappings.
|
||||
|
||||
== Pruning ==
|
||||
|
||||
''Currently working on this:'' TheGenious
|
||||
|
||||
This plugin routinely removes torrents that have reached a certain age and when a hard drive threshold has been reached (so only remove torrents when the hard drive capacity is less than 10%).
|
||||
|
||||
== Users ==
|
||||
|
||||
''Currently working on this:'' TheGenious
|
||||
|
||||
This plugin will automatically "label" torrents with the environmental variable REMOTE_USER value that is passed in by a reverse proxy or gateway for HTTP Authentication. The purpose of this is to allow multiple users to see what torrents are their own.
|
||||
|
||||
== Auto-replace bad peers ==
|
||||
|
||||
''Currently working on this:'' Nobody
|
||||
|
||||
During downloading, automatically replace peers with an average download rate under a custom limit (default for instance 5kb/s) the last 20 seconds if there are other peers available.
|
61
trac_wiki_export/wiki_dir/Development%2FPlugins
Normal file
61
trac_wiki_export/wiki_dir/Development%2FPlugins
Normal file
@ -0,0 +1,61 @@
|
||||
['Development']
|
||||
|
||||
= Development/Plugins =
|
||||
|
||||
[[PageOutline(1-2,index,inline)]]
|
||||
|
||||
|
||||
|
||||
== Intro ==
|
||||
Plugins consist of a core part and ui parts for the various user-interfaces.
|
||||
|
||||
They are distributed using python eggs http://peak.telecommunity.com/DevCenter/PythonEggs
|
||||
|
||||
== Creating a new plugin ==
|
||||
A script is available to create a new plugin here (may not work with older versions of deluge): http://dev.deluge-torrent.org/browser/trunk/deluge/scripts/create_plugin.py?format=raw
|
||||
|
||||
'''Note''': You may need to install the ''python-setuptools'' package if you don't have it.
|
||||
|
||||
Go to an empty directory, and run:
|
||||
{{{
|
||||
python create_plugin.py --name MyPlugin2 --basepath . --author-name "Your Name" --author-email "yourname@example.com"
|
||||
}}}
|
||||
|
||||
This will create a new directory <plugin-name> , contaning a basic plugin template.
|
||||
And it will link it from ~/.config/deluge/plugins
|
||||
|
||||
Restart deluge and deluged.
|
||||
|
||||
== Distributing a plugin ==
|
||||
Go to the plugin-name directory, and type
|
||||
|
||||
{{{python setup.py bdist_egg}}}
|
||||
|
||||
This will build an egg.
|
||||
|
||||
Rename the egg to <plugin-name>.egg and share it,
|
||||
|
||||
= Various random facts =
|
||||
* any "export_*" method in the core plugin is exposed as "plugin-name_*" in deluge.ui.client
|
||||
* the deluge.ui.client api is available to core plugins as "from deluge.plugins.coreclient import client"
|
||||
|
||||
== Adding a status-field to core ==
|
||||
* define a callback-function http://dev.deluge-torrent.org/browser/trunk/deluge/plugins/label/label/core.py?rev=3607#L356
|
||||
* register that callback http://dev.deluge-torrent.org/browser/trunk/deluge/plugins/label/label/core.py?rev=3607#L74
|
||||
* now the field is available in ui.client..get_torrent_status
|
||||
|
||||
== Adding a column to gtk-ui ==
|
||||
* callback for cell : http://dev.deluge-torrent.org/browser/trunk/deluge/plugins/label/label/gtkui/__init__.py#L51
|
||||
* register that callback : http://dev.deluge-torrent.org/browser/trunk/deluge/plugins/label/label/gtkui/__init__.py#L115
|
||||
|
||||
== alerts ==
|
||||
* registering for a "torrent_finished" alert : http://forum.deluge-torrent.org/viewtopic.php?f=9&t=8155#p37775
|
||||
* ['Development/Plugins/Alerts']
|
||||
|
||||
== signals ==
|
||||
* ['Development/Plugins/Signals']
|
||||
|
||||
= Examples =
|
||||
* ['Development/Plugins/WebUi/Examples']
|
||||
|
||||
|
19
trac_wiki_export/wiki_dir/Development%2FPlugins%2FAlerts
Normal file
19
trac_wiki_export/wiki_dir/Development%2FPlugins%2FAlerts
Normal file
@ -0,0 +1,19 @@
|
||||
['Development/Plugins']
|
||||
|
||||
== how to register for an alert ==
|
||||
todo
|
||||
|
||||
== List of alerts ==
|
||||
|
||||
* torrent_finished_alert
|
||||
* torrent_paused_alert
|
||||
* torrent_checked_alert
|
||||
* tracker_reply_alert
|
||||
* tracker_announce_alert
|
||||
* tracker_alert
|
||||
* tracker_warning_alert
|
||||
* storage_moved_alert
|
||||
* torrent_resumed_alert
|
||||
* state_changed_alert
|
||||
* more: http://www.rasterbar.com/products/libtorrent/manual.html#alerts
|
||||
|
15
trac_wiki_export/wiki_dir/Development%2FPlugins%2FSignals
Normal file
15
trac_wiki_export/wiki_dir/Development%2FPlugins%2FSignals
Normal file
@ -0,0 +1,15 @@
|
||||
['Development/Plugins']
|
||||
|
||||
== Signals ==
|
||||
* "torrent_added" (torrent_id)
|
||||
* "torrent_removed" (torrent_id)
|
||||
* "torrent_paused" (torrent_id)
|
||||
* "torrent_resume_at_stop_ratio" ()
|
||||
* "torrent_resumed" (torrent_id)
|
||||
* "torrent_all_paused" ()
|
||||
* "torrent_all_resumed" ()
|
||||
* "config_value_changed" (key, value)
|
||||
* "torrent_queue_changed" ()
|
||||
* "new_version_available" (new_release)
|
||||
* "torrent_finished" (torrent_id)
|
||||
* "torrent_state_changed" (torrent_id)
|
@ -0,0 +1,152 @@
|
||||
['Development']
|
||||
|
||||
['Development/Plugins']
|
||||
|
||||
|
||||
= Webui Examples =
|
||||
|
||||
'''Tested and developed on deluge-svn/Deluge 1.1'''
|
||||
''updated with newer api for r.3857''
|
||||
|
||||
[[PageOutline(1-3,index,inline)]]
|
||||
|
||||
|
||||
== Adding a page to the webui ==
|
||||
|
||||
=== Intro ===
|
||||
Webui templates are dumb, they get passed data from python, and can't call uiclient api's directly.
|
||||
|
||||
They are there to format the data, not to execute logic.
|
||||
|
||||
Template language: http://webpy.org/templetor
|
||||
|
||||
== Flow of the data ==
|
||||
''Disclaimer, MVC is a highly abused therm, and i'm abusing it here.''
|
||||
{{{
|
||||
[core-plugin],deluged->uiclient->webui,[webui-plugin] -> data passed as arguments to template.
|
||||
('Model' ) ('controller' ) ('view')
|
||||
}}}
|
||||
|
||||
== Example : a df page in webui ==
|
||||
This example assumes you have deluge svn checked out to "~/src/deluge"
|
||||
And that your plugin-development-directory is "~/prj/deluge/plugins"
|
||||
|
||||
This plugin will add a page to deluge that display the output of "df -h" to a page in the webui.
|
||||
|
||||
|
||||
=== Create a new plugin ===
|
||||
{{{
|
||||
cd ~/prj/deluge/plugins
|
||||
python ~/src/deluge/deluge/scripts/create_plugin.py --name Df --basepath . --author-name "My Name" --author-email "deluge@example.com"
|
||||
}}}
|
||||
|
||||
* Restart deluge(d) and enable the plugin in the gtk-ui.
|
||||
|
||||
=== Add a core method. ===
|
||||
Add this method to ~/prj/deluge/plugins/Df/df/core.py
|
||||
{{{
|
||||
#!python
|
||||
def export_get_df(self):
|
||||
"returns the result of 'df -h' as a string"
|
||||
import commands
|
||||
return commands.getoutput('df -h')
|
||||
}}}
|
||||
|
||||
=== Test the new core-plugin method. ===
|
||||
create ~/prj/deluge/plugins/df/Df/test.py ; Contents:
|
||||
{{{
|
||||
#!python
|
||||
from deluge.ui.client import sclient
|
||||
sclient.set_core_uri()
|
||||
|
||||
print sclient.df_get_df() #export method is prefixed by plugin-name.
|
||||
}}}
|
||||
|
||||
Terminal:
|
||||
{{{
|
||||
cd ~/prj/deluge/plugins/Df/df
|
||||
killall deluged & deluged && python test.py
|
||||
}}}
|
||||
Fix any errors until the test outputs the desired result.
|
||||
|
||||
=== Add the template ===
|
||||
~/prj/deluge/plugins/Df/df/templates/df.html
|
||||
{{{
|
||||
$def with (df_result)
|
||||
<h1>df -h</h1>
|
||||
<pre>
|
||||
$df_result
|
||||
</pre>
|
||||
}}}
|
||||
=== Webui plugin ===
|
||||
Edit ~/prj/deluge/plugins/Df/df/webui.py and replace the df_page and WebUI classes
|
||||
|
||||
Some Magic : api.render.<plugin-name>.<template-name>() is automagiclly mapped to templates/<template-name>.html (see http://webpy.org/ for templetor, the template language)
|
||||
|
||||
{{{
|
||||
#!python
|
||||
class df_page():
|
||||
#@api.deco.deluge_page #requires login, see page_decorators.py for more decorators,
|
||||
@api.deco.deluge_page_noauth #<-- this is easier for testing until i implement persistent sessions.
|
||||
def GET(self, args):
|
||||
df_result = sclient.df_get_df()
|
||||
return api.render.df.df(df_result) #push data to templates/df.html
|
||||
|
||||
class WebUI(WebUIPluginBase):
|
||||
#map url's to classes: [(url,class), ..]
|
||||
urls = [('/df', df_page)] #<--modified url mapping.
|
||||
|
||||
def enable(self):
|
||||
api.config_page_manager.register('plugins', 'df' ,ConfigForm)
|
||||
|
||||
def disable(self):
|
||||
api.config_page_manager.deregister('df')
|
||||
|
||||
}}}
|
||||
|
||||
|
||||
* Remove template/default.html , it's not used in api.render.df anymore.
|
||||
|
||||
=== Test webui page ===
|
||||
{{{
|
||||
killall deluge & deluge -u web &
|
||||
}}}
|
||||
Read the output to the console, there could be some errors there.
|
||||
|
||||
visit http://localhost:8112/df
|
||||
|
||||
Execute test until there are no more errors, and the page displays the desired result.
|
||||
|
||||
=== Add to top menu ===
|
||||
We added a page, but the user can't navigate to it, let's fix that :
|
||||
|
||||
Add 2 lines for register/deregister of the menu-items.
|
||||
{{{
|
||||
#!python
|
||||
def enable(self):
|
||||
api.config_page_manager.register('plugins', 'df' ,ConfigForm)
|
||||
api.menu_manager.register_admin_page("df", _("Disk usage"), "/df") #<--top menu
|
||||
|
||||
def disable(self):
|
||||
api.config_page_manager.deregister('df')
|
||||
api.menu_manager.deregister_admin_page("df") #<--top menu
|
||||
}}}
|
||||
|
||||
=== Pretty template ===
|
||||
We're allmost ready, but the current template doesn't look right.
|
||||
|
||||
Adding a header/footer and menu to the template:
|
||||
{{{
|
||||
$def with (df_result)
|
||||
|
||||
$:render.header(_("Disk usage"), 'df')
|
||||
$:render.admin_toolbar('df')
|
||||
<div class="panel">
|
||||
<h2>Disk usage (df -h)</h2>
|
||||
<pre>
|
||||
$df_result
|
||||
</pre>'
|
||||
</div>
|
||||
$:render.footer()
|
||||
|
||||
}}}
|
201
trac_wiki_export/wiki_dir/Development%2FProfiling
Normal file
201
trac_wiki_export/wiki_dir/Development%2FProfiling
Normal file
@ -0,0 +1,201 @@
|
||||
[[PageOutline(1-3,,inline)]]
|
||||
|
||||
= Profiling =
|
||||
|
||||
Profiling helps finding bottlenecks in your program, regarding CPU usage, memory usage and disk (IO) operations.
|
||||
It may sound advanced, but with the right tools profiling can be quite simple.
|
||||
|
||||
Here are some examples from how deluge has been optimized in git master.
|
||||
|
||||
== Profiling CPU usage in the GTK UI ==
|
||||
|
||||
Python has [http://docs.python.org/2/library/profile.html multiple profilers] built in. We'll be using cProfile.
|
||||
|
||||
We run deluge in thin client/daemon setup, so running deluge will only start the GTK UI.
|
||||
|
||||
=== cProfile and Run Snake Run ===
|
||||
|
||||
Running the GTK UI with profiling enabled:
|
||||
{{{
|
||||
python -m cProfile -o deluge.profile deluge -l deluge.log -L info
|
||||
}}}
|
||||
When you exit deluge, the profile stats are written to the file deluge.profile.
|
||||
|
||||
Lets open this with [http://www.vrplumber.com/programming/runsnakerun RunSnakeRun]
|
||||
|
||||
Below is an example of the profile results for version 1.3.5 after connecting to a daemon with 2000 torrents.
|
||||
|
||||
[[Image(deluge_runsnake.png)]]
|
||||
|
||||
A very interresting entry is the update_view in torrentview.py. This function is called 23 times where the total time spent in the function is 27 seconds. Each call takes 1.18 seconds. For the short time the client was connected this is a lot of time!
|
||||
|
||||
=== line_profiler ===
|
||||
|
||||
Lets examine this function using another tool; [http://packages.python.org/line_profiler/ line_profiler].
|
||||
|
||||
After installing line_profiler, we add @profile to the function update_view in torrentview.py like this:
|
||||
|
||||
{{{
|
||||
@profile
|
||||
def update_view(self, columns=None):
|
||||
}}}
|
||||
and run deluge with kern_prof:
|
||||
{{{
|
||||
kernprof.py -l -v ./deluge -l ~/deluge.log -L info
|
||||
}}}
|
||||
Then connecting to the daemon to load the torrent list and letting it run a few seconds and then close the client.
|
||||
The output from line_profiler will be printed to the terminal:
|
||||
|
||||
{{{
|
||||
Wrote profile results to deluge.lprof
|
||||
Timer unit: 1e-06 s
|
||||
|
||||
File: /home/bro/deluge/deluge/ui/gtkui/torrentview.py
|
||||
Function: update_view at line 402
|
||||
Total time: 22.7855 s
|
||||
|
||||
Line # Hits Time Per Hit % Time Line Contents
|
||||
==============================================================
|
||||
402 @profile
|
||||
403 def update_view(self, columns=None):
|
||||
404 """Update the view. If columns is not None, it will attempt to only
|
||||
405 update those columns selected.
|
||||
406 """
|
||||
407 16 206 12.9 0.0 filter_column = self.columns["filter"].column_indices[0]
|
||||
408 # Update the torrent view model with data we've received
|
||||
409 16 71 4.4 0.0 status = self.status
|
||||
410
|
||||
411 34608 172620 5.0 0.8 for row in self.liststore:
|
||||
412 34592 255751 7.4 1.1 torrent_id = row[self.columns["torrent_id"].column_indices[0]]
|
||||
413
|
||||
414 34592 5322894 153.9 23.4 if not torrent_id in status.keys():
|
||||
415 row[filter_column] = False
|
||||
416 else:
|
||||
417 34592 10544768 304.8 46.3 row[filter_column] = True
|
||||
418 34592 347006 10.0 1.5 if torrent_id in self.prev_status and status[torrent_id] == self.prev_status[torrent_id]:
|
||||
419 # The status dict is the same, so do not update
|
||||
420 30062 79234 2.6 0.3 continue
|
||||
421
|
||||
422 # Set values for each column in the row
|
||||
423 40770 112550 2.8 0.5 for column in self.columns_to_update:
|
||||
424 36240 207459 5.7 0.9 column_index = self.get_column_index(column)
|
||||
425 81540 320997 3.9 1.4 for i, status_field in enumerate(self.columns[column].status_field):
|
||||
426 45300 152447 3.4 0.7 if status_field in status[torrent_id]:
|
||||
427 43138 107249 2.5 0.5 try:
|
||||
428 # Only update if different
|
||||
429 43138 118716 2.8 0.5 row_value = status[torrent_id][status_field]
|
||||
430 43138 252969 5.9 1.1 if row[column_index[i]] != row_value:
|
||||
431 15377 4731302 307.7 20.8 row[column_index[i]] = row_value
|
||||
432 except Exception, e:
|
||||
433 log.debug("%s", e)
|
||||
434
|
||||
435 16 3291 205.7 0.0 component.get("MenuBar").update_menu()
|
||||
436
|
||||
437 16 56007 3500.4 0.2 self.prev_status = status
|
||||
}}}
|
||||
|
||||
Here we see the cummulative stats for this function, i.e. the stats for all the calls to this function combined.
|
||||
On line 407 we that Hits is 16, which means this method was called 16 times in total. Executing this line 16 times took 206 microseconds.
|
||||
Looker further down we see some more interesting numbers. Executing line 414 34592 times took a total of 5.3 seconds. Executing line 417 34592 times took 10.5 seconds.
|
||||
The lines that have no stats, e.g. line 415, were never executed.
|
||||
|
||||
Lets do two simple changes:
|
||||
* Call status.keys() before the for-loop and use the cached results inside the for-loop.
|
||||
* Add an if-test before line 417 to test if the value is False before setting to True.
|
||||
|
||||
These are the new results:
|
||||
|
||||
{{{
|
||||
Wrote profile results to deluge.lprof
|
||||
Timer unit: 1e-06 s
|
||||
|
||||
File: /home/bro/deluge/deluge/ui/gtkui/torrentview.py
|
||||
Function: update_view at line 402
|
||||
Total time: 8.59357 s
|
||||
|
||||
Line # Hits Time Per Hit % Time Line Contents
|
||||
==============================================================
|
||||
402 @profile
|
||||
403 def update_view(self, columns=None):
|
||||
404 """Update the view. If columns is not None, it will attempt to only
|
||||
405 update those columns selected.
|
||||
406 """
|
||||
407 16 193 12.1 0.0 filter_column = self.columns["filter"].column_indices[0]
|
||||
408 # Update the torrent view model with data we've received
|
||||
409 16 66 4.1 0.0 status = self.status
|
||||
410 16 5679 354.9 0.1 status_keys = status.keys()
|
||||
411 34608 123193 3.6 1.4 for row in self.liststore:
|
||||
412 34592 187470 5.4 2.2 torrent_id = row[self.columns["torrent_id"].column_indices[0]]
|
||||
413
|
||||
414 34592 1541622 44.6 17.9 if not torrent_id in status_keys:
|
||||
415 row[filter_column] = False
|
||||
416 else:
|
||||
417 34592 152303 4.4 1.8 if row[filter_column] is False:
|
||||
418 2162 410067 189.7 4.8 row[filter_column] = True
|
||||
419 34592 235676 6.8 2.7 if torrent_id in self.prev_status and status[torrent_id] == self.prev_status[torrent_id]:
|
||||
420 # The status dict is the same, so do not update
|
||||
421 30052 74645 2.5 0.9 continue
|
||||
422
|
||||
423 # Set values for each column in the row
|
||||
424 40860 105678 2.6 1.2 for column in self.columns_to_update:
|
||||
425 36320 195021 5.4 2.3 column_index = self.get_column_index(column)
|
||||
426 81720 306306 3.7 3.6 for i, status_field in enumerate(self.columns[column].status_field):
|
||||
427 45400 142351 3.1 1.7 if status_field in status[torrent_id]:
|
||||
428 43238 106093 2.5 1.2 try:
|
||||
429 # Only update if different
|
||||
430 43238 117195 2.7 1.4 row_value = status[torrent_id][status_field]
|
||||
431 43238 231129 5.3 2.7 if row[column_index[i]] != row_value:
|
||||
432 15367 4591521 298.8 53.4 row[column_index[i]] = row_value
|
||||
433 except Exception, e:
|
||||
434 log.debug("%s", e)
|
||||
435
|
||||
436 16 3417 213.6 0.0 component.get("MenuBar").update_menu()
|
||||
437
|
||||
438 16 62029 3876.8 0.7 self.prev_status = status
|
||||
}}}
|
||||
|
||||
Now you can see that line 414 uses 1.5 seconds instead of the previous 5.3.
|
||||
Also, line 418 (previously 417) uses 400ms instead of 10 seconds in the original code. Most importantly the line is now executed only 2162 times, and not 34592 times as it used to be. Including the the new if-test, the new code uses 560ms compared to 10 seconds in the old.
|
||||
The reason this is faster can be seen when comparing the time it takes to execute each of the lines one time. The if-test takes 4.4 microseconds on average, while setting the row value to True takes 189 microseconds.
|
||||
|
||||
=== cProfile and Run Snake Run revisited ===
|
||||
|
||||
Lets do a new profile with the changes to the code:
|
||||
{{{
|
||||
python -m cProfile -o deluge.profile deluge -l deluge.log -L info
|
||||
}}}
|
||||
|
||||
[[Image(Deluge_runsnake_after_optimizations.png)]]
|
||||
|
||||
We can now see how update_view has dropped significantly on the list. Each call to update_view now takes 0.37 seconds on average compared to 1.18 in the original code.
|
||||
|
||||
== Profiling Deluge daemon with ==
|
||||
|
||||
The daemon can be profiled using the command line option --profile.
|
||||
{{{
|
||||
deluged --profile
|
||||
}}}
|
||||
Deluge 1.3.X uses [http://docs.python.org/2/library/hotshot.html hotshot]. You can convert hotshot profiling data to [http://kcachegrind.sourceforge.net/html/Home.html KCachegrind] calltree format using hotshot2calltree:
|
||||
{{{
|
||||
hotshot2calltree -o deluged_calltree.profile deluged.profile
|
||||
}}}
|
||||
git-master uses cProfile so the output can be opened directly by [http://www.vrplumber.com/programming/runsnakerun RunSnakeRun]. To open this in KCachegrind (-k option opens the result in KCachegrind automatically):
|
||||
{{{
|
||||
pyprof2calltree -i deluged.profile -k
|
||||
}}}
|
||||
|
||||
== Profiling memory usage on the Deluge daemon with valgrind (massif) ==
|
||||
Be aware that this makes the daemon very slow!
|
||||
|
||||
{{{
|
||||
valgrind --tool=massif deluged -l ~/deluged.log -L info -d
|
||||
}}}
|
||||
After exiting the daemon, a file named massif.out.<pid> (e.g. massif.out.26034) should've been writen to the working dir.
|
||||
Lets open that with [https://projects.kde.org/projects/extragear/sdk/massif-visualizer massif-visualizer]
|
||||
{{{
|
||||
massif-visualizer massif.out.26034
|
||||
}}}
|
||||
|
||||
[[Image(Deluge_daemon_massif_visualizer.jpg, 800px)]]
|
||||
|
||||
Here we see a nice graph showing the memory usage at snapshots taken at regular intervals. It's clear that a lot of the memory used by the daemon is in fact used by libtorrent. It's possible to get a more detailed view of the memory usage of the different categories shown in the list on the right.
|
1
trac_wiki_export/wiki_dir/Development%2FReleaseChecklist
Normal file
1
trac_wiki_export/wiki_dir/Development%2FReleaseChecklist
Normal file
@ -0,0 +1 @@
|
||||
Moved: https://deluge.readthedocs.io/en/latest/devguide/packaging/release.html
|
1
trac_wiki_export/wiki_dir/Development%2FTesting
Normal file
1
trac_wiki_export/wiki_dir/Development%2FTesting
Normal file
@ -0,0 +1 @@
|
||||
Moved to: https://deluge.readthedocs.io/en/develop/contributing/testing.html
|
1
trac_wiki_export/wiki_dir/Development%2FTranslation
Normal file
1
trac_wiki_export/wiki_dir/Development%2FTranslation
Normal file
@ -0,0 +1 @@
|
||||
Moved to: https://deluge.readthedocs.io/en/latest/contributing/translations.html
|
76
trac_wiki_export/wiki_dir/Development%2FUiClient1.2
Normal file
76
trac_wiki_export/wiki_dir/Development%2FUiClient1.2
Normal file
@ -0,0 +1,76 @@
|
||||
= Overview =
|
||||
|
||||
Deluge is separated into two distinct portions, the daemon and the client, and as such, there needs to be a way for these components to communicate. The deluge.ui.client module is designed to facilitate this communication for the various User Interfaces. The client module hides the DelugeRPC protocol from us and presents with an easy to use API to access Deluge daemons.
|
||||
|
||||
If you are not familiar with Twisted Deferred objects, then I would strongly suggest [http://twistedmatrix.com/projects/core/documentation/howto/defer.html reading about them] before getting started.
|
||||
|
||||
= Writing a simple client =
|
||||
|
||||
Since I like to learn by example, I am going to start right away with a basic Deluge client.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
# Import the client module
|
||||
from deluge.ui.client import client
|
||||
# Import the reactor module from Twisted - this is for our mainloop
|
||||
from twisted.internet import reactor
|
||||
|
||||
# Set up the logger to print out errors
|
||||
from deluge.log import setupLogger
|
||||
setupLogger()
|
||||
|
||||
# Connect to a daemon running on the localhost
|
||||
# We get a Deferred object from this method and we use this to know if and when
|
||||
# the connection succeeded or failed.
|
||||
d = client.connect()
|
||||
|
||||
# We create a callback function to be called upon a successful connection
|
||||
def on_connect_success(result):
|
||||
print "Connection was successful!"
|
||||
print "result:", result
|
||||
# Disconnect from the daemon once we successfully connect
|
||||
client.disconnect()
|
||||
# Stop the twisted main loop and exit
|
||||
reactor.stop()
|
||||
|
||||
# We add the callback to the Deferred object we got from connect()
|
||||
d.addCallback(on_connect_success)
|
||||
|
||||
# We create another callback function to be called when an error is encountered
|
||||
def on_connect_fail(result):
|
||||
print "Connection failed!"
|
||||
print "result:", result
|
||||
|
||||
# We add the callback (in this case it's an errback, for error)
|
||||
d.addErrback(on_connect_fail)
|
||||
|
||||
# Run the twisted main loop to make everything go
|
||||
reactor.run()
|
||||
|
||||
}}}
|
||||
|
||||
All this client script will do is try to connect to a daemon running on localhost and then disconnect from it right away. The script is pretty useless, but it shows how things are done in an asynchronous matter and this is an important concept for developing more complex interfaces.
|
||||
|
||||
So now that we've got a basic script to get us connected to a daemon, let's extend it a bit to do something useful. We'll start by adding a remote procedure call in the '''on_connect_success()''' function.
|
||||
|
||||
{{{
|
||||
#!python
|
||||
|
||||
def on_connect_success(result):
|
||||
print "Connection was successful!"
|
||||
def on_get_config_value(value, key):
|
||||
print "Got config value from the daemon!"
|
||||
print "%s: %s" % (key, value)
|
||||
# Disconnect from the daemon once we've got what we needed
|
||||
client.disconnect()
|
||||
# Stop the twisted main loop and exit
|
||||
reactor.stop()
|
||||
|
||||
# Request the config value for the key 'download_location'
|
||||
client.core.get_config_value("download_location").addCallback(on_get_config_value, "download_location")
|
||||
|
||||
}}}
|
||||
|
||||
Ok! We now should be getting a print out of the ''download_location'' config value. You'll notice that any RPC method returns a Deferred object, just like the '''client.connect()''' method. Since the '''core.get_config_value()''' method only returns the value we are passing the ''key'' to the callback function too. So in the '''on_get_config_value()''' callback, the first argument is the return value from the daemon and the second is from our '''addCallback()''' call.
|
||||
|
@ -0,0 +1,48 @@
|
||||
[[PageOutline(1-3,,inline)]]
|
||||
|
||||
= Improving the speed of Deluge =
|
||||
|
||||
We have been working on optimizing Deluge to use less resources and handle more torrents. Most issues with speed gets noticable when the number of torrents grow past a given threshold. Deluge 1.3 will not be getting any more optimizations or improvements, so any new code will go into the develop branch.
|
||||
|
||||
Tickets for performance issues that have not yet been fixed or applied to the develop branch are listed in the [http://dev.deluge-torrent.org/query?group=status&milestone=performance performance milestone].
|
||||
|
||||
|
||||
= Current state of Deluge (v1.3) =
|
||||
|
||||
Deluge v1.3 handles hundreds of torrents fairly well. The GTKUI uses a lot of CPU to render the torrent list, so to keep CPU usage at a minimum it is a good idea to run in deamon/client mode and only connect with to the daemon when you need.
|
||||
|
||||
When the torrent list reaches 1000 torrents, the CPU usage gets more and more noticable, the more torrents the slower it gets.
|
||||
|
||||
The following patches have been applied to 1.3:
|
||||
* [http://dev.deluge-torrent.org/ticket/2248 Cache tracker icons in gtkui (#2248)] [http://git.deluge-torrent.org/deluge/commit/?h=1.3-stable&id=36a78d8f219f git commit] (GTKUI)
|
||||
* [http://dev.deluge-torrent.org/ticket/2259 Small (but significant) speed optimizations to the torrentview (#2259)] [http://git.deluge-torrent.org/deluge/commit/?h=1.3-stable&id=a0ae3ebfce826980d08f6e75ec62a48e39cd5b41 git commit] (GTKUI) (smaller version of #2184 for 1.3 branch)
|
||||
* [http://dev.deluge-torrent.org/ticket/2184 Speed optimizations to the torrentview in GTKUI (#2184)], [http://git.deluge-torrent.org/deluge/commit/?h=1.3-stable&id=5dba83853308482827aaecd1be1e79be97e30d15 git commit]
|
||||
|
||||
= State of git-develop (To be v2) =
|
||||
|
||||
git-develop has been tested and works well with 2-3000 torrents. Currently the biggest problem is that to make libtorrent v0.16.X handle that many active torrents, the settings ''active_dht_limit'', ''active_tracker_limit'', ''active_lsd_limit'' must be set. This is currently not implemented in git-develop, but applying the patch proposed in #2257 should solve this. This can also be fixed by using the ltConfig plugin found in the [http://dev.deluge-torrent.org/wiki/Plugins list of plugins].
|
||||
|
||||
The following patches have already been applied which improves the speed of Deluge with many torrents greatly:
|
||||
|
||||
== GTKUI patches==
|
||||
* [http://dev.deluge-torrent.org/ticket/2184 Speed optimizations to the torrentview in GTKUI (#2184)], [http://git.deluge-torrent.org/deluge/commit/?id=b4f5e78a775503a5501e2eba7eee73dfa0e1955a git commit]
|
||||
* [http://dev.deluge-torrent.org/ticket/2248 Cache tracker icons in gtkui (#2248)] ([http://git.deluge-torrent.org/deluge/commit/?id=463ac0c07eda1b33b145e1b9be7edbc0981815a99 git commit])
|
||||
* [http://dev.deluge-torrent.org/ticket/2285 Speed optimizations to sessionproxy (#2285)] [http://git.deluge-torrent.org/deluge/commit/?h=develop&id=5503f9047 git commit]
|
||||
* [http://dev.deluge-torrent.org/ticket/1885 Add caching to the data-funcs in ui/gtkui/torrentview_data_funcs.py] [http://dev.deluge-torrent.org/changeset/8ecc0e11a79d92 git commit]
|
||||
* [http://dev.deluge-torrent.org/ticket/2250 Speedup removing multiple torrents from core (#2250)] (GTKUI)
|
||||
|
||||
== Core patches ==
|
||||
* [http://dev.deluge-torrent.org/ticket/2255 Speed optimizations to the daemon] [http://git.deluge-torrent.org/deluge/commit/?id=8c106ce8c4c0794ddd63e8e8f98b097221a56a52 git commit]
|
||||
* [http://dev.deluge-torrent.org/ticket/2246 Speedup set_prioritize_first_last in torrent.py (#2246)], [http://git.deluge-torrent.org/deluge/commit/?id=6313ff19b322a2801c633324bb0d77dc4f59b9a1 git commit] (Mainly on startup)
|
||||
* [http://dev.deluge-torrent.org/ticket/2379 Move cleanup of prev_status from torrent.py to torrentmanager.py (#2379)] [http://dev.deluge-torrent.org/changeset/feaeee0379 git commit]
|
||||
* [http://dev.deluge-torrent.org/ticket/2116 Application layer protocol for transfering RPC messages + utf8 decoding error (#2116)], [http://git.deluge-torrent.org/deluge/commit/?id=8e7432e71c80a47c96bf48c07535ec1991efe1d9 git commit] (RPC communication between daemon and clients)
|
||||
* [http://dev.deluge-torrent.org/ticket/2406 Speed up adding multiple torrents (#2406)] (Core/GTKUI)
|
||||
|
||||
Proposed patches:
|
||||
* [http://dev.deluge-torrent.org/ticket/2257 Allow setting of active_dht_limit, active_tracker_limit and active_lsd_limit. Fix bugs. (#2257)] (Daemon)
|
||||
|
||||
Other issues that need investigation:
|
||||
* Pausing/resuming multiple torrents is very slow. This is probably because when a torrent changes state, a lot of operations are done (event listeners in GUI presumable), so with hundreds of torrents changing state the result is too much work needing to be done.
|
||||
* CPU usage on an idle daemon can still be around 5% ([http://dev.deluge-torrent.org/ticket/1490 #1490]).
|
||||
* Reducing the number of calls (executions) torrent.update_state during startup (loading torrents)
|
||||
* Investigate if libtorrent.file_progress is a bottleneck
|
93
trac_wiki_export/wiki_dir/Development%2FWebUi%2FJson
Normal file
93
trac_wiki_export/wiki_dir/Development%2FWebUi%2FJson
Normal file
@ -0,0 +1,93 @@
|
||||
['Development']
|
||||
= Webui JSON api =
|
||||
|
||||
For a demo: set the webui-template to "ajax_demo".
|
||||
|
||||
== Full client api ==
|
||||
* url : /json/rpc
|
||||
* rpc-api : http://en.wikipedia.org/wiki/JSON-RPC#Version_1.0
|
||||
* methods : http://dev.deluge-torrent.org/wiki/Development/UiClient#Remoteapi
|
||||
|
||||
== added methods, json only ==
|
||||
|
||||
=== update_ui(keys ,filter_dict , cache_id = None ) ===
|
||||
Composite call.
|
||||
Goal : limit the number of ajax calls
|
||||
|
||||
input:
|
||||
{{{
|
||||
keys: see get_torrent_status
|
||||
filter_dict: see label_get_filtered_ids # only effective if the label plugin is enabled.
|
||||
cache_id: # todo
|
||||
}}}
|
||||
returns:
|
||||
{{{
|
||||
{
|
||||
"torrents": see get_torrent_status
|
||||
"filters": see label_get_filters
|
||||
"stats": see get_stats
|
||||
"cache_id":int # todo
|
||||
}
|
||||
}}}
|
||||
|
||||
=== get_stats() ===
|
||||
returns:
|
||||
{{{
|
||||
{
|
||||
'download_rate':float(),
|
||||
'upload_rate':float(),
|
||||
'max_download':float(),
|
||||
'max_upload':float(),
|
||||
'num_connections':int(),
|
||||
'max_num_connections':int(),
|
||||
'dht_nodes',int()
|
||||
}
|
||||
}}}
|
||||
|
||||
=== get_webui_config ===
|
||||
returns: a dict with the current webui config (excluding "pwd_*" fields)
|
||||
|
||||
=== set_webui_config(config_dict) ===
|
||||
input: a dict with the webui config-values (extra possible key:"pwd")
|
||||
|
||||
=== get_webui_templates() ===
|
||||
returns: a list of strings.
|
||||
|
||||
=== download_torrent_from_url(url) ===
|
||||
input:
|
||||
{{{
|
||||
url: the url of the torrent to download
|
||||
}}}
|
||||
returns:
|
||||
{{{
|
||||
filename: the temporary file name of the torrent file
|
||||
}}}
|
||||
|
||||
=== get_torrent_info(filename) ===
|
||||
Goal:
|
||||
allow the webui to retrieve data about the torrent
|
||||
|
||||
input:
|
||||
{{{
|
||||
filename: the filename of the torrent to gather info about
|
||||
}}}
|
||||
|
||||
returns:
|
||||
{{{
|
||||
{
|
||||
"filename": the torrent file
|
||||
"name": the torrent name
|
||||
"size": the total size of the torrent
|
||||
"files": the files the torrent contains
|
||||
"info_hash" the torrents info_hash
|
||||
}
|
||||
}}}
|
||||
|
||||
=== add_torrents(torrents) ===
|
||||
input:
|
||||
{{{
|
||||
torrents [{
|
||||
path: the path of the torrent file,
|
||||
options: the torrent options
|
||||
}]
|
||||
}}}
|
67
trac_wiki_export/wiki_dir/Download
Normal file
67
trac_wiki_export/wiki_dir/Download
Normal file
@ -0,0 +1,67 @@
|
||||
= Deluge Download =
|
||||
Latest Release: '''[[Include(https://ftp.osuosl.org/pub/deluge/version)]]''' ''([https://deluge.readthedocs.io/en/latest/releases/index.html Release notes])''
|
||||
|
||||
== Linux ==
|
||||
{{{
|
||||
#!div class="" style="line-height:100%"
|
||||
[[Image(https://deluge-torrent.org/images/ubuntu-logo.png, left, link=)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=7, height=20)]]
|
||||
[https://tinyurl.com/installdeluge Ubuntu], also [wiki:Installing/Linux/Ubuntu#AddDelugePPARepository Deluge PPA]
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/debian-logo.png, left, link=)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=10, height=20)]]
|
||||
[https://packages.debian.org/search?searchon=names&keywords=deluge Debian]
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/fedora-logo.png, left, link=)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=7, height=20)]]
|
||||
[https://admin.fedoraproject.org/pkgdb/package/deluge/ Fedora]
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/opensuse.png, left, link=)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=7, height=20)]]
|
||||
[http://packman.links2linux.org/install/deluge OpenSUSE 1click]
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/arch-logo.png, left, link=)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=7, height=20)]]
|
||||
[https://wiki.archlinux.org/index.php/Deluge Arch]
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/gentoo-logo.png, left, link=)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=7, height=20)]]
|
||||
[http://packages.gentoo.org/package/net-p2p/deluge Gentoo]
|
||||
|
||||
[[Image(https://flathub.org/favicon.png, left, link=, width=16, height=16)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=7, height=20)]]
|
||||
[https://flathub.org/apps/details/org.deluge_torrent.deluge Flatpak ]
|
||||
}}}
|
||||
|
||||
== Microsoft Windows ==
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/xp-logo.png, left, link=)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=7, height=20)]]
|
||||
[https://ftp.osuosl.org/pub/deluge/windows/?C=M;O=D Installer for 7, 8, 10]
|
||||
|
||||
== Apple macOS ==
|
||||
|
||||
Deluge 2.0 packages are not yet available, please see [https://deluge.readthedocs.io/en/latest/intro/01-install.html docs]
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/apple-logo.gif, left, link=,height=16 width=16)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=5)]]
|
||||
[https://ftp.osuosl.org/pub/deluge/mac_osx/?C=M;O=D Deluge.app]
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/macports.png, left, link=,height=16 width=16)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=5)]]
|
||||
[https://dev.deluge-torrent.org/wiki/Installing/MacOSX#MacPorts MacPorts]
|
||||
|
||||
== BSD Unix ==
|
||||
|
||||
[[Image(https://deluge-torrent.org/images/freebsd-logo.png, left, link=)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, left, link=, width=7, height=20)]]
|
||||
[[Image(https://deluge-torrent.org/images/spacer.gif, right, link=, width=15)]]
|
||||
[https://www.freshports.org/net-p2p/deluge/ FreeBSD]
|
||||
|
||||
== Docker ==
|
||||
|
||||
[https://hub.docker.com/r/linuxserver/deluge LinuxServer]
|
||||
|
||||
== Source ==
|
||||
|
||||
[wiki:Installing/Source ''Install from source''] using [https://ftp.osuosl.org/pub/deluge/source/?C=M;O=D release tarballs] or [wiki:GitRepo Git repository].
|
363
trac_wiki_export/wiki_dir/Faq
Normal file
363
trac_wiki_export/wiki_dir/Faq
Normal file
@ -0,0 +1,363 @@
|
||||
{{{
|
||||
#!html
|
||||
<h1 style="text-align: left;">Deluge FAQ</h1>
|
||||
}}}
|
||||
[[PageOutline(1-3,,inline)]]
|
||||
|
||||
----
|
||||
= General =
|
||||
|
||||
== Is Deluge Free? Can I get the source? ==
|
||||
|
||||
Yes, Deluge is Free Software, as defined by the Free Software Foundation, and is released under the GPL, giving our users complete freedom. The source code is available in the [wiki:Download download section]. Our GPL nature allows you to be 100% sure that our program will never “spy” on your activities. Closed-source !BitTorrent clients cannot make that same claim.
|
||||
|
||||
== How do I install Deluge? ==
|
||||
|
||||
['Installing']
|
||||
|
||||
== I have an issue starting or using Deluge. ==
|
||||
|
||||
See ['Troubleshooting'] and [wiki:Contributing/BugReporting 'Bug Reporting']
|
||||
|
||||
== How to start the various user-interfaces? ==
|
||||
See [wiki:Faq#UserInterfaceSpecific UI specific questions]
|
||||
|
||||
== How do I set Deluge as my default !BitTorrent program? ==
|
||||
|
||||
On Windows, the installer should do this automatically. On Linux/Unix (GNOME), right-click on a torrent file, click on properties, click on the "open with" tab. Is Deluge listed there? If so, select it to be your default, if not, click on "add", then click on "use custom command". Insert `/usr/bin/deluge` and click add.
|
||||
|
||||
== How do I set Deluge as my default program for Magnet URIs? ==
|
||||
|
||||
* '''GNOME''' users can associate Magnets with Deluge with the following commands:
|
||||
{{{
|
||||
gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command 'deluge "%s"'
|
||||
gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/needs_terminal false
|
||||
gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true
|
||||
}}}
|
||||
Also may require running the following:
|
||||
{{{
|
||||
gvfs-mime --set x-scheme-handler/magnet deluge.desktop
|
||||
}}}
|
||||
* '''Firefox''' users can reset the Magnet association with:
|
||||
* Put `about:config` into address bar and change `network.protocol-handler.expose.magnet` to `false`.
|
||||
You will be prompted next time you click a Magnet to set an association with Deluge. (e.g. `/usr/bin/deluge`)
|
||||
* '''Windows''' users should simply re-run the installer and select the magnet association option.
|
||||
* '''OSX''' GTK does not support Magnet URIs (see #2420) but there is a plugin available: http://forum.deluge-torrent.org/viewtopic.php?f=9&t=52619
|
||||
|
||||
== Where does Deluge store its settings/config? ==
|
||||
|
||||
The default location for the Deluge config directory is in the `home` directory of the current user. The config location can be manually changed by using the `--config` option at startup.
|
||||
|
||||
Linux, BSD and Mac OSX::
|
||||
`~/.config/deluge`
|
||||
|
||||
Windows OS::
|
||||
`%APPDATA%\deluge`
|
||||
|
||||
''When running Deluge as a service the config directory is relative to the user specified in the service configuration.''
|
||||
|
||||
== Where does Deluge store the .torrent files? ==
|
||||
|
||||
Within the Deluge config in a directory named `state`.
|
||||
|
||||
== How do I reset the settings back to default? ==
|
||||
|
||||
If you don't care about losing your current torrents then delete everything in Deluge's [wiki:Faq#WheredoesDelugestoreitssettingsconfig config] directory.
|
||||
|
||||
If you do want to keep your current torrents then delete everything except for the `state` folder.
|
||||
|
||||
= User Interface Specific =
|
||||
== GTK UI ==
|
||||
=== How do I start the GTK UI? ===
|
||||
The main graphical interface. Can be started with either of the following:
|
||||
{{{
|
||||
deluge
|
||||
}}}
|
||||
{{{
|
||||
deluge-gtk
|
||||
}}}
|
||||
|
||||
== Web UI ==
|
||||
=== How do I start the Web UI? ===
|
||||
The web interface enables access to Deluge from your browser.
|
||||
|
||||
There are two ways to enable this interface:
|
||||
|
||||
1. From the GTK UI you can enable the `WebUI` plugin.
|
||||
1. If running the Deluge daemon `deluged` it is recommended not use the plugin and instead run the standalone Web UI:
|
||||
{{{
|
||||
deluge-web
|
||||
}}}
|
||||
|
||||
Open the browser at `http://localhost:8112`.
|
||||
|
||||
=== What is the default password ===
|
||||
|
||||
The Web UI default password is `deluge`.
|
||||
|
||||
For security you should change this upon first login.
|
||||
|
||||
=== How do I change the password? ===
|
||||
In the Web UI:
|
||||
1. Click on `Preferences`.
|
||||
1. Select the `Interface` category.
|
||||
1. Fill out the fields under `Password`.
|
||||
1. Click `Change` button.
|
||||
|
||||
=== How can I reset forgotten password? ===
|
||||
|
||||
1. Stop the Web UI before modifying the `web.conf` file.
|
||||
2. Edit `web.conf` in [wiki:Faq#WheredoesDelugestoreitssettingsconfig config] and delete the entire `pwd_sha1` line or use quick method via command-line e.g.:
|
||||
{{{
|
||||
sed -i.bak "/pwd_sha1/d" ~/.config/deluge/web.conf
|
||||
}}}
|
||||
3. Start the Web UI and the password will have been reset to default password `deluge`.
|
||||
|
||||
=== How do I configure plugins with the Web UI? ===
|
||||
Not all plugins are configurable directly with the Web UI, see [Plugins] table for those with Web UI code.
|
||||
|
||||
The easiest way to configure plugins is using the GTK UI. If unable to use GTK UI on the machine with your daemon, it is possible to connect to that daemon from another computer with the GTK UI. See [wiki:UserGuide/ThinClient ThinClient] for more information on remote GTK UI setup.
|
||||
|
||||
=== How do I auto-connect to a specific daemon? ===
|
||||
|
||||
1. Stop the Web UI before modifying the `web.conf` file.
|
||||
1. Edit `web.conf` in [wiki:Faq#WheredoesDelugestoreitssettingsconfig config], find `"default_daemon"` and set its value to the daemon `id` in `hostlist.conf`[[br]]
|
||||
e.g. To connect to localhost you would open `hostlist.conf` as see a snippet such as:
|
||||
{{{
|
||||
...
|
||||
"123459d5a5b414159caa1323f6e0c9b240c7abcd",
|
||||
"localhost",
|
||||
58846,
|
||||
...
|
||||
}}}
|
||||
1. Use the first entry from hostlist, which is the `id` and add it to `web.conf`:
|
||||
{{{
|
||||
"default_daemon": "123459d5a5b414159caa1323f6e0c9b240c7abcd",
|
||||
}}}
|
||||
1. Restart the Web UI.
|
||||
|
||||
=== How do I enable HTTPS? ===
|
||||
|
||||
1. Create a (self-signed) SSL certificate: http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html#selfcert
|
||||
1. Put the resulting `deluge.crt` and `deluge.key` in the [wiki:Faq#WheredoesDelugestoreitssettingsconfig config's] `ssl` directory.
|
||||
1. Enable HTTPS in Web UI config and modify the filepaths to match the above files.
|
||||
1. Restart the Web UI.
|
||||
|
||||
=== Can I bind the Web UI to port 80 in Linux? ===
|
||||
You cannot bind to anything under 1024 in Linux, however with kernel >=2.6.24, you can use capabilities to allow Python to bind to port 80 securely.
|
||||
|
||||
So for example in Debian or Ubuntu:
|
||||
1. `sudo apt-get install libcap2-bin`
|
||||
1. `sudo setcap 'cap_net_bind_service=+ep' /path/to/python`
|
||||
1. Configure the Web UI to use port `80`
|
||||
1. Restart the Web UI.
|
||||
|
||||
== Console UI ==
|
||||
|
||||
=== How do I start the Console UI? ===
|
||||
''Note: Requires the Deluge daemon `deluged` to be running.''
|
||||
|
||||
The text-based interface, ideal for terminal use:
|
||||
{{{
|
||||
deluge-console
|
||||
}}}
|
||||
|
||||
The console can be also run in a non-interactive mode which outputs to the terminal:
|
||||
{{{
|
||||
deluge-console "info [torrent]"
|
||||
}}}
|
||||
|
||||
=== How can I run multiple commands from the terminal? ===
|
||||
|
||||
Use `;` to separate commands and enclose the commands with double quotes `"`:
|
||||
{{{
|
||||
deluge-console "connect host user pass; info"
|
||||
}}}
|
||||
|
||||
|
||||
=== How do I connect the console UI to a daemon on a non-default port? ===
|
||||
|
||||
{{{
|
||||
$ deluge-console
|
||||
>>> connect localhost 12345
|
||||
}}}
|
||||
|
||||
=== I encountered `BadLoginError("Password does not match")` with localhost daemon? ===
|
||||
|
||||
This is likely due to mismatching config locations, ensure you are running deluge-console with same user as deluged: [wiki:UserGuide/ThinClient#AccessingdelugedservicewithlocalUIClient More Details]
|
||||
|
||||
== Daemon ==
|
||||
|
||||
=== Why is Deluge still listed in my task manager even after I close it? ===
|
||||
|
||||
You closed only the UI, but you did not close the daemon.
|
||||
Choose "Quit & Shutdown Daemon" to close both Daemon and GTK UI.
|
||||
|
||||
=== How do I start and stop the daemon? ===
|
||||
|
||||
{{{
|
||||
deluged
|
||||
}}}
|
||||
{{{
|
||||
pkill deluged
|
||||
}}}
|
||||
|
||||
''Note: Deluge accepts the `SIGTERM` signal and cleanly shuts down.''
|
||||
|
||||
=== How do I start the daemon with logging enabled? ===
|
||||
|
||||
See: [wiki:Troubleshooting#EnableDelugeLogging]
|
||||
|
||||
Using the `--do-not-daemonize` (`-d`) option you can also log to console:
|
||||
|
||||
{{{
|
||||
deluged -d [-L <loglevel>] [-l <logfile>]
|
||||
}}}
|
||||
|
||||
=== I can't connect to the daemon from another machine ===
|
||||
|
||||
See [wiki:UserGuide/ThinClient ThinClient] for more information but the summary steps are:
|
||||
|
||||
1. Configure the daemon to allow remote connections
|
||||
1. Configure [wiki:UserGuide/Authentication Authentication]
|
||||
1. Restart the daemon.
|
||||
|
||||
=== How do I make Deluge connect to a different daemon? ===
|
||||
|
||||
By default, Deluge (GTK UI) is in classic mode, the daemon and GTK UI are linked together.
|
||||
To disable classic mode:
|
||||
1. `Preferences` -> `Interface`
|
||||
1. Disable (untick) `Classic Mode`
|
||||
1. Restart Deluge and it will now start in thin-client mode
|
||||
1. Use the Connection Manager to enter the other daemon details
|
||||
See [wiki:UserGuide/ThinClient ThinClient] for more information on remote GTK UI
|
||||
|
||||
=== How do I stop Deluge from killing the daemon when I quit the GTK UI? ===
|
||||
|
||||
See above.
|
||||
|
||||
= !BitTorrent Related=
|
||||
|
||||
== The files tab shows a different percentage-completed than the torrent ==
|
||||
|
||||
The files tab will only show percentages based on completed pieces while the main view will show total completed including incomplete pieces.
|
||||
|
||||
== What do all those numbers in parentheses mean? ==
|
||||
|
||||
|| '''Field''' || '''#''' || '''(#)''' ||
|
||||
|| Seeders || Number of connected seeders || Total number of seeders ||
|
||||
|| Peers || Number of connected peers || Total number of peers ||
|
||||
|| Downloaded || Total amount downloaded || Total amount downloaded this session ||
|
||||
|| Uploaded || Total amount uploaded || Total amount uploaded this session ||
|
||||
|
||||
== Seeding torrents have no queue position! Why? ==
|
||||
|
||||
Seeds use something called "seed rank" to determine which should be active and which should be queued. The seed rank is determined by the number of seed cycles a torrent has completed. Torrents with fewer completed seed cycles are prioritized for seeding. A seed cycle is completed when a torrent meets either the share ratio limit (uploaded bytes / downloaded bytes), the share time ratio (time seeding / time downloading) or seed time limit (time seeded).
|
||||
|
||||
== What bandwidth settings should I use? ==
|
||||
|
||||
Start with the following:
|
||||
||Maximum Connections||200||
|
||||
||Maximum Download Speed (Kib/s)||-1||
|
||||
||Maximum Upload Speed (Kib/s)||80% of upload speed||
|
||||
||Maximum Upload Slots||4||
|
||||
||Maximum Half-Open Connections||20||
|
||||
||Maximum Connection Attempts per Second||20||
|
||||
|
||||
If you're using Windows XP*:
|
||||
||Maximum Half-Open Connections||8||
|
||||
|
||||
If you're using pre-SP2 Windows Vista*:
|
||||
||Maximum Half-Open Connections||4||
|
||||
|
||||
You can then tweak those settings to suit your connection. See [wiki:UserGuide/BandwidthTweaking Bandwidth Tweaking].
|
||||
|
||||
Note: if you do not know your upload speed, go to http://speedtest.net and run a test. You can view the results in KB/s by choosing "kilobytes" for "Speed Measurement" which can be accessed under "Settings" in the top left corner of the page.
|
||||
|
||||
* If you have Deluge setup as a [wiki:UserGuide/ThinClient ThinClient] then this setting is determined by the OS the daemon is running on, not the thin client.
|
||||
|
||||
|
||||
== Deluge sometimes creates files that I didn't ask it to download? ==
|
||||
|
||||
Deluge handles files as pieces, not as individual files. This gets tricky, as sometimes the same piece is shared between consecutive files. So if you tell Deluge to download a file, it'll download all of the pieces within that file, and if one of those pieces is shared with another file, that file will also be created, although not necessarily entirely downloaded.
|
||||
|
||||
Note: Deluge can be run with experimental libtorrent from libtorrent_aio branch. In this case all pieces of not wanted files will be stored in one temporary file per torrent.
|
||||
|
||||
== I lost data on force recheck? ==
|
||||
|
||||
Force recheck discards all incomplete pieces.
|
||||
|
||||
== Does Deluge support Initial or Super Seed? ==
|
||||
|
||||
Not yet, but it will be added in a future release, see #1903.
|
||||
|
||||
== Does Deluge have an embedded tracker? ==
|
||||
|
||||
No and it probably never will. We want to be the best !BitTorrent client around, and to do that we need to focus on just being a client.
|
||||
|
||||
== Does Deluge support multi-tracker torrents? ==
|
||||
|
||||
Yes it does. You can edit the trackers associated with a torrent by right-clicking on a torrent within Deluge, and clicking on “Edit Trackers.”
|
||||
|
||||
This conforms to the !BitTorrent Multitracker [http://wiki.depthstrike.com/index.php/P2P:Protocol:Specifications:Multitracker specifications]
|
||||
|
||||
== What is the difference between full allocation and compact allocation? ==
|
||||
|
||||
Compact allocation only allocates as much storage as it needs to keep the pieces downloaded so far. This means that pieces will be moved around to be placed at their final position in the files while downloading (to make sure the completed download has all its pieces in the correct place). In full allocation, the entire space that a file needs is allocated as soon as one piece of that file is downloaded, thus decreasing fragmentation.
|
||||
|
||||
We suggest that our users use full allocation.
|
||||
|
||||
Deluge uses [http://en.wikipedia.org/wiki/Sparse_file sparse files] for full allocation, the compact allocation option is only useful on file systems that don't support sparse files (such as FAT or HFS+).
|
||||
|
||||
== Selective downloading isn't working. How come? ==
|
||||
|
||||
Selective downloading requires full allocation, check you are not using compact allocation. See above for details between the two.
|
||||
|
||||
== Which ports should I use? ==
|
||||
|
||||
The official ports for Bittorrent are `6881-6889`, but most ISPs block or at least throttle those ports, so users are encouraged to use a port range of something between `49152` and `65535`.
|
||||
|
||||
== Deluge uses random ports instead of selected one, why? ==
|
||||
|
||||
You will need to click OK or Apply in Preferences after changing the port however Deluge will pick a random port if the chosen port is not available.
|
||||
|
||||
Run `netstat` to check if the port is free.
|
||||
|
||||
== What does "Auto Managed" do? ==
|
||||
|
||||
An "auto managed" torrent, is a torrent managed by Deluge.
|
||||
This means that it obeys Deluge's queue settings.
|
||||
By disabling "auto managed", a torrent will become active (i.e. start downloading/uploading).
|
||||
It will still be be bound by the stop ratio though (see 'Stop seed at ratio' under the Queue section of the torrent's Options tab).
|
||||
|
||||
Note: All active torrents (including those not "auto managed") are counted in the total active queue settings. This means that if the total number of active torrents ("auto managed" and not) exceed the limit for total active torrents in the queue settings, Deluge will automatically queue any "auto managed" torrents until the limit is no longer exceeded.
|
||||
|
||||
== Does Deluge have an equivalent to "Force Start"? ==
|
||||
|
||||
Deluge has "auto managed" torrents which are similar, see above for details.
|
||||
|
||||
To make a torrent no longer "auto managed":
|
||||
1. Select the torrent in question.
|
||||
1. Select the options tab.
|
||||
1. Unselect "Auto Managed".
|
||||
|
||||
== What is a Magnet URI? ==
|
||||
Magnet URIs are an easy way to add torrents by their info-hash. You can learn more about them [http://en.wikipedia.org/wiki/Magnet_URI_scheme here].
|
||||
|
||||
== What is Peer TOS Byte? ==
|
||||
IPv4 Header Type Of Service Byte [[http://shorewall.net/manpages/shorewall-tcclasses.html (More Info)]]
|
||||
|
||||
Masks: Normal Service `0x00`, Minimize Cost `0x02`, Maximize Reliability `0x04`, Maximize Throughput `0x08`, Minimize-delay `0x10`
|
||||
|
||||
== Can Deluge use blocklists such as !SafePeer or !PeerGuardian? ==
|
||||
|
||||
You can use the [wiki:Plugins/Blocklist Blocklist Plugin].
|
||||
|
||||
== I have a status bar warning: "No Incoming Connections!" ==
|
||||
|
||||
You need to configure your router or firewall to allow (unblock) incoming torrent traffic for the network ports that Deluge uses.
|
||||
|
||||
Enabling `UPnP` in Deluge and on your router can automatically open the ports as needed.
|
||||
|
||||
= Enable Deluge Logging =
|
||||
[wiki:Troubleshooting#EnableDelugeLogging]
|
96
trac_wiki_export/wiki_dir/GitCommit
Normal file
96
trac_wiki_export/wiki_dir/GitCommit
Normal file
@ -0,0 +1,96 @@
|
||||
In addition to the steps outlined by GitTips we have put together a wrapper script around git-commit that can be used to commit to multiple branches. Simply save this script as git-commit somewhere on your PATH.
|
||||
|
||||
You can use it like so:
|
||||
{{{
|
||||
#!sh
|
||||
$ git-commit -b some_branch -m "some commit message"
|
||||
}}}
|
||||
|
||||
'''git-commit'''
|
||||
{{{
|
||||
#!python
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Copyright (C) 2010 Damien Churchill
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, write to:
|
||||
# The Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301, USA.
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
GIT = '/usr/bin/git'
|
||||
GIT_BRANCH = '/usr/lib/git-core/git-branch'
|
||||
GIT_COMMIT = '/usr/lib/git-core/git-commit'
|
||||
GIT_CHECKOUT = '/usr/lib/git-core/git-checkout'
|
||||
GIT_CHERRY_PICK = '/usr/lib/git-core/git-cherry-pick'
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
branches = []
|
||||
git_args = []
|
||||
|
||||
args = sys.argv[1:]
|
||||
|
||||
while args:
|
||||
arg = args.pop(0)
|
||||
if arg in ('-b', '--branch'):
|
||||
branches.append(args.pop(0))
|
||||
elif arg.startswith('--branch='):
|
||||
branches.append(arg[9:])
|
||||
else:
|
||||
git_args.append(arg)
|
||||
|
||||
# Find out the current branch
|
||||
current_branch = None
|
||||
local_branches = []
|
||||
p = subprocess.Popen([GIT_BRANCH], stdout=subprocess.PIPE)
|
||||
for line in p.stdout:
|
||||
branch = line[2:].strip()
|
||||
local_branches.append(branch)
|
||||
if line[0] != '*':
|
||||
continue
|
||||
current_branch = branch
|
||||
|
||||
# Check to make sure that the provided branches are valid
|
||||
for branch in branches:
|
||||
if branch not in local_branches:
|
||||
sys.stderr.write('invalid branch: %s\n' % branch)
|
||||
sys.exit(1)
|
||||
|
||||
# Perform the main commit
|
||||
p = subprocess.Popen([GIT_COMMIT] + git_args, stdout=subprocess.PIPE)
|
||||
if p.wait() > 0:
|
||||
sys.stdout.write(p.stdout.read())
|
||||
sys.exit(1)
|
||||
|
||||
# Get the commit tag without using regex
|
||||
try:
|
||||
commit_tag = p.stdout.readline().split(' ')[1].split(']')[0]
|
||||
except:
|
||||
sys.stderr.write('unable to read commit tag\n')
|
||||
sys.exit(1)
|
||||
|
||||
# Loop through the specified branches applying the commit to all of
|
||||
# them.
|
||||
for branch in branches:
|
||||
subprocess.call([GIT_CHECKOUT, branch])
|
||||
sys.stdout.write('Applying commit %s to %s\n' % (commit_tag, branch))
|
||||
subprocess.call([GIT_CHERRY_PICK, commit_tag], stdout=subprocess.PIPE)
|
||||
|
||||
# Switch back to the original branch
|
||||
subprocess.call([GIT_CHECKOUT, current_branch])
|
||||
}}}
|
88
trac_wiki_export/wiki_dir/GitRepo
Normal file
88
trac_wiki_export/wiki_dir/GitRepo
Normal file
@ -0,0 +1,88 @@
|
||||
= Git Source Code Repository =
|
||||
|
||||
Deluge's source code is always available through our [http://git.deluge-torrent.org/deluge Git repository].
|
||||
|
||||
To get a copy of the code, you will need to clone it from the repository then see the [wiki:'Installing/Source' Installation Guide].
|
||||
|
||||
For more in-depth git usage see GitTips.
|
||||
|
||||
This guide uses commands which are meant to be typed at a command prompt, but most will be available from a GUI Git client.
|
||||
|
||||
[http://git-scm.com/downloads Install Git]
|
||||
|
||||
|
||||
|
||||
== Deluge Branches ==
|
||||
There are multiple branches or tags that you can choose from which contain different stages of the Deluge code.
|
||||
|
||||
Note that we are currently transitioning to a different [http://nvie.com/posts/a-successful-git-branching-model/ git workflow] with the development of ''1.4'' so picking the correct branch is crucial.
|
||||
|
||||
The current branches (at time of writing) are:
|
||||
|
||||
'''`1.3-stable`'''::
|
||||
This is the release branch for the 1.3-series and, until 1.4 release, is the recommended stable code. This branch is only for critical bug fixes and no new feature will appear in this branch.
|
||||
'''`master`'''::
|
||||
'''''This branch is in limbo until 1.4 release''''' This branch contains development code that is now continued in `develop`. When the `develop` code is considered stable, 1.4 will be released and the code will be merged back into `master` code. This mean going forward from 1.4 release this branch will be considered to be the most stable code, replacing the use of *-stable branches.
|
||||
'''`develop`'''::
|
||||
All development work will be put into this branch and should be considered unstable with risk of data loss and potential incompatibility with other Deluge versions.
|
||||
'''`extjs4-port`'''::
|
||||
A branch for porting the WebUI code from `Ext JS 3.4` to `Ext JS 4`, still requiring a lot of development work.
|
||||
|
||||
== Initial Clone ==
|
||||
|
||||
The first step is to clone our git repos:
|
||||
|
||||
{{{
|
||||
git clone git://deluge-torrent.org/deluge.git
|
||||
}}}
|
||||
|
||||
This will create a ''deluge'' directory with a copy of the repo so if you change into this directory you can start using git commands.
|
||||
|
||||
|
||||
== Select Branch ==
|
||||
|
||||
List the branches, including remote branches:
|
||||
|
||||
{{{
|
||||
git branch -a
|
||||
}}}
|
||||
|
||||
== Switch Branch ==
|
||||
|
||||
If you want to use a different branch than the default selected (`master`) then you will need to create a local copy of the remote branch. In this example we create branch '1.3-stable' as a local copy of the remote branch 'origin/1.3-stable' and switch to it:
|
||||
|
||||
{{{
|
||||
git checkout -b 1.3-stable origin/1.3-stable
|
||||
}}}
|
||||
|
||||
To switch between your local branches use the following commands:
|
||||
|
||||
'''Development:'''
|
||||
{{{
|
||||
git checkout develop
|
||||
}}}
|
||||
|
||||
'''Stable:'''
|
||||
{{{
|
||||
git checkout 1.3-stable
|
||||
}}}
|
||||
|
||||
== Show current Branch ==
|
||||
Either of these commands will show the current branch you are using:
|
||||
|
||||
{{{
|
||||
git branch
|
||||
git status
|
||||
}}}
|
||||
|
||||
|
||||
== Updating ==
|
||||
|
||||
You only need to do a clone once, after that you can simply update the branch by ''pulling'' changes from the repo.
|
||||
|
||||
Assuming you are in the folder you cloned to:
|
||||
{{{
|
||||
git pull
|
||||
}}}
|
||||
|
||||
Now your tree is synchronized to the latest revision in our repository!
|
217
trac_wiki_export/wiki_dir/GitTips
Normal file
217
trac_wiki_export/wiki_dir/GitTips
Normal file
@ -0,0 +1,217 @@
|
||||
= Git Tips =
|
||||
|
||||
[[PageOutline(2,Tips,inline)]]
|
||||
|
||||
This page is a collection of useful git tips.
|
||||
|
||||
== Merge a feature branch ==
|
||||
|
||||
In this example we assume that your feature branch, `myfeature`, is based off `develop` and that you are currently in your feature branch.
|
||||
|
||||
1. Squash/reword/edit any commits if need be
|
||||
{{{
|
||||
#!sh
|
||||
git rebase -i develop
|
||||
}}}
|
||||
1. Rebase your feature branch on top of current develop
|
||||
{{{
|
||||
#!sh
|
||||
git rebase develop
|
||||
}}}
|
||||
1. Change to develop
|
||||
{{{
|
||||
#!sh
|
||||
git checkout develop
|
||||
}}}
|
||||
1. `Fast-forward` merge your feature branch into develop
|
||||
{{{
|
||||
#!sh
|
||||
git merge myfeature
|
||||
}}}
|
||||
1. Delete your local feature branch (see above tip for remote deletion)
|
||||
{{{
|
||||
#!sh
|
||||
git branch -d myfeature
|
||||
}}}
|
||||
|
||||
== Ignore changes in a tracked file ==
|
||||
|
||||
To ignore:
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
git update-index --assume-unchanged <tracked-file>
|
||||
}}}
|
||||
|
||||
To stop ignoring:
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
git update-index --no-assume-unchanged <ignored-tracked-file>
|
||||
}}}
|
||||
|
||||
== Undo the last commit ==
|
||||
''Changes are put back into staged''
|
||||
{{{
|
||||
#!sh
|
||||
git reset --soft HEAD~1
|
||||
}}}
|
||||
|
||||
|
||||
== Delete the last commit ==
|
||||
''All changes are lost! ''
|
||||
{{{
|
||||
#!sh
|
||||
git reset --hard HEAD~1
|
||||
}}}
|
||||
|
||||
== Stash untracked files ==
|
||||
|
||||
At times you will be working on a branch with untracked files (new files) and you'll need to checkout master to apply a bug fix.
|
||||
|
||||
First, add the untracked files to the index:
|
||||
{{{
|
||||
#!sh
|
||||
git add <untracked-files>
|
||||
}}}
|
||||
|
||||
Now do a regular stash:
|
||||
{{{
|
||||
#!sh
|
||||
git stash
|
||||
}}}
|
||||
|
||||
At this point you can checkout whatever branch you want and do what you need to do. When you're done, checkout your original working branch again and pop the changes from your stash:
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
git stash pop
|
||||
}}}
|
||||
|
||||
You can remove the files you indexed from the index if you want, as to not pollute your next commit:
|
||||
{{{
|
||||
#!sh
|
||||
git rm --cached <files>
|
||||
}}}
|
||||
|
||||
== Merge a remote branch ==
|
||||
|
||||
First, add the repo:
|
||||
{{{
|
||||
#!sh
|
||||
git remote add <reponame> <location>
|
||||
}}}
|
||||
|
||||
Now fetch in the changes:
|
||||
{{{
|
||||
#!sh
|
||||
git fetch <reponame>
|
||||
}}}
|
||||
|
||||
You'll want to do a diff against your branch to see what will be merged:
|
||||
{{{
|
||||
#!sh
|
||||
git diff master <reponame>/<branch>
|
||||
}}}
|
||||
|
||||
If you're happy with the changes, go ahead and merge it:
|
||||
{{{
|
||||
#!sh
|
||||
git merge <reponame>/<branch>
|
||||
}}}
|
||||
|
||||
|
||||
== Delete a remote branch ==
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
git push <repo> :<branch>
|
||||
}}}
|
||||
|
||||
or
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
git push --delete <repo> <branch>
|
||||
}}}
|
||||
|
||||
== Apply a commit to multiple branches with cherry-pick ==
|
||||
|
||||
This technique uses cherry-pick to apply commits to branches that differ too much to use `merge`.
|
||||
|
||||
1. Checkout `master` branch
|
||||
{{{
|
||||
#!sh
|
||||
git checkout master
|
||||
}}}
|
||||
1. Make commit
|
||||
{{{
|
||||
#!sh
|
||||
git commit -m "Fixed the bug that caused issue xyz"
|
||||
}}}
|
||||
1. Checkout stable branch
|
||||
{{{
|
||||
#!sh
|
||||
git checkout stable
|
||||
}}}
|
||||
1. Apply the last commit from master to this branch
|
||||
{{{
|
||||
#!sh
|
||||
git cherry-pick master
|
||||
}}}
|
||||
|
||||
== Commit Messages ==
|
||||
{{{
|
||||
#!comment
|
||||
This should probably have it's own page but putting here for now.
|
||||
}}}
|
||||
Based on [http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines git commit guidelines] and [http://chris.beams.io/posts/git-commit/ How to Write a Git Commit Message].
|
||||
|
||||
The short answer on the golden rule for git commit subject lines is to you ask yourself:
|
||||
'''If applied, this commit will...''' ''<your commit subject line here>''[[br]][[br]]
|
||||
e.g. If applied, this commit will {{{Enable editing of torrent names in Add Dialog}}}
|
||||
|
||||
A general guideline on writing a good commit message is to provide information
|
||||
that is not already provided from the commit diff, which in essence is "''the why, not the how''".
|
||||
|
||||
* Explain why the change is necessary
|
||||
* ''After reading the commit message it should should be apparent why the changes were made.''
|
||||
|
||||
* Explain how the issue is addressed in broad terms
|
||||
* ''It is not necessary to explain how the changes are made in detail as that can be seen from the commit diff.''
|
||||
|
||||
Example commit message:
|
||||
|
||||
{{{
|
||||
Short summary of changes (preferably 50 characters or less)
|
||||
|
||||
More detailed explanatory text, if necessary. Wrap it to about 72
|
||||
characters or so. The first line can be considered as the subject of an
|
||||
email and the rest of the text as the body. The blank line separating
|
||||
the summary from the body is critical, unless you omit the body entirely.
|
||||
|
||||
Further paragraphs come after blank lines.
|
||||
|
||||
- Bullet points are okay, too
|
||||
|
||||
- Typically a hyphen or asterisk is used for the bullet, preceded by a
|
||||
single space, with blank lines in between, but conventions vary here
|
||||
}}}
|
||||
|
||||
=== Tags / Labels ===
|
||||
To differentiate commit changes at a glance, the subject of commits for specific components should be prefixed with relevant tags/labels, such as:
|
||||
''Core'', ''WebUI'', ''GTKUI'', ''Tests'', ''Packaging'', ''Console'', ''Blocklist'', ''Lint'' etc. (see git logs for more examples)
|
||||
|
||||
{{{[GTKUI] Enable editing of torrent names in Add Dialog}}}
|
||||
|
||||
If the commit fix/closes a ticket, include the number:
|
||||
|
||||
{{{[#1001] Add support for magnet uris}}}
|
||||
|
||||
A limited number of tags may be combined, such as
|
||||
|
||||
{{{[#1002] [GTKUI] Fix the files tab context menu not being displayed}}}
|
||||
|
||||
{{{[#2250] [Core] [GTKUI] Add method remove_torrents to core}}}
|
||||
|
||||
|
7
trac_wiki_export/wiki_dir/Installing
Normal file
7
trac_wiki_export/wiki_dir/Installing
Normal file
@ -0,0 +1,7 @@
|
||||
= Installing Deluge =
|
||||
|
||||
There are various options for installing Deluge. You can either install the appropriate packaged release or executable for your operating system, or you can build Deluge from source code.
|
||||
|
||||
Generally, if a package is available for your system it is best to use it rather than build from source.
|
||||
|
||||
[[TitleIndex(Installing/, hideprefix, depth=0)]]
|
42
trac_wiki_export/wiki_dir/Installing%2FFreeBSD
Normal file
42
trac_wiki_export/wiki_dir/Installing%2FFreeBSD
Normal file
@ -0,0 +1,42 @@
|
||||
= Installing Deluge On FreeBSD =
|
||||
|
||||
Deluge (1.3.x) is available in [http://www.freshports.org/net-p2p/deluge/ Freshports], with dependencies correctly identified and also stable.
|
||||
|
||||
== Install package with GTK2 client ==
|
||||
|
||||
{{{
|
||||
pkg add deluge
|
||||
}}}
|
||||
|
||||
== Install package for headless setups ==
|
||||
|
||||
{{{
|
||||
pkg add deluge-cli
|
||||
}}}
|
||||
|
||||
|
||||
== Install from Ports ==
|
||||
|
||||
For desktop use (X11):
|
||||
{{{
|
||||
cd /usr/ports/net-p2p/deluge && make install clean
|
||||
}}}
|
||||
|
||||
Or using portmaster:
|
||||
{{{
|
||||
portmaster net-p2p/deluge
|
||||
}}}
|
||||
|
||||
''Note: The above commands should work correctly to install UI and Daemon components on FreeBSD 7.2 or later, installing the Python/Boost dependencies as required.''
|
||||
|
||||
----
|
||||
|
||||
For headless setups (no X11):
|
||||
{{{
|
||||
cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes install clean
|
||||
}}}
|
||||
and disable GTK2 in the port configuration options.
|
||||
|
||||
''Note: Option WITHOUT_X11="YES" can also be set globally (for all port builds) in /etc/make.conf. As of (at least) FreeBSD-9.1, WITHOUT_X11 is deprecated and use of OPTIONS_UNSET=X11 in make.conf is advised instead (and should probably be preferred for versions that support it.''
|
||||
|
||||
|
13
trac_wiki_export/wiki_dir/Installing%2FLinux
Normal file
13
trac_wiki_export/wiki_dir/Installing%2FLinux
Normal file
@ -0,0 +1,13 @@
|
||||
= Installing Deluge On Linux =
|
||||
|
||||
To install Deluge on Linux, head to the [wiki:Download downloads page] and select the distribution you use.
|
||||
|
||||
If you are using a 32 bit computer and operating system, you will need to select the package for i386 systems.
|
||||
|
||||
If you are using a 64 bit computer and operating system, select the package for x86_64 systems.
|
||||
|
||||
Once you have found the correct package for your system, download it to a convenient location on your computer. On most systems you can install the package simply by double-clicking on the downloaded file to open it with your distribution's package management software and following the on-screen instructions.
|
||||
|
||||
You may also want to check out the user guides for installing Deluge on specific distributions:
|
||||
|
||||
[[TitleIndex(Installing/Linux/, hideprefix, depth=0)]]
|
1
trac_wiki_export/wiki_dir/Installing%2FLinux%2FDebian
Normal file
1
trac_wiki_export/wiki_dir/Installing%2FLinux%2FDebian
Normal file
@ -0,0 +1 @@
|
||||
[[TitleIndex(Installing/Linux/Debian/)]]
|
@ -0,0 +1,50 @@
|
||||
= Debian Jessie =
|
||||
|
||||
Install using the default package version of Deluge (this means you won't get an up to date version, but it'll be updated automatically with your system)
|
||||
|
||||
== Install Deluge (GUI) ==
|
||||
{{{
|
||||
apt-get install deluge
|
||||
}}}
|
||||
|
||||
== Install (headless/server) ==
|
||||
|
||||
{{{
|
||||
apt-get install deluged deluge-web
|
||||
}}}
|
||||
|
||||
|
||||
== Deluge Launchpad PPA ==
|
||||
|
||||
Install using the Deluge Ubuntu Launchpad PPA which contains the latest releases of Deluge and libtorrent.
|
||||
|
||||
{{{
|
||||
add-apt-repository 'deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu trusty main'
|
||||
}}}
|
||||
|
||||
'''OR''' (if command not recognized)paste the below lines in /etc/apt/sources.list
|
||||
{{{
|
||||
#Deluge PPA
|
||||
deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu trusty main
|
||||
deb-src http://ppa.launchpad.net/deluge-team/ppa/ubuntu trusty main
|
||||
}}}
|
||||
|
||||
[[BR]]
|
||||
[[BR]]
|
||||
|
||||
Update and install
|
||||
{{{
|
||||
apt-get update
|
||||
apt-get install -t trusty deluged deluge-web
|
||||
}}}
|
||||
|
||||
To upgrade libtorrent:
|
||||
{{{
|
||||
apt-get install -t trusty libtorrent-rasterbar8 python-libtorrent
|
||||
}}}
|
||||
|
||||
For config and systemd service setup see [wiki:UserGuide/InitScript/systemd] and [wiki:UserGuide/ThinClient].
|
||||
|
||||
For `'add-apt-repository: command not found:` install `software-properties-common`.
|
||||
|
||||
|
107
trac_wiki_export/wiki_dir/Installing%2FLinux%2FDebian%2FLenny
Normal file
107
trac_wiki_export/wiki_dir/Installing%2FLinux%2FDebian%2FLenny
Normal file
@ -0,0 +1,107 @@
|
||||
= Debian Lenny =
|
||||
|
||||
Installing a recent version of deluge (1.3.0) on Lenny can be done relatively easily.
|
||||
|
||||
However, it involves fetching a few packages from testing so be careful. Though this usually can be done without causing any problems it might interfere with other stuff on your system.
|
||||
|
||||
'''You have been warned.'''
|
||||
|
||||
The first thing we need to do is add testing to {{{/etc/apt/sources.list}}}:
|
||||
{{{
|
||||
deb http://ftp.nl.debian.org/debian/ squeeze main contrib non-free
|
||||
deb-src http://ftp.nl.debian.org/debian/ squeeze main contrib non-free
|
||||
}}}
|
||||
|
||||
Then we need to tell {{{apt}}} that even though we like testing, we do not want our packages taken form testing unless it's explicitly being told to do so (otherwise apt will just upgrade you to testing/Squeeze).
|
||||
Create the file {{{/etc/apt/preferences}}}:
|
||||
{{{
|
||||
Package: *
|
||||
Pin: release a=stable
|
||||
Pin-Priority: 700
|
||||
|
||||
Package: *
|
||||
Pin: release a=testing
|
||||
Pin-Priority: 650
|
||||
}}}
|
||||
|
||||
Now refresh apt:
|
||||
{{{
|
||||
apt-get update
|
||||
}}}
|
||||
|
||||
Now we're going to have to use {{{aptitude}}} for it to automatically resolve some dependency troubles as we're going to need to install newer version of some things that already are on your system:
|
||||
{{{
|
||||
aptitude install python-libtorrent
|
||||
|
||||
[a lot of output from aptitude now follows]
|
||||
|
||||
Reading package lists... Done
|
||||
Building dependency tree
|
||||
Reading state information... Done
|
||||
Reading extended state information
|
||||
Initializing package states... Done
|
||||
Writing extended state information... Done
|
||||
Reading task descriptions... Done
|
||||
The following packages are BROKEN:
|
||||
libtorrent-rasterbar5 python-libtorrent
|
||||
The following NEW packages will be installed:
|
||||
file{a} libboost-filesystem1.42.0{a} libboost-python1.42.0{a} libboost-system1.42.0{a} libboost-thread1.42.0{a} libdb4.5{a} libmagic1{a} libsqlite3-0{a} mime-support{a}
|
||||
python{a} python-minimal{a} python2.5{a} python2.5-minimal{a}
|
||||
0 packages upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
|
||||
Need to get 7962kB of archives. After unpacking 28.2MB will be used.
|
||||
The following packages have unmet dependencies:
|
||||
libtorrent-rasterbar5: Depends: libgeoip1 (>= 1.4.7~beta3+dfsg) but it is not installable
|
||||
Depends: libssl0.9.8 (>= 0.9.8m-1) but 0.9.8g-15+lenny8 is installed.
|
||||
Depends: libstdc++6 (>= 4.4.0) but 4.3.2-1.1 is installed.
|
||||
python-libtorrent: Depends: libssl0.9.8 (>= 0.9.8m-1) but 0.9.8g-15+lenny8 is installed.
|
||||
Depends: libstdc++6 (>= 4.4.0) but 4.3.2-1.1 is installed.
|
||||
Depends: python-support (>= 0.90.0) but it is not installable
|
||||
The following actions will resolve these dependencies:
|
||||
|
||||
Install the following packages:
|
||||
gcc-4.4-base [4.4.5-2 (testing)]
|
||||
geoip-database [1.4.7~beta6+dfsg-1 (testing)]
|
||||
libgeoip1 [1.4.7~beta6+dfsg-1 (testing)]
|
||||
python-support [1.0.10 (testing)]
|
||||
|
||||
Upgrade the following packages:
|
||||
libssl0.9.8 [0.9.8g-15+lenny8 (stable, stable, now) -> 0.9.8o-2 (testing)]
|
||||
libstdc++6 [4.3.2-1.1 (stable, now) -> 4.4.5-2 (testing)]
|
||||
|
||||
Score is 39
|
||||
|
||||
Accept this solution? [Y/n/q/?] Y
|
||||
|
||||
The following NEW packages will be installed:
|
||||
file{a} gcc-4.4-base{a} geoip-database{a} libboost-filesystem1.42.0{a} libboost-python1.42.0{a} libboost-system1.42.0{a} libboost-thread1.42.0{a} libdb4.5{a} libgeoip1{a}
|
||||
libmagic1{a} libsqlite3-0{a} libtorrent-rasterbar5{a} mime-support{a} python{a} python-libtorrent python-minimal{a} python-support{a} python2.5{a} python2.5-minimal{a}
|
||||
The following packages will be upgraded:
|
||||
libssl0.9.8 libstdc++6
|
||||
2 packages upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
|
||||
Need to get 14.5MB of archives. After unpacking 34.8MB will be used.
|
||||
Do you want to continue? [Y/n/?] Y
|
||||
[..]
|
||||
}}}
|
||||
Basically, {{{aptitude}}} found a solution to our problem, it's going to upgrade the necessary packages with packages from testing as to meet the dependencies for {{{python-libtorrent}}} which we're going to need later.
|
||||
|
||||
Now it's time to add yet another repository with the packages necessary to get deluge, so add the following to {{{/etc/apt/sources.list}}}:
|
||||
{{{
|
||||
deb http://ppa.launchpad.net/ferramroberto/linuxfreedomlucid/ubuntu lucid main
|
||||
deb-src http://ppa.launchpad.net/ferramroberto/linuxfreedomlucid/ubuntu lucid main
|
||||
}}}
|
||||
|
||||
Then, lets fetch and add the GPG key for that repository in order to be able to verify the downloaded packages:
|
||||
{{{
|
||||
apt-key adv --recv-keys --keyserver pgp.surfnet.nl 249AD24C
|
||||
}}}
|
||||
|
||||
Refresh apt:
|
||||
{{{
|
||||
apt-get update
|
||||
}}}
|
||||
|
||||
Install deluge, for example:
|
||||
{{{
|
||||
apt-get install -t lucid deluge
|
||||
}}}
|
||||
|
@ -0,0 +1,73 @@
|
||||
= Debian Squeeze =
|
||||
|
||||
If you require the latest version of Deluge than what is currently in the Squeeze repository, there are two options open to you:
|
||||
|
||||
== Unstable Repository ==
|
||||
|
||||
This method installs the latest Deluge version by using the Debian unstable distribution repository.
|
||||
|
||||
First add unstable to your `/etc/apt/sources.list`:
|
||||
{{{
|
||||
deb http://ftp.us.debian.org/debian unstable main
|
||||
deb-src http://ftp.us.debian.org/debian unstable main
|
||||
}}}
|
||||
''Note: You should use your local country mirror, eg `ftp.uk.debian.org`, `ftp.fr.debian.org` etc.''
|
||||
|
||||
Next set the priority for each distribution so that only packages you specify are from unstable, not your whole system.
|
||||
|
||||
Edit `/etc/apt/preferences`
|
||||
{{{
|
||||
Package: *
|
||||
Pin: release o=Debian,a=squeeze
|
||||
Pin-Priority: 900
|
||||
|
||||
Package: *
|
||||
Pin: release o=Debian,a=unstable
|
||||
Pin-Priority: 300
|
||||
|
||||
Package: *
|
||||
Pin: release o=Debian
|
||||
Pin-Priority: -1
|
||||
}}}
|
||||
|
||||
Update your packages list:
|
||||
{{{
|
||||
aptitude update
|
||||
}}}
|
||||
|
||||
Now install the version of Deluge available in unstable:
|
||||
{{{
|
||||
aptitude -t unstable install deluge
|
||||
}}}
|
||||
|
||||
|
||||
== Deluge Launchpad PPA ==
|
||||
The alternative to using Debian unstable involves using the Deluge Launchpad PPA for Ubuntu Maverick as the release is old enough to not get any unmet dependencies when installed on Squeeze.
|
||||
|
||||
''This method does not work for Lenny as it depends on a package that doesn't exist, see [wiki:Installing/Linux/Debian/Lenny Installing Lenny]''
|
||||
|
||||
Add PPA to your `/etc/apt/sources.list`:
|
||||
{{{
|
||||
deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu maverick main
|
||||
deb-src http://ppa.launchpad.net/deluge-team/ppa/ubuntu maverick main
|
||||
}}}
|
||||
|
||||
Add repository GPG key to verify the downloaded packages:
|
||||
{{{
|
||||
apt-key adv --recv-keys --keyserver pgp.surfnet.nl 249AD24C
|
||||
}}}
|
||||
|
||||
Refresh apt:
|
||||
{{{
|
||||
apt-get update
|
||||
}}}
|
||||
|
||||
Install Deluge:
|
||||
{{{
|
||||
apt-get install -t maverick deluge-common deluged deluge-web
|
||||
}}}
|
||||
|
||||
To also upgrade libtorrent to 0.15:
|
||||
{{{
|
||||
apt-get install -t maverick libtorrent-rasterbar6 python-libtorrent
|
||||
}}}
|
@ -0,0 +1,26 @@
|
||||
= Debian Wheezy =
|
||||
|
||||
== Deluge Launchpad PPA ==
|
||||
One of the simplest methods to getting the latest Deluge version is from the Deluge Launchpad PPA. Ubuntu Precise release repo will be used as this is based upon Debian Wheezy.
|
||||
|
||||
Add the deluge-team PPA:
|
||||
{{{
|
||||
add-apt-repository 'deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu precise main'
|
||||
}}}
|
||||
|
||||
Refresh apt:
|
||||
{{{
|
||||
apt-get update
|
||||
}}}
|
||||
|
||||
Install Deluge:
|
||||
{{{
|
||||
apt-get install -t precise deluge-common deluged deluge-web deluge-console
|
||||
}}}
|
||||
|
||||
|
||||
Upgrading libtorrent:
|
||||
|
||||
http://dev.deluge-torrent.org/wiki/Building/libtorrent#UbuntuDebian
|
||||
|
||||
There is a boost issue using libtorrent from the PPA so building from source is the only viable option.
|
37
trac_wiki_export/wiki_dir/Installing%2FLinux%2FUbuntu
Normal file
37
trac_wiki_export/wiki_dir/Installing%2FLinux%2FUbuntu
Normal file
@ -0,0 +1,37 @@
|
||||
= Ubuntu Install Guide =
|
||||
|
||||
[[PageOutline(2,,inline)]]
|
||||
|
||||
== Install Deluge ==
|
||||
|
||||
'''Software Centre''':
|
||||
[http://apt.ubuntu.com/p/deluge Deluge]
|
||||
|
||||
|
||||
'''GUI install from Terminal:'''
|
||||
{{{
|
||||
sudo apt-get install deluge
|
||||
}}}
|
||||
|
||||
|
||||
'''Headless install from Terminal:'''
|
||||
{{{
|
||||
sudo apt-get install deluged deluge-web deluge-console
|
||||
}}}
|
||||
|
||||
Although Deluge is included in the official [http://packages.ubuntu.com/search?keywords=deluge-torrent Ubuntu repositories] it may be out of date. To ensure you are using the latest version use the [wiki:Installing/Linux/Ubuntu#AddDelugePPARepository PPA Repository], see the steps below.
|
||||
|
||||
=== Deluge PPA Repository ===
|
||||
The [https://launchpad.net/~deluge-team/+archive/stable Deluge PPA] contains the latest Deluge releases for Ubuntu.
|
||||
|
||||
{{{
|
||||
sudo add-apt-repository ppa:deluge-team/stable
|
||||
sudo apt-get update
|
||||
sudo apt-get install deluge
|
||||
}}}
|
||||
|
||||
== Removing ==
|
||||
|
||||
{{{
|
||||
sudo apt-get remove deluge
|
||||
}}}
|
85
trac_wiki_export/wiki_dir/Installing%2FMacOSX
Normal file
85
trac_wiki_export/wiki_dir/Installing%2FMacOSX
Normal file
@ -0,0 +1,85 @@
|
||||
= Installing Deluge on Mac OSX =
|
||||
|
||||
== Deluge.app ==
|
||||
|
||||
A Deluge.app package is available for [http://download.deluge-torrent.org/mac_osx/ download]
|
||||
|
||||
----
|
||||
|
||||
== !MacPorts ==
|
||||
|
||||
These instructions and [https://www.macports.org/ports.php?by=name&substr=deluge portfile] work on OSX Snow Leopard 10.6 & Lion 10.7 with Deluge 1.3.x. They also assume a clean install of OSX (no XQuartz, Darwine, Winebottler, or !MacPorts / Fink installed).
|
||||
|
||||
This methodology is time consuming, but less error-prone for the uninitiated. It will take a few hours normally to download and compile along with using several gigabytes of disk-space.
|
||||
|
||||
|
||||
=== Prerequisites ===
|
||||
|
||||
Download and install:
|
||||
|
||||
* Xcode from App Store
|
||||
* [http://www.macports.org MacPorts] ''(v2.0.3 as of writing)''
|
||||
|
||||
=== Installation ===
|
||||
|
||||
There are two interface options when installing Deluge, one is to use '''X11''', the other '''Quartz-GTK'''. `X11` is the ''classic'' Linux interface, while `Quartz-GTK` uses the native OSX interface. The `Quartz-GTK` is faster and looks better but is a bit more error prone, so it is up to you.
|
||||
|
||||
Open Terminal (under Utilities) and all the following steps will be done from here.
|
||||
|
||||
==== X11 Interface ====
|
||||
{{{
|
||||
#!sh
|
||||
sudo port install deluge
|
||||
}}}
|
||||
|
||||
==== Quartz-GTK Interface ====
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
sudo port install deluge +no_x11 +quartz
|
||||
}}}
|
||||
|
||||
=== Start Deluge ===
|
||||
|
||||
1. Open Terminal, assuming port is in your path (/opt/local/bin)
|
||||
1. Start deluged daemon:
|
||||
{{{
|
||||
#!sh
|
||||
deluged-2.7 &
|
||||
}}}
|
||||
1. Start deluge interface:
|
||||
{{{
|
||||
#!sh
|
||||
deluge-2.7 &
|
||||
}}}
|
||||
|
||||
=== Optional Steps ===
|
||||
|
||||
==== GTK Engines ====
|
||||
To get a better looking interface, you can install gtk-engines2 (or others [http://www.macports.org/ports.php?by=name&substr=engine GTK engines]) :
|
||||
{{{
|
||||
#!sh
|
||||
sudo port install gtk-engines2
|
||||
}}}
|
||||
|
||||
Then set you preferred engine (clearlooks in this case, which is nice)
|
||||
{{{
|
||||
#!sh
|
||||
echo 'gtk-theme-name = "Clearlooks"' | sudo tee /opt/local/etc/gtk-2.0/gtkrc
|
||||
}}}
|
||||
|
||||
==== Language ====
|
||||
If you prefer english version (or any other language) you can launch deluge using the following:
|
||||
{{{
|
||||
#!sh
|
||||
export LANG=en_US && deluge-gtk-2.7 &
|
||||
}}}
|
||||
|
||||
Or alternatively, you can use an alias (in your bash profile, zshrc...)
|
||||
{{{
|
||||
#!sh
|
||||
alias deluge='export LANG=en_US && deluge-gtk-2.7 &'
|
||||
}}}
|
||||
|
||||
=== More ===
|
||||
More details / help available on forums! in [http://forum.deluge-torrent.org/viewforum.php?f=13 OSX Section] and also in [http://forum.deluge-torrent.org/viewtopic.php?f=13&t=34649 this thread] which initiated that wiki page.
|
109
trac_wiki_export/wiki_dir/Installing%2FSource
Normal file
109
trac_wiki_export/wiki_dir/Installing%2FSource
Normal file
@ -0,0 +1,109 @@
|
||||
{{{
|
||||
#!html
|
||||
<h1 style="text-align: left;">Installing Deluge From Source</h1>
|
||||
}}}
|
||||
|
||||
This is build manual for Deluge 1.3.x. Build manual for 2.0.x version is here: https://deluge.readthedocs.io/en/latest/devguide/tutorials/01-setup.html
|
||||
|
||||
[[PageOutline(1-4,,inline)]]
|
||||
|
||||
= Dependencies =
|
||||
Deluge has a number of dependencies that are required for it to run properly. Most of them are runtime only deps, but a few are required for successfully building Deluge.
|
||||
|
||||
The 1.3.x dependencies are listed below. You will also need to install the appropriate build tools provided by your OS.
|
||||
|
||||
[[Include(http://git.deluge-torrent.org/deluge/plain/DEPENDS?h=1.3-stable, text/x-trac-wiki)]]
|
||||
|
||||
|
||||
== Debian & Ubuntu Dependencies ==
|
||||
Apt-get line to install all above dependencies:
|
||||
{{{
|
||||
sudo apt-get install python python-twisted python-openssl python-setuptools intltool python-xdg python-chardet geoip-database python-libtorrent python-notify python-pygame python-glade2 librsvg2-common xdg-utils python-mako
|
||||
}}}
|
||||
|
||||
== Windows Dependencies ==
|
||||
|
||||
Python dependencies should be '''py2.7''' and '''win32''' (32-bit)''
|
||||
|
||||
* '''[http://www.python.org/download/ Python 2.7]''' ''(Select `Add python.exe to path` when Installing)''
|
||||
* '''[http://sourceforge.net/projects/libtorrent/files/py-libtorrent/ python-libtorrent]'''
|
||||
* '''[https://indy.fulgan.com/SSL/?C=M;O=D openssl-1.0.*-i386-win32]''' ''(`copy to system32`)''
|
||||
* '''[http://www.pygtk.org/downloads.html PyGTK All-in-one]'''
|
||||
|
||||
After ''Python'' is installed, use ''pip'' to install the following from console:
|
||||
{{{
|
||||
pip install twisted[tls] chardet mako pyxdg pillow slimit pypiwin32 pygame certifi
|
||||
}}}
|
||||
|
||||
== libtorrent (rasterbar) ==
|
||||
|
||||
For those advanced cases where you need to build and install [http://libtorrent.org/ libtorrent] from source, follow this guide: [wiki:Building/libtorrent]
|
||||
|
||||
= Download Source =
|
||||
You can either get the source from a tarball on our [http://download.deluge-torrent.org/source/?C=M;O=D ftp] or from our GitRepo.
|
||||
|
||||
= Building and Installing =
|
||||
Extract the source tarball and in the extracted folder run the build command:
|
||||
{{{
|
||||
python setup.py build
|
||||
}}}
|
||||
|
||||
Install the package to your system:
|
||||
{{{
|
||||
sudo python setup.py install
|
||||
}}}
|
||||
* ''Debian & Ubuntu: Append `--install-layout=deb` to use `/usr/bin/` prefix instead of Debian default `/usr/bin/local/`.''
|
||||
* ''Microsoft Windows: Omit `sudo` prefix.''
|
||||
|
||||
For Linux Desktop systems an extra step is required due to an installer [http://dev.deluge-torrent.org/ticket/1389 bug] not copying data files, such as `deluge.desktop`:
|
||||
|
||||
{{{
|
||||
sudo python setup.py install_data
|
||||
}}}
|
||||
|
||||
If you have run the build before, ensure you have a clean build environment:
|
||||
{{{
|
||||
python setup.py clean -a
|
||||
}}}
|
||||
|
||||
== Developer Install ==
|
||||
|
||||
Installing Deluge with `develop` mode creates binaries that link back to source code. Therefore changes will be reflected immediately with no need to repeatedly install.
|
||||
{{{
|
||||
python setup.py develop
|
||||
}}}
|
||||
|
||||
If you wish to use a specific development directory, the following will create a Deluge install in ~/delugeDev:
|
||||
{{{
|
||||
export PYTHONPATH=${HOME}/delugeDev
|
||||
python setup.py develop --install-dir ~/delugeDev
|
||||
}}}
|
||||
|
||||
Do have the included plugins available, build them with
|
||||
{{{
|
||||
python setup.py build_plugins develop
|
||||
}}}
|
||||
|
||||
Another alternative for a separate Deluge development environment is to use Python [http://pypi.python.org/pypi/virtualenv Virtualenv]
|
||||
|
||||
= Removing From System =
|
||||
In the unlikely event you want to remove Deluge installed by the previous method, you will have to manually delete the Deluge related files on your system. The main files are normally installed in one of the following places:
|
||||
|
||||
{{{
|
||||
/usr/lib/python2.x/site-packages
|
||||
/usr/local/lib/python2.x/site-packages
|
||||
/usr/lib/python2.x/dist-packages
|
||||
/usr/local/lib/python2.x/dist-packages
|
||||
}}}
|
||||
|
||||
Example:
|
||||
{{{
|
||||
sudo rm -r /usr/lib/python2.7/dist-packages/deluge*
|
||||
}}}
|
||||
|
||||
To find and remove the remaining files use the `locate` command and to ensure up-to date information also run `updatedb`:
|
||||
|
||||
{{{
|
||||
sudo updatedb
|
||||
locate deluge
|
||||
}}}
|
9
trac_wiki_export/wiki_dir/Installing%2FWindows
Normal file
9
trac_wiki_export/wiki_dir/Installing%2FWindows
Normal file
@ -0,0 +1,9 @@
|
||||
= Using the Installer =
|
||||
|
||||
Installing Deluge on Windows is easy using our pre-built installer.
|
||||
|
||||
Download the latest installer from: [http://download.deluge-torrent.org/windows/?C=M;O=D http://download.deluge-torrent.org/windows]
|
||||
|
||||
On Windows the installer installs a standalone application by default into `Program Files` and the bundle includes Python, GTK and all relevant dependencies. The only external requirement that may be not be installed on your system is the [http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en Visual C++ 2008 SP1 Redistributable Package (x86)].
|
||||
|
||||
For the Deluge config location see: [wiki:Faq#WheredoesDelugestoreitssettingsconfig]
|
20
trac_wiki_export/wiki_dir/Plan%2FDocumentation
Normal file
20
trac_wiki_export/wiki_dir/Plan%2FDocumentation
Normal file
@ -0,0 +1,20 @@
|
||||
= Create a UserGuide/Introduction page for Deluge =
|
||||
|
||||
* Describe the main components
|
||||
* An overview diagram
|
||||
|
||||
|
||||
|
||||
= Create individual wiki pages for each UI and the daemon, incorporate the FAQs. =
|
||||
|
||||
* This could be `rst` files stored in git and used to generate the man pages.
|
||||
* [deluged] Additions to daemon such as default error log is created
|
||||
* [gtk] The GTK workaround if IPC files remain on startup
|
||||
|
||||
= Breakup the monolithic FAQ. =
|
||||
|
||||
UI specific FAQs moved to pages detailed above.
|
||||
|
||||
Link and move the FAQ 'Troubleshooting on Windows' questions to Install/Windows under a heading FAQ.
|
||||
|
||||
* The language workaround should be obsolete with 1.4 release.
|
44
trac_wiki_export/wiki_dir/Plan%2FPython3
Normal file
44
trac_wiki_export/wiki_dir/Plan%2FPython3
Normal file
@ -0,0 +1,44 @@
|
||||
= Python 3 Port =
|
||||
|
||||
This page provides more detailed information on porting to Python 3 started in ticket #1328.
|
||||
|
||||
The current consensus is that the core and common files should be prepared for a future Twisted release with full Python 3 support and UI's worked on at a later date.
|
||||
|
||||
== References ==
|
||||
|
||||
It is best to read these other documents on Python 3 porting
|
||||
|
||||
[https://docs.djangoproject.com/en/dev/topics/python3/ Django]
|
||||
[https://wiki.ubuntu.com/Python/3]
|
||||
[https://twistedmatrix.com/trac/wiki/Plan/Python3]
|
||||
|
||||
== Twisted ==
|
||||
Deluge relies on all dependant packages supporting Python 3 with Twisted being the most crucial and support is just about complete: [https://twistedmatrix.com/trac/wiki/Plan/Python3 Twisted Python 3 Plan].
|
||||
|
||||
Another option for Twisted is to remove the use of it in favour of Python 3's [https://docs.python.org/dev/library/asyncio.html asyncio]. This would, of course, remove backwards compatibility with Python 2 and require a lot of work to port to asyncio, but could be worthwhile in the end.
|
||||
|
||||
== 2to3 ==
|
||||
|
||||
Using [http://python-future.org/ python-future] is the best option to convert the code.
|
||||
|
||||
== Required changes ==
|
||||
|
||||
* Magic Method `__cmp__` in `common.py` replaced with `__lt__`
|
||||
* `iteritems()` where needed replace with try/except: http://python3porting.com/differences.html#dictionary-methods
|
||||
|
||||
== Future Imports ==
|
||||
|
||||
`from __future__ import unicode_literals`::
|
||||
Likely to be applied to all files to ensure byte, Unicode string separation
|
||||
|
||||
`from __future__ import division` ''and'' `from __future__ import print_function`::
|
||||
Added to files where required
|
||||
|
||||
`from __future__ import absolute_import`::
|
||||
Should not be required if the imports are properly set up. See: http://python3porting.com/differences.html#imports
|
||||
|
||||
== Compatibility Module ==
|
||||
|
||||
It will be easier and simpler to use either `future` or `six` (see [http://python-future.org/faq.html#what-is-the-relationship-between-future-and-six py-future] docs) to write compatible code.
|
||||
|
||||
|
17
trac_wiki_export/wiki_dir/Plan%2FReleases
Normal file
17
trac_wiki_export/wiki_dir/Plan%2FReleases
Normal file
@ -0,0 +1,17 @@
|
||||
A collection of ideas or improvements for Deluge 2.0 release process:
|
||||
|
||||
|
||||
* Add the following to setup.py:
|
||||
* ~~Should attempt to minify js scripts and inform user if unsuccessful.~~
|
||||
* Update version (and date?) in man files. Eventual view would be to autocreate man files from help options.
|
||||
|
||||
* Changes to `make_release` script:
|
||||
* Use `sdist` to create tarball. This replaces use of git archive as sdist should produce a pristine tar so no need to attempt to modify contents as in current `make_release`.
|
||||
* sdist should be able to produce xz tarball with additional python 2.7 module: https://pypi.python.org/pypi/backports.lzma
|
||||
* Decide whether need to remove the unwanted extra files such as egg-info.
|
||||
* Switch to using just sha256sum for file hash verification and create a `shasums.txt` file.
|
||||
* Simplify number of tarballs provided, so either drop gzip or bzip2 (or both).
|
||||
* ~~Rename lzma tarball to xz.~~
|
||||
* Add `make_release` script to git packaging directory.
|
||||
|
||||
* On the ftp, use a single release version folder for all the tarballs, bundled packages and shasum files.
|
59
trac_wiki_export/wiki_dir/Plan%2Flibtorrent
Normal file
59
trac_wiki_export/wiki_dir/Plan%2Flibtorrent
Normal file
@ -0,0 +1,59 @@
|
||||
This is page is to collate the work that is required to bring the next Deluge version up to date with libtorrent
|
||||
|
||||
= Deluge 1.4.0 milestone and libtorrent 0.16 =
|
||||
|
||||
== Tickets requests for new/missing libtorrent features ==
|
||||
=== Handle/Status ===
|
||||
* [ticket:1903 #1903 super_seeding (handle/status)]
|
||||
* [ticket:607 #607 completed_time (handle)]
|
||||
* [ticket:1294 #1294 seed_mode (add_torrent) flag_seed_mode (status)]
|
||||
* [ticket:1165 #1165 add_url_seed, remove_url_seed (handle)]
|
||||
* [ticket:1206 #1206 set_upload_mode (handle) upload_mode (status) flag_upload_mode (add_torrent)]
|
||||
* [ticket:2347 #2347 orig_files (status)]
|
||||
|
||||
=== Session ===
|
||||
* ~~Use `flush_disk_cache` flag with `save_resume_data` when stopping session~~
|
||||
* [ticket:2122 #2122 listen_on_flags: listen_reuse_address and listen_no_system_port]
|
||||
* [ticket:2133 #2133 listen_on: Change incoming port randomization]
|
||||
* [ticket:2219 #2219 set_i2p_proxy() i2p_proxy()]
|
||||
* ~~[ticket:1337 #1337 make_magnet_uri()]~~
|
||||
|
||||
=== Session_settings ===
|
||||
|
||||
These should be covered by the WiP by gazpachoking to query lt for all available settings.
|
||||
|
||||
* [ticket:2115 #2115 uTP/TCP Enable/Disable]
|
||||
* [ticket:1466 #1466 send_buffer_watermark, send_buffer_watermark_factor]
|
||||
* [ticket:1903 #1903 strict_super_seeding]
|
||||
* [ticket:1384 #1384 announce_ip]
|
||||
* [ticket:2257 #2257 active_dht_limit, active_tracker_limit and active_lsd_limit]
|
||||
* [ticket:2059 #2059 tracker_backoff]
|
||||
* [ticket:1677 #1677 apply_ip_filter_to_trackers (for blocklist)]
|
||||
* [ticket:1395 #1395 announce_to_all_tiers]
|
||||
* [ticket:2472 #2472 anonymous mode]
|
||||
|
||||
=== Alerts ===
|
||||
* [ticket:1466 #1466 performance alert: send_buffer_watermark_too_low]
|
||||
* [ticket:637 #637 storage_moved_alert]
|
||||
* [ticket:2006 #2006 storage_moved_failed_alert]
|
||||
* [ticket:2490 #2490 Support for external_ip_alert]
|
||||
|
||||
= Features for future Deluge releases =
|
||||
* Support SSL Torrents (also see #2195)
|
||||
* [ticket:2196 #2196 piece_deadline (handle)]
|
||||
* ~~Torrent priority with set_priority (handle) priority (status)~~
|
||||
* [ticket:367 #367 Do not store per-torrent settings that are saved in the resume data]
|
||||
* ~~Replace add_torrent with the more efficient non-blocking async_add_torrent.~~
|
||||
|
||||
Notable libtorrent 1.0 [http://sourceforge.net/p/libtorrent/code/HEAD/tree/branches/RC_1_0/ChangeLog Changelog] entries:
|
||||
|
||||
* Support magnet links wrapped in .torrent files (need more details)
|
||||
* Support storing save_path in resume data
|
||||
* Include name, save_path and torrent_file in torrent_status, for improved performance
|
||||
* allow moving files to absolute paths, out of the download directory
|
||||
* ~~add moving_storage field to torrent_status~~
|
||||
* allow force_announce to only affect a single tracker (need more details)
|
||||
|
||||
== Deprecated Functions ==
|
||||
|
||||
To test use libtorrent build with TORRENT_NO_DEPRECATE config.
|
144
trac_wiki_export/wiki_dir/Plugins
Normal file
144
trac_wiki_export/wiki_dir/Plugins
Normal file
@ -0,0 +1,144 @@
|
||||
= Plugins =
|
||||
|
||||
[[PageOutline(2-4,,inline, unnumbered)]]
|
||||
|
||||
|
||||
----
|
||||
|
||||
== Plugins (Included) ==
|
||||
||'''Name'''||'''Description'''||'''WebUI'''||
|
||||
||[wiki:Plugins/AutoAdd AutoAdd]|| Multiple watch folder support ||''Yes''||
|
||||
||[wiki:Plugins/Blocklist Blocklist]|| Download and import IP blocklists ||''Yes''||
|
||||
||[wiki:Plugins/Execute Execute]|| Executes a command upon an event ||''Yes''||
|
||||
||Extractor|| Extracts files upon completion ||''Yes''||
|
||||
||Label|| Assign labels to torrents for custom actions ||''Yes''||
|
||||
||Notification|| Provides Email, Popup, Blink and Sound notifications ||''Yes''||
|
||||
||Scheduler|| Limit Deluge bandwidth depending on schedule ||''Yes''||
|
||||
||[wiki:Plugins/Stats Stats]|| Displays pretty graphs of statistics ||''No''||
|
||||
||WebUI|| Start the web interface from within Deluge ||''Infinite recursion''||
|
||||
||[wiki:Plugins/Toggle Toggle] || Allows the users to set the session to either "paused" or "resumed" ||''No''||
|
||||
|
||||
----
|
||||
|
||||
== Plugins (3rd Party) ==
|
||||
||'''Name'''||'''Description'''||'''WebUI'''||'''Deluge 2.x support'''||
|
||||
||[wiki:Plugins/AutoPriority AutoPriority] || Downloads torrents in alphabetical order ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=41165 AutoShutdown] || Shutdown or hibernate computer when all torrents complete downloading ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=36443 Auto Remove] || Limit the number of inactive torrents that are kept ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=47243 Auto Remove Plus] || Based on Auto Remove but with more features ||'''Yes'''||'''Yes'''||
|
||||
||[https://github.com/Grewfisk/BatchRenamerRegEx/releases Batch Renamer RegEx] || Batch rename files in a torrent using regex search and replace. Fork of Batch Renamer ||''No''||''No''||
|
||||
||[https://github.com/dredkin/deluge-rbb/releases Browse Button] || Browse destination folders in client-server mode ||''No''||'''Yes'''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=47501 CopyMagnetURI] || Copy the magnet URI of the selected torrent(s) to the clipboard ||''No''||''No''||
|
||||
||[https://github.com/stefantalpalaru/deluge-default-trackers Default Trackers] || Add default trackers for all your new torrents ||''No''||'''Yes'''||
|
||||
||[https://github.com/Laharah/deluge-FileBotTool FileBotTool] || Integrates automatic media sorting using [http://www.filebot.net/ FileBot] ||''No''||'''Yes'''||
|
||||
||[wiki:Plugins/IfaceWatch IfaceWatch] || Watch for IP changes on specific interfaces and notify libtorrent ||''No''||'''Yes'''||
|
||||
||[https://github.com/cas--/deluge-ipstatusbar/releases IPstatusbar] || Show the external IP address being listened on in the status bar ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=42629 LabelPlus] || Labeling plugin with additional features ||''No''||'''Yes'''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=42887 ltConfig] || Configure libtorrent settings ||'''Yes'''||'''Yes'''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=54025 MyScheduler] || Scheduler with Force Start ||'''Yes'''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=40769 NetWatcher] || Monitors the local network activity and deciding if pause or resume all torrents. ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=47327 NetWatcher2] || Monitors the local network activity and automatically limits the download speed. ||''No''||''No''||
|
||||
||[wiki:Plugins/Pieces Pieces] || View status and set priority of each individual piece of a torrent ||'''Yes'''||''No''||
|
||||
||[wiki:Plugins/PreventSuspend PreventSuspend] || Prevents computer suspending ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=52115 PreventSuspendPlus] || Prevents computer suspending (inc Windows support) ||'''Yes'''||''No''||
|
||||
||[https://forum.deluge-torrent.org/viewtopic.php?f=9&t=54864 Ratio] || Show total downloads, uploads, and overall share ratio in status bar. ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=38747 Randomize] || Randomizes incoming port based on configurable interval and blocked port check ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=39767 SeedTime] || Pause or remove torrents after they have seeded for a certain amount of time. ||''No''||''No''||
|
||||
||[https://github.com/hrushikesh198/DelugeSequentialDownload SequentialDownload] || Download pieces in sequential order for watching while downloading. ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=40835 Smart Move] || Displays move storage progress in status bar. ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=49679 Streaming] || Stream video or audio directly from Deluge while downloading ||'''Yes'''||'''Yes'''||
|
||||
||[https://github.com/noam09/deluge-telegramer Telegramer] || Receive notifications, add and view torrents using Telegram messenger ||'''Yes'''||'''Yes'''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=53953 textTab] || Displays the contents of a text file in a new tab ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=34025 Total Traffic] || Shows per session & optionally total traffic ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=34343 Traffic Limits] || Pause all torrents if more than a set amount of data is uploaded or downloaded. ||''No''||''No''||
|
||||
||[http://pypi.python.org/pypi/Updatorr/ Updatorr] || Automatic torrents updates for forum-like trackers ||''No''||''No''||
|
||||
||[https://github.com/Laharah/deluge-uTorrentImport uTorrentImport] || a cross platform Deluge plugin to import torrents from uTorrent ||''No''||''No''||
|
||||
||[https://pypi.python.org/pypi/deluge-webapi WebAPI] || Alternative JSON API for WebUI ||'''Yes'''||'''Yes'''||
|
||||
||[wiki:Plugins/YaRSS2 YaRSS2] || An RSS plugin configurable through the GUI ||''No''||'''Yes'''||
|
||||
|
||||
|
||||
=== Unmaintained Plugins ===
|
||||
||'''Name'''||'''Description'''||'''WebUI'''||'''Deluge 2.x support'''||
|
||||
||[wiki:Plugins/XMPPNotify XMPP Notify] || XMPP notify/control bot ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=31553 YaRSS] || Simple RSS plugin for TV Shows ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=35615 Batch Renamer] || Rename multiple files in torrents for tidiness ||''No''||''No''||
|
||||
||[wiki:Plugins/Categorise Categorise] || Moves downloaded torrent to a specific directory depending on type ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=33995 Copy Completed] || Copies completed torrents to another location ||'''Yes'''||''Unknown''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=39173 CopyLimit] || Controls upload "ratio" while downloading based on torrent total size ||''No''||''Unknown''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=28915 Delete Partials] || Deletes partial files left by 'Do not download' ||''No''||''No''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=32315 Growl] || Growl Notifications for completed torrents ||''No''||''Unknown''||
|
||||
||[http://git.nordu.net/?p=lobber-deluge-core.git;a=tree;f=dist LobberCore] || Automatic downloader and core functionality plugin for use with [https://portal.nordu.net/display/LOBBER/Lobber Lobber] ||''No''||''Unknown''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=34001 Managed Pause] || Scheduler that allow you to exclude torrents ||''No''||''Unknown''||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=42623 MoveTools] || Monitor torrent move status ||''No''||''No''||
|
||||
|
||||
|
||||
|
||||
=== Browser Plugins ===
|
||||
'''Chrome'''
|
||||
||[https://chrome.google.com/webstore/detail/gabdloknkpdefdpkkibplcfnkngbidim DelugeSiphon]|| Ultra simple Chrome extension to add torrents via WebUI interface. ||
|
||||
||[https://chrome.google.com/webstore/detail/remote-deluge/epcolmlaegimilnokaddncgmdafacohf Deluge Remote]|| Provides a simple overview of current torrents within Chrome [https://github.com/YodaDaCoda/chrome-deluge-remote (Source Code)]||
|
||||
|
||||
|
||||
'''Firefox'''
|
||||
||[https://addons.mozilla.org/en-US/firefox/addon/delugeaddtorrent/ DelugeAddTorrent] || Send the torrent magnet link to Deluge Web UI [https://github.com/muriloportugal/DelugeAddTorrent (Source Code)] ||
|
||||
||[https://addons.mozilla.org/en-US/firefox/addon/bittorrent-webui-120685/ BitTorrent WebUI+]|| Automatically add torrent/magnet links via WebUI ||
|
||||
||[http://userscripts-mirror.org/scripts/show/79003.html WebUI Quick Add Torrent ] || Uses Greasemonkey to add a clickable icon on webpages for adding torrents via WebUI ||
|
||||
=== Application Plugins ===
|
||||
''Extensions or scripts for applications that enable interaction with Deluge''
|
||||
|
||||
||'''Name'''||'''Description'''||
|
||||
||[https://github.com/Lord-Kamina/Deluge-Magnet-Handler OSX Magnet URI Handler]|| OSX Applescript handler to open magnet URLs in Deluge.app ||
|
||||
||[http://www.rubicode.com/Software/RCDefaultApp/ RCDefaultApp]|| General preference pane to configure default apps, used to link magnet links to Deluge-Magnet-Handler on newer macs ||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=30825 ConkyDeluge]|| Script to display Deluge statistics within Conky ||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=30985 Docky Helper]|| Docky helper that shows transfer rates on the Deluge badge ||
|
||||
||[http://flexget.com/wiki/Plugins/deluge FlexGet Plugin]|| Deluge Plugin for the advanced RSS tool [wiki:Plugins/FlexGet (More Info)] ||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&p=172841#p172841 FileBot Script] || Uses [wiki:Plugins/Execute Execute] plugin to run [http://filebot.sourceforge.net/ FileBot] which renames, categorizes, and finds subtitles and artwork ||
|
||||
||[https://github.com/maziara/deluge-feed-inoreader Inoreader] || Tag the articles in Inoreader and they will be downloaded in Deluge ||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=38957&p=163277 Periscope Subtitle Script] || Uses [wiki:Plugins/Execute Execute] plugin to run a subtitle searching script based around [https://code.google.com/p/periscope/ Periscope] module
|
||||
||[http://www.transdroid.org/download/using-deluge-on-ubuntu/ Transdroid]|| Manage your torrents from your Android device ||
|
||||
||[http://code.google.com/p/deluge-xbmc-plugin/ XBMC Plugin] || Connects via WebUI to display and manipulate the status of torrents within XBMC ||
|
||||
||[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=46529 Plex Script] || Uses [wiki:Plugins/Execute Execute] plugin for managing an automated [https://plex.tv/ Plex Media Server] setup. ||
|
||||
|
||||
----
|
||||
|
||||
|
||||
== Installing Plugin Eggs ==
|
||||
|
||||
=== Determine Python Version ===
|
||||
|
||||
Plugin eggs have the ''Python'' version encoded in the filename and will only load in Deluge if the Python versions match.
|
||||
* Verify Deluge [wiki:Troubleshooting#PythonVersion Python version].
|
||||
|
||||
=== Download ===
|
||||
|
||||
Download the plugin `egg` that matches the Deluge Python version from above, e.g.
|
||||
* ''Plugin-1.0-'''py2.6'''.egg'' is a ''Python 2.6'' egg.
|
||||
* ''Plugin-1.0-'''py2.7'''.egg'' is a ''Python 2.7'' egg.
|
||||
|
||||
For plugins that don't have a specific Deluge Python version available::
|
||||
It is possible to rename an egg to match the Python version (e.g. ''Plugin-1.0-'''py2.6'''.egg'' ''to'' ''Plugin-1.0-'''py2.7'''.egg'') and should still work.
|
||||
|
||||
=== Install ===
|
||||
|
||||
GUI::
|
||||
`Preferences -> Plugins` click `Install plugin`, locate the downloaded plugin `egg` and select it to install.
|
||||
|
||||
Manually::
|
||||
Copy the plugin `egg` to the Deluge [wiki:Faq#WheredoesDelugestoreitssettingsconfig config] `plugins` directory:
|
||||
|
||||
If the Plugin does not show up in the Plugins list then it is likely the incorrect Python version of the plugin has been installed, also see below.
|
||||
==== Client-Server Setups ====
|
||||
|
||||
When running the Deluge daemon, `deluged` and Deluge client on a separate computers, the plugin must be installed on both machines. Installing a plugin egg through the GTK client will copy the egg to both the local plugins directory, as well as the remote daemon's. However if the Python versions on the local machine and remote server do not match, you will have to copy the egg to the remote server manually.
|
||||
|
||||
For example in the setup below you will have to install the py2.6 egg on the local machine but then ''manually'' install the py2.7 egg onto the remote server.
|
||||
|
||||
* Local machine with Python 2.6 running `GTKUI` client.
|
||||
* Remote server with Python 2.7 running `deluged`.
|
||||
|
||||
See [wiki:Plugins#DeterminePythonVersion Determine Python Version] above.
|
||||
|
||||
== Plugin Development ==
|
||||
|
||||
* [wiki:'Development/1.3/Plugin' How to write a Plugin]
|
||||
* [wiki:'Development/PluginIdeas' Plugin Ideas & Suggestions]
|
18
trac_wiki_export/wiki_dir/Plugins%2FAutoAdd
Normal file
18
trac_wiki_export/wiki_dir/Plugins%2FAutoAdd
Normal file
@ -0,0 +1,18 @@
|
||||
= !AutoAdd Plugin =
|
||||
|
||||
This plugin for Deluge 1.2+, adds multiple watch folder support. It supports settings per watch folder, including labels. This plugin comes included with Deluge 1.3+
|
||||
|
||||
Deluge 1.3.4 added magnet support for the watch folder. It supports a text file with a `.magnet` extension containing either single or multiple uris.
|
||||
|
||||
== Download ==
|
||||
|
||||
[http://github.com/gazpachoking/deluge-autoadd-plugin/downloads AutoAdd]
|
||||
|
||||
|
||||
== Discussion/Support ==
|
||||
|
||||
[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=26775 Forum Thread]
|
||||
|
||||
== Source Code ==
|
||||
|
||||
http://github.com/gazpachoking/deluge-autoadd-plugin/
|
30
trac_wiki_export/wiki_dir/Plugins%2FAutoPriority
Normal file
30
trac_wiki_export/wiki_dir/Plugins%2FAutoPriority
Normal file
@ -0,0 +1,30 @@
|
||||
= !AutoPriority Plugin =
|
||||
|
||||
This plugin has the same functionality as the obsolete sequential download script.
|
||||
|
||||
== Download ==
|
||||
[attachment:AutoPriority-0.5.1-py2.6.egg AutoPriority-0.5.1-py2.6]
|
||||
|
||||
== Features ==
|
||||
|
||||
It sets the files priorities of all torrents matching a specific label so that files which names come first in an alphabetical listing are downloaded first. The priority of files set to "Do Not Download" is not changed.
|
||||
|
||||
== Configuration ==
|
||||
|
||||
The amount of files set to "Highest Priority" and "High Priority" is configurable.
|
||||
This plugin depends on the Label plugin currently shipped with deluge. The Label plugin needs to be loaded first before activating !AutoPriority.
|
||||
|
||||
To use !AutoPriority for all non-labelled torrents, just leave ''"Preferences -> !AutoPriority --> Label of torrents to process"'' setting blank.
|
||||
|
||||
To use !AutoPriority for a label only, set a name to ''"Preferences -> !AutoPriority --> Label of torrents to process"'' setting, then create a label and set your torrent's label to it.
|
||||
|
||||
== Discussion/Support ==
|
||||
[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=13515&p=130525&hilit=autopriority#p130525 Forum Post]
|
||||
|
||||
== Source Code ==
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
34
trac_wiki_export/wiki_dir/Plugins%2FBlocklist
Normal file
34
trac_wiki_export/wiki_dir/Plugins%2FBlocklist
Normal file
@ -0,0 +1,34 @@
|
||||
= Blocklist Plugin =
|
||||
|
||||
Currently this plugin can handle !PeerGuardian (text only), !SafePeer and Emule lists.
|
||||
|
||||
''Note: 7zip format files are not supported.''
|
||||
|
||||
Generally !PeerGuardian files come in 7zip format, so you'll need to extract them first and then feed Deluge the plain text file. Files may be specified as URL's to a website, the local filesystem, or a network host.
|
||||
|
||||
== Example URL's ==
|
||||
|
||||
Unix URL's of a local file:
|
||||
{{{
|
||||
file:///home/username/the%20file.dat.gz
|
||||
file://localhost/home/username/the%20file.dat.gz
|
||||
}}}
|
||||
|
||||
Windows URL's of a local file:
|
||||
{{{
|
||||
file:///c:/path/to/the%20file.dat.gz
|
||||
file://localhost/c:/path/to/the%20file.dat.gz
|
||||
}}}
|
||||
|
||||
URL of a network (LAN/WAN) file:
|
||||
{{{
|
||||
file://hostname/shared/the%20file.dat.gz
|
||||
}}}
|
||||
|
||||
== Download ==
|
||||
|
||||
The Deluge Team does not evaluate or endorse any specific blocklists anymore, however you can search the internet (e.g. `blocklist url`) to find and evaluate your own ones.
|
||||
|
||||
== Multiple lists ==
|
||||
|
||||
When you import a new blocklist, the new IP's are combined with the previously loaded ones. The only way to clear it at the moment is by restarting deluge(d).
|
11
trac_wiki_export/wiki_dir/Plugins%2FCategorise
Normal file
11
trac_wiki_export/wiki_dir/Plugins%2FCategorise
Normal file
@ -0,0 +1,11 @@
|
||||
= Categorise Plugin =
|
||||
'''Categorise''' is a Deluge 1.2 plugin that allows automatic moving of a downloaded torrent to a specific directory depending on its type.
|
||||
|
||||
== Download ==
|
||||
http://github.com/ledzgio/Categorise-Deluge-plugin
|
||||
|
||||
== Discussion/Support ==
|
||||
http://forum.deluge-torrent.org/viewtopic.php?f=9&t=30025 (download)
|
||||
|
||||
== Source Code ==
|
||||
http://github.com/ledzgio/Categorise-Deluge-plugin
|
192
trac_wiki_export/wiki_dir/Plugins%2FExecute
Normal file
192
trac_wiki_export/wiki_dir/Plugins%2FExecute
Normal file
@ -0,0 +1,192 @@
|
||||
== Execute ==
|
||||
The '''Execute''' plugin gives you the option to run your own scripts (e.g. `Bash`, `Python` or any other shell) triggered with different events in Deluge. At this moment only the events '''Added''' (when a torrent is added to deluge) and '''Complete''' (when a torrent has finished downloading) are supported. More events will be added in the future.
|
||||
|
||||
The script to be executed will be supplied with three torrent variables:
|
||||
|
||||
1. ID (Hash)
|
||||
2. Name
|
||||
3. Folder:
|
||||
* ''Torrent Added:'' 'Download'
|
||||
* ''Torrent Complete:'' 'Download' or 'Move Completed', if setup.
|
||||
|
||||
== Configuration ==
|
||||
|
||||
Enable the plugin in the Plugins menu in Preferences.
|
||||
|
||||
'''''Important: After enabling this plugin Deluge will require restarting for it to work properly.'''''
|
||||
|
||||
The events Torrent Complete and Torrent Added can be selected and the full path to the script entered (e.g. /home/user/execute_script)
|
||||
|
||||
[[Image(http://forum.deluge-torrent.org/download/file.php?id=3263)]]
|
||||
|
||||
Make sure the script is set to executable:
|
||||
{{{
|
||||
chmod u+x /home/user/execute_script
|
||||
}}}
|
||||
Also ensure that it is accessible by the user used to run deluged.
|
||||
|
||||
Before adding to Deluge, scripts should be tested manually like so:
|
||||
{{{
|
||||
./execute_script "TorrentID" "Torrent Name" "Torrent Path"
|
||||
}}}
|
||||
|
||||
== Script Examples ==
|
||||
The following scripts can be used for testing purposes.
|
||||
|
||||
=== Bash ===
|
||||
{{{
|
||||
#!sh
|
||||
#!/bin/bash
|
||||
torrentid=$1
|
||||
torrentname=$2
|
||||
torrentpath=$3
|
||||
echo "Torrent Details: " "$torrentname" "$torrentpath" "$torrentid" >> /tmp/execute_script.log
|
||||
}}}
|
||||
|
||||
The variables will show up in the log file: `/tmp/execute_script.log`
|
||||
|
||||
=== Windows Batch ===
|
||||
Save this with `.bat` extension such as `execute_example.bat`:
|
||||
{{{
|
||||
#!bat
|
||||
@echo off
|
||||
set torrentid=%1
|
||||
set torrentname=%2
|
||||
set torrentpath=%3
|
||||
@echo Torrent Details: %torrentname% %torrentpath% %torrentid% >> "%userprofile%\Desktop\execute_script.log"
|
||||
}}}
|
||||
|
||||
|
||||
The variables will show up in the log file on the user Desktop.
|
||||
|
||||
=== Perl ===
|
||||
{{{
|
||||
#!perl
|
||||
#!/usr/bin/perl
|
||||
$torrentid = $ARGV[0];
|
||||
$torrentname = $ARGV[1];
|
||||
$torrentpath = $ARGV[2];
|
||||
open(my $fh, '>>', '/tmp/execute_perl.log');
|
||||
print $fh "Torrent Details: $torrentname $torrentpath $torrentid\n"
|
||||
}}}
|
||||
|
||||
The variables will show up in the log file: `/tmp/execute_perl.log`
|
||||
|
||||
=== Python ===
|
||||
{{{
|
||||
#!python
|
||||
#!/usr/bin/env python
|
||||
from sys import argv
|
||||
from syslog import syslog
|
||||
syslog('deluge test: the script started running')
|
||||
for arg in argv[1:]:
|
||||
syslog(arg)
|
||||
}}}
|
||||
|
||||
The variables should show up in your syslog.
|
||||
{{{
|
||||
tail /var/log/syslog
|
||||
}}}
|
||||
|
||||
=== Sendemail script ===
|
||||
As a alternative to the notifications plugin you can send your e-mails through the execute script by using the program `sendemail`. By using `sendemail` it is possible to send e-mails to a smtp server all from one (command)-line.
|
||||
|
||||
To install sendemail on Ubuntu:
|
||||
{{{
|
||||
sudo apt-get install sendemail
|
||||
}}}
|
||||
The following command sends a e-mail:
|
||||
{{{
|
||||
sendemail -s smtp.myisp.com -t myemail@domain.com -f fromemail@domain.com -u "subject" -m "message"
|
||||
}}}
|
||||
|
||||
The script should be named ''torrent_added'' and contain the following:
|
||||
{{{
|
||||
#!sh
|
||||
#!/bin/bash
|
||||
torrentid=$1
|
||||
torrentname=$2
|
||||
torrentpath=$3
|
||||
|
||||
subject="Started download new torrent!"
|
||||
message="$torrentname to $torrentpath"
|
||||
|
||||
echo -e `date`"::Started download torrent:$2 in: $3" with id:$torrentid >> ~/scripts.log
|
||||
echo -e `sendemail -s smtp.myisp.com -t myemail@domain.com -f fromemail@domain.com -u "Started downloading $torrentname!" -m "Downloading $torrentname to: $torrentpath"` >> ~/scripts.log
|
||||
}}}
|
||||
|
||||
Make sure that you substitute smtp.myisp.com, myemail@domain.com and fromemail@domain.com with your own data!
|
||||
|
||||
This script can be rewritten to be used with the complete event. This way you will get a e-mail when a torrent is started and finished.
|
||||
|
||||
You can also achieve the same outcome with a python script:
|
||||
{{{
|
||||
#!python
|
||||
#!/usr/bin/env python
|
||||
import sys
|
||||
import smtplib
|
||||
|
||||
torrent_id = sys.argv[1]
|
||||
torrent_name = sys.argv[2]
|
||||
save_path = sys.argv[3]
|
||||
|
||||
#You can change these
|
||||
from_addr = "fromemail@domain.com"
|
||||
to_addr = "myemail@domain.com"
|
||||
smtp_srv = "smtp.myisp.com"
|
||||
|
||||
subject = "Some subject"
|
||||
message = """Put your message here
|
||||
|
||||
It can span multiple lines and can also contain information by specifying
|
||||
%(torrent_id)s or %(torrent_name)s""" % {
|
||||
'torrent_id': torrent_id,
|
||||
'torrent_name': torrent_name,
|
||||
'save_path': save_path
|
||||
}
|
||||
|
||||
msg = "To:%s\nFrom:%s\nSubject: %s\n\n%s" % (to_addr, from_addr, subject, message)
|
||||
|
||||
smtp = smtplib.SMTP(smtp_srv)
|
||||
smtp.sendmail(from_addr, to_addr, msg)
|
||||
smtp.quit()
|
||||
}}}
|
||||
|
||||
=== Extract archives script ===
|
||||
|
||||
This script will search for archives in downloaded content and extract them. Actions are logged as entries in syslog.
|
||||
It can be easily extended to support more compression and archive formats.
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
#!/bin/bash
|
||||
formats=(zip rar)
|
||||
commands=([zip]="unzip -u" [rar]="unrar -o- e")
|
||||
extraction_subdir='extracted'
|
||||
|
||||
torrentid=$1
|
||||
torrentname=$2
|
||||
torrentpath=$3
|
||||
|
||||
log()
|
||||
{
|
||||
logger -t deluge-extractarchives "$@"
|
||||
}
|
||||
|
||||
log "Torrent complete: $@"
|
||||
cd "${torrentpath}"
|
||||
for format in "${formats[@]}"; do
|
||||
while read file; do
|
||||
log "Extracting \"$file\""
|
||||
cd "$(dirname "$file")"
|
||||
file=$(basename "$file")
|
||||
# if extraction_subdir is not empty, extract to subdirectory
|
||||
if [[ ! -z "$extraction_subdir" ]] ; then
|
||||
mkdir "$extraction_subdir"
|
||||
cd "$extraction_subdir"
|
||||
file="../$file"
|
||||
fi
|
||||
${commands[$format]} "$file"
|
||||
done < <(find "$torrentpath/$torrentname" -iname "*.${format}" )
|
||||
done
|
||||
}}}
|
9
trac_wiki_export/wiki_dir/Plugins%2FFlexGet
Normal file
9
trac_wiki_export/wiki_dir/Plugins%2FFlexGet
Normal file
@ -0,0 +1,9 @@
|
||||
= !FlexGet =
|
||||
|
||||
Homepage: http://flexget.com/
|
||||
|
||||
!FlexGet is an automation program which can be used to automatically download torrents (among other things.) It supports tight integration with deluge, such as setting download location per torrent and even renaming the main file within the torrent to your standards.
|
||||
|
||||
For more information please read the following forum post: http://forum.deluge-torrent.org/viewtopic.php?f=9&t=18865&start=0
|
||||
|
||||
See also: http://flexget.com/wiki/Plugins/deluge
|
104
trac_wiki_export/wiki_dir/Plugins%2FFlexRSS
Normal file
104
trac_wiki_export/wiki_dir/Plugins%2FFlexRSS
Normal file
@ -0,0 +1,104 @@
|
||||
= FlexRSS =
|
||||
|
||||
This plugin is only compatible with the '''0.5.x''' and '''1.1.x''' releases of deluge.
|
||||
|
||||
Note: For '''1.2.x''' or newer releases see [wiki:Plugins/FlexGet FlexGet] or [wiki:Plugins/YaRSS2 YaRSS2].
|
||||
|
||||
== Overview ==
|
||||
|
||||
FlexRSS is a Deluge plugin for automatically handling RSS feeds. It is designed for advanced users, and makes few sacrifices of power and flexibility to ease of use. If you are already familiar with regular expressions, you should feel right at home.
|
||||
|
||||
Less technical users will likely want to use the "Simple RSS" plugin that is included with Deluge, which is far easier to use.
|
||||
|
||||
== Feeds ==
|
||||
|
||||
The feeds tab is fairly easy to use. One thing you should remember when choosing your feeds is that the feed should link directly to the torrent file, not to a detials page. Two popular examples of RSS feeds not conforming to this requirement are Demonoid and Mininova, though the latter does provide a direct feeds (by appending "?direct" to the URL)—they just don't make them easy to find.
|
||||
|
||||
If you expand a feed and right click on a single item, there is an option to "create filter", which will cause FlexRSS to create a new filter and take its best guess as to how to configure the new filter. This works well for items using standard formats.
|
||||
|
||||
== Configuration ==
|
||||
|
||||
=== Interface ===
|
||||
|
||||
The interface section currently contains a singe option: "Show button on toolbar", which will add a button for FlexRSS in the Deluge toolbar. Depending on how heavily you rely on the plugin, you may or may not think cluttering up Deluge's interface is worth it.
|
||||
Feed Retrieval
|
||||
|
||||
This section also contains a single option, one that will hopefully become obsolete soon. By default, FlexRSS retrieves feeds from the default thread, which blocks the entire interface. This behaviour is, obviously, not proper. That said, the threading support I tried to add doesn't seem very reliable, so I made it optional and disabled it by default. If anybody is interested in fixing this, it would be much appreciated.
|
||||
|
||||
=== Cookies ===
|
||||
|
||||
The "Configuration" tab contains an area where you can enter cookies for FlexRSS to send whenever it requests data from them (either polling feeds or downloading a torrent). These cookies are stored in a Netscape-style, and probably the easiest way to use cookies with FlexRSS is to simply copy a cookies.dat file from a browser like Firefox to ~/.config/deluge/flexrss-cookies.dat.
|
||||
|
||||
== Filters ==
|
||||
|
||||
The filters tab is where all the work takes place. and where all of the documentation takes place. Crap.
|
||||
|
||||
=== Information ===
|
||||
|
||||
This section is where you specify basic information about the feed—specifically, the name of the filter, the type of the filter, and which feed(s) you want to test the filter against. The filter type is one of:
|
||||
|
||||
Generic::
|
||||
Generic filters are the most simple type, but also probably the least often used. Their concept of history is fairly naive—they merely record the URI of all the items they have matched. This means that it is quite possible to download the same item more than once.
|
||||
TV Show::
|
||||
TV show filters are probably the most often used type of filter. They record a season and episode number for each match, meaning that they allow you to only download items you haven't yet downloaded. Season defaults to 0, so for things like anime where shows generally don't include a season, history is based on episode number alone.
|
||||
TV Show (dated)::
|
||||
The third and final type of filter is for items which use dates instead of the more common season/episode numbering.
|
||||
|
||||
=== Patterns ===
|
||||
|
||||
Patterns are the heart of FlexRSS. They are case-insensitive regular expressions with named patterns representing episode numbers. For details of regular expressions in Python, you can consult the [http://docs.python.org/lib/re-syntax.html Python manual section on Regular Expression Syntax], or, for a more gentle Python-specific introduction, the [http://www.amk.ca/python/howto/regex/ Python Regular Expression HOWTO]. The rest of this section will assume that you are familiar with regular expressions.
|
||||
|
||||
The named patterns you should define differ based on what type of filter you are using. TV shows use 's' and 'e', which represent 'season' (or 'series' if you prefer en_GB) and 'episode', respectively. Dated TV shows use 'Y', 'y', 'm', and 'd', for 4-digit year, 2-digit year, month, and day. Each named pattern also has an alias which can be used for convenience and work most situations—here is a list of these patterns and what they compile to:
|
||||
|
||||
%s::
|
||||
(?P<s>![0-9]+)
|
||||
%e::
|
||||
(?P<e>![0-9]+)
|
||||
%Y::
|
||||
(?P<Y>![0-9]{4})
|
||||
%y::
|
||||
(?P<y>![0-9]{2})
|
||||
%m::
|
||||
(?P<m>![0-9]{1,2})
|
||||
%d::
|
||||
(?P<d>![0-9]{1,2})
|
||||
|
||||
It is worth noting that all of these named patterns should match only substrigs representing integers. Any named pattern can be omitted, but will default to 0, so if you don't include any only the first item will be downloaded.
|
||||
|
||||
So, for instance, "show.s%se%e" will be converted into "show.s(?P<s>![0-9]+)e(?P<e>![0-9]+)" before it is run. This is the full extent of the preprocessing done before running the regex, which means that you must escape any special characters that you want treated as literals.
|
||||
|
||||
Sometimes these shortcuts are not enough to properly represent a filter, and you must use the more verbose version. However, it is possible to mix the two. For example, "My Favourite Show 108" could be the 108th episode of "My Favourite Show", or it could be the 8th episode of season 1 (I encounter both in the wild). To make sure you get what you want, you can use the filter "my.favourite.show.%s(?P<e>![0-9]{2})"
|
||||
|
||||
Patterns can test against either the title or the link. You can add as many patterns as you want to a single filter, and the filter will be considered a match if ANY of them match.
|
||||
|
||||
=== History Restriction ===
|
||||
|
||||
With non-generic filters, you can use history restriction to further limit what content is downloaded. Simply specify a either a starting episode, ending episode, or both.
|
||||
|
||||
=== Download ===
|
||||
|
||||
Several things in the interface could be more appropriately named, but I think this section takes the cake. Basically, it is a group of miscellaneous options that I thought would be nice to have.
|
||||
|
||||
Insert torrent at top of queue.::
|
||||
The default behaviour is to insert new torrents at after currenly downloading torrents. If you're really into something and want to make sure you get it as soon as possible, you can use this option to make sure torrents are sent to the top of the queue.
|
||||
Set state to paused.::
|
||||
This one is nice if you're not overly confident about your pattern-fu. Torrents are retrieved, but paused immediately so they will not download without further intervention.
|
||||
Delete filter when matched.::
|
||||
Want to throw away a filter after it has matched? Check the box.
|
||||
|
||||
=== Link Rewriting ===
|
||||
|
||||
Earlier, I mentioned that some sites link to a details page instead of the actual torrent. If the URI of the torrent is easily predictable from the URI of the detials page, you can use link rewriting to "fix" it.
|
||||
|
||||
Link rewriting uses regular expressions as well. For on overview on how to use it, see the [http://docs.python.org/lib/node46.html#l2h-405 Python re::sub documentation], or a more friendly explanation in the [http://www.amk.ca/python/howto/regex/regex.html#SECTION000620000000000000000 Search and Replace section of the Python Regular Expression HOWTO].
|
||||
|
||||
=== Output ===
|
||||
|
||||
Output just lets you specify where to save your torrent to.
|
||||
|
||||
== Download ==
|
||||
|
||||
'''FlexRSS for 0.5.x'''
|
||||
You can download the latest version of FlexRSS from the [http://forum.deluge-torrent.org/viewtopic.php?f=9&t=219 FlexRSS plugin] thread in the Deluge forums.
|
||||
'''FlexRSS for 1.x'''
|
||||
A port of FlexRSS for the 1.x series is available in the forums: https://forum.deluge-torrent.org/viewtopic.php?f=9&t=10185
|
45
trac_wiki_export/wiki_dir/Plugins%2FIfaceWatch
Normal file
45
trac_wiki_export/wiki_dir/Plugins%2FIfaceWatch
Normal file
@ -0,0 +1,45 @@
|
||||
= IfaceWatch =
|
||||
|
||||
Watch for IP changes on specific interfaces and notify libtorrent.
|
||||
|
||||
[[PageOutline(2-4,,inline)]]
|
||||
|
||||
== Current features ==
|
||||
|
||||
* No WebUI support
|
||||
* Works only on Unix based hosts (limitation of [https://github.com/bat-serjo/PyIface PyIface])
|
||||
* It runs on the daemon, so it will work well in a daemon/thin client setup.
|
||||
|
||||
== Links ==
|
||||
|
||||
* [https://github.com/bendikro/deluge-iface-watch/releases Download]
|
||||
* [https://github.com/bendikro/deluge-iface-watch#changelog Changelog]
|
||||
* [http://forum.deluge-torrent.org/viewtopic.php?f=9&t=52739 Forum thread]
|
||||
|
||||
== Getting started ==
|
||||
|
||||
=== Download ===
|
||||
|
||||
Download IfaceWatch from the [https://github.com/bendikro/deluge-iface-watch/releases].
|
||||
|
||||
You must download the egg that matches your python version (Python 2.6 or 2.7). See [http://dev.deluge-torrent.org/wiki/Plugins#InstallingPlugins] for details if you are unsure.
|
||||
|
||||
=== Installing the plugin ===
|
||||
|
||||
The plugin egg file can be installed through the Deluge GTKUI, or it can be installed manually.
|
||||
|
||||
See [http://dev.deluge-torrent.org/wiki/Plugins#InstallingPlugins instructions for how to install]
|
||||
|
||||
If you run Deluge in non-Classic mode (daemon and client setup), take a look at [http://dev.deluge-torrent.org/wiki/Plugins#Client-ServerSetups Running a server/seedbox with a Deluge daemon]
|
||||
|
||||
=== Configuring IfaceWatch ===
|
||||
|
||||
When enabling the plugin in Deluge a new tab is created in the Deluge prefences for IfaceWatch.
|
||||
The settings allows specifying a network interface, such as **eth0**, to be
|
||||
monitored for changes at the interval specified in the setting.
|
||||
|
||||
In a VPN scenario where you want only the torrent traffic to pass through the VPN interface
|
||||
it is necessary to manually set up routing table rules for this traffic. When the IP changes for
|
||||
an interface, IfaceWatch will only instruct Deluge to change the IP that libtorrent listens on.
|
||||
Therefore it is necessary to adjust the routing table rules as well when the IP changes.
|
||||
|
61
trac_wiki_export/wiki_dir/Plugins%2FImport
Normal file
61
trac_wiki_export/wiki_dir/Plugins%2FImport
Normal file
@ -0,0 +1,61 @@
|
||||
= Import Plugin =
|
||||
|
||||
''N.B. This is just a collection of information.''
|
||||
|
||||
== Transmission ==
|
||||
Transmission stores its state in bencoded files with the following format:
|
||||
{{{
|
||||
#!python
|
||||
{
|
||||
'activity-date': 1287828153,
|
||||
'added-date': 1242304732,
|
||||
'bandwidth-priority': 0,
|
||||
'corrupt': 0,
|
||||
'destination': '/mnt/disk1/transmission/',
|
||||
'dnd': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
'done-date': 1242335699,
|
||||
'downloaded': 2469147918,
|
||||
'max-peers': 75,
|
||||
'paused': 0,
|
||||
'peers2': '[binarydata]',
|
||||
'peers2-6': '[binarydata]',
|
||||
'priority': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
'progress': {
|
||||
'bitfield': '[binarydata]'
|
||||
'have': 'all',
|
||||
'mtimes': [
|
||||
1242335303,
|
||||
1242305325,
|
||||
1242335699,
|
||||
1242305892,
|
||||
1242335674,
|
||||
1242305529,
|
||||
1242334056,
|
||||
1242310169,
|
||||
1242335397,
|
||||
1242305771,
|
||||
1242334539,
|
||||
1242307206,
|
||||
1242333740,
|
||||
1242309147,
|
||||
1242333592,
|
||||
1242305446
|
||||
]
|
||||
},
|
||||
'ratio-limit': {
|
||||
'ratio-limit': '2.000000',
|
||||
'ratio-mode': 0
|
||||
},
|
||||
'speed-limit-down': {
|
||||
'speed': 100,
|
||||
'use-global-speed-limit': 1,
|
||||
'use-speed-limit': 0
|
||||
},
|
||||
'speed-limit-up': {
|
||||
'speed': 500,
|
||||
'use-global-speed-limit': 1,
|
||||
'use-speed-limit': 0
|
||||
},
|
||||
'uploaded': 2010821546335
|
||||
}
|
||||
}}}
|
34
trac_wiki_export/wiki_dir/Plugins%2FPieces
Normal file
34
trac_wiki_export/wiki_dir/Plugins%2FPieces
Normal file
@ -0,0 +1,34 @@
|
||||
= Pieces Plugin =
|
||||
|
||||
Adds a tab to Deluge 1.2 (and higher) to allow the viewing of the status of each piece of a torrent. Supports both gtkui and webui (webui has slightly less functionality)
|
||||
|
||||
Current version is 0.5
|
||||
|
||||
Version 0.5 supports client/server (i.e. not "Classic") mode, and adds support for the webui. Webui mode only shows each piece's status and does not support any priority setting/display
|
||||
|
||||
Version 0.4 fixes a segfault bug when setting priorities for multiple pieces, allows more flexible piece selection (with Shift/Ctrl), and adds an option to always prioritize the first un-downloaded piece of a torrent.
|
||||
|
||||
Version 0.3 adds the option to select multiple pieces by dragging the mouse over them before setting the priority.
|
||||
|
||||
Version 0.2 adds a tooltip to show which piece the mouse is hovering over, and a right-click menu that allows the setting of priorities for individual pieces.
|
||||
|
||||
|
||||
== Download ==
|
||||
[http://github.com/nicklan/Deluge-Pieces-Plugin/downloads Pieces plugin for Deluge]
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
View of the tab:[[BR]]
|
||||
[[Image(pss.png,600px)]]
|
||||
|
||||
Piece # tooltip (shows piece priority in parens):[[BR]]
|
||||
[[Image(tooltip.png)]]
|
||||
|
||||
Menu to set the priority for a piece:[[BR]]
|
||||
[[Image(set_priority.png)]]
|
||||
|
||||
== Discussion/Support ==
|
||||
Please use the forum post: http://forum.deluge-torrent.org/viewtopic.php?f=9&t=27545
|
||||
|
||||
== Source Code ==
|
||||
http://github.com/nicklan/Deluge-Pieces-Plugin/
|
23
trac_wiki_export/wiki_dir/Plugins%2FPreventSuspend
Normal file
23
trac_wiki_export/wiki_dir/Plugins%2FPreventSuspend
Normal file
@ -0,0 +1,23 @@
|
||||
= Prevent Suspend Plugin =
|
||||
|
||||
Simple plugin for the core that prevents computer suspension when it is activated (Currently only works on linux)
|
||||
== Download ==
|
||||
|
||||
[http://github.com/downloads/ianmartin/Deluge-PreventSuspend-plugin/PreventSuspend-0.3-py2.6.egg Prevent Suspend 0.3] for Deluge 1.2 and above
|
||||
|
||||
[http://github.com/downloads/ianmartin/Deluge-PreventSuspend-plugin/PreventSuspend-0.2-py2.6.egg Version 0.2] for Deluge 1.1.x
|
||||
|
||||
== Configuration ==
|
||||
|
||||
The preferences dialog allows you to choose when to prevent suspension/hibernation
|
||||
|
||||
== Discussion/Support ==
|
||||
|
||||
|
||||
== Source Code ==
|
||||
http://github.com/ianmartin/Deluge-PreventSuspend-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
67
trac_wiki_export/wiki_dir/Plugins%2FRemoteNotify
Normal file
67
trac_wiki_export/wiki_dir/Plugins%2FRemoteNotify
Normal file
@ -0,0 +1,67 @@
|
||||
= !RemoteNotify =
|
||||
|
||||
'''!RemoteNotify''' is a 1.1.x plugin to Notify you when Torrents have completed by sending an Instant Message to a configured Jabber ID. Also, it allows limited Remote Control of the Torrents with easy Jabber message commands.
|
||||
|
||||
'''!RemoteNotify''' has core and webui components but no gtk.
|
||||
|
||||
== Features ==
|
||||
|
||||
* Sends an Instant Message upon completion of any Download.
|
||||
* The status of all the downloads is updated every 10 seconds in the contact "away/status message bubble".
|
||||
* Only Buddies(Authorized JIDs) can send Deluge Commands to Bot.
|
||||
* It also has Mail Notifications implemented as a Core Plugin, since the included Deluge Mail Notification works only with the GTK UI on.
|
||||
* Status, Adding, Removing of Torrents by sending IM message commands.
|
||||
|
||||
== IM Commands ==
|
||||
|
||||
* status - Prints current status information about all downloading torrents
|
||||
* add [URL of Torrent] - Gets Torrent File from URL and starts downloading
|
||||
* del [Id of Torrent] - Deletes Torrent File with given Id (hash Id - the one shown in the ''status'' command)
|
||||
* help - This command
|
||||
|
||||
== Requirements ==
|
||||
|
||||
* [http://twistedmatrix.com/trac/wiki/TwistedWords TwistedWords]
|
||||
|
||||
== Installation & Configuration ==
|
||||
|
||||
=== Compile & Install Plugin ===
|
||||
|
||||
1. Compile code
|
||||
{{{
|
||||
python setup.py bdist_egg
|
||||
}}}
|
||||
2. Copy plugin into deluge plugin directory ( usually ~/.config/deluge/plugins )
|
||||
{{{
|
||||
cp dist/RemoteNotify-0.1-py2.5.egg ~/.config/deluge/plugins/
|
||||
}}}
|
||||
|
||||
=== Configure Jabber Account for the Bot ===
|
||||
|
||||
1. Create a Jabber account for your Bot ( http://register.jabber.org )
|
||||
2. Log on with your favourite IM Chat Application on both your and the Bot's accounts and manually authorize the Bot and viceversa. ( This isn't done by the plugin! ). Both Accounts should see the other one as online. Only Buddies(Authorized JIDs) can send Deluge Commands to Bot
|
||||
|
||||
=== Configure Mail Account for the Bot ===
|
||||
|
||||
1. Create or use some existing mail account that offers an smtp service. I used gmail ( http://mail.google.com/mail/signup ).
|
||||
|
||||
=== Start & Configure the Plugin ===
|
||||
|
||||
1. Start deluged & deluge webUI
|
||||
2. Enable RemoteNotify plugin ( Using WebUI at http://yourdelugedomain/config/plugins <- the ajax theme doesn't have this )
|
||||
3. Enter The Account & Password for your Bots jabber and Email account & save. ( http://yourdelugedomain/config/remotenotify )
|
||||
4. Enter Notifier Email SMTP server. (For gmail use ''smtp.gmail.com'' )
|
||||
5. Restart deluged. ( Sadly, this is necessary because of a weird Twisted Words bug )
|
||||
6. Have phun chatting with your Deluge Jabberbot
|
||||
|
||||
Any questions/bugs should be sent to the plugin forum:
|
||||
http://forum.deluge-torrent.org/viewtopic.php?f=9&t=18465
|
||||
|
||||
== Change Log ==
|
||||
|
||||
* 0.1 - Initial release
|
||||
* 0.2 - Deadlock bugfix when notifying user of finished download.
|
||||
|
||||
== Download ==
|
||||
|
||||
See Attachment
|
25
trac_wiki_export/wiki_dir/Plugins%2FStats
Normal file
25
trac_wiki_export/wiki_dir/Plugins%2FStats
Normal file
@ -0,0 +1,25 @@
|
||||
= Stats Plugin =
|
||||
|
||||
Displays pretty graphs much like the utorrent speed tab.
|
||||
|
||||
== Download ==
|
||||
|
||||
Note: Stats plugin is included with Deluge from version 1.3
|
||||
|
||||
[http://github.com/ianmartin/Deluge-stats-plugin/downloads Stats plugin for Deluge]
|
||||
|
||||
Version 0.2.x is for Deluge 1.1.x
|
||||
|
||||
Version 0.3.x is for Deluge 1.2
|
||||
|
||||
== Discussion/Support ==
|
||||
|
||||
Problems, comments or suggestions welcome either in the or on the
|
||||
|
||||
[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=24935 Forum Thread]
|
||||
|
||||
[http://github.com/ianmartin/Deluge-stats-plugin/issues Github Issue Tracker]
|
||||
|
||||
== Source Code ==
|
||||
http://github.com/ianmartin/Deluge-stats-plugin
|
||||
|
6
trac_wiki_export/wiki_dir/Plugins%2FToggle
Normal file
6
trac_wiki_export/wiki_dir/Plugins%2FToggle
Normal file
@ -0,0 +1,6 @@
|
||||
= Toggle Plugin =
|
||||
|
||||
Allows the users to "toggle" the session; to set the session to either "paused" or "resumed".
|
||||
|
||||
Pausing the session pauses all torrents.
|
||||
Resuming the session resumes all torrents that weren't paused before.
|
37
trac_wiki_export/wiki_dir/Plugins%2FXMPPNotify
Normal file
37
trac_wiki_export/wiki_dir/Plugins%2FXMPPNotify
Normal file
@ -0,0 +1,37 @@
|
||||
= XMPP Notify Plugin =
|
||||
|
||||
XMPP notify/control bot for Deluge 1.2.3
|
||||
|
||||
== Download ==
|
||||
[http://bitbucket.org/enikesha/deluge-xmppnotify/downloads XMPP Notify]
|
||||
|
||||
It requires twisted.words, twisted.names and [http://wokkel.ik.nu/downloads wokkel] library to be installed.
|
||||
|
||||
== Features ==
|
||||
* GTK and WebUI client interface
|
||||
* Notify on torrent finish
|
||||
* List current torrents
|
||||
* Add torrents from URL
|
||||
|
||||
== Commands ==
|
||||
* list -- Lists all current torrents
|
||||
* down -- Lists downloading torrents
|
||||
* up -- Lists uploading(seeding) torrents
|
||||
* paused/queued -- Lists paused and queued torrents
|
||||
* url <torrent url> [download location] -- Adds new torrent
|
||||
|
||||
== Configuration ==
|
||||
Notifier jabber account/password: Pre-registered jabber account for bot.
|
||||
|
||||
Users to notify: Line separated list of accounts to notify for events.
|
||||
|
||||
PS. When installing via WebUI it's needed to restart 'deluged' and 'deluge-web' after enabling but before configuring plugin.
|
||||
|
||||
== Discussion/Support ==
|
||||
[http://bitbucket.org/enikesha/deluge-xmppnotify/issues/new Ideas/Feature requests]
|
||||
|
||||
[http://forum.deluge-torrent.org/viewtopic.php?f=9&t=31245 Deluge Forum Link]
|
||||
|
||||
== Source Code ==
|
||||
http://bitbucket.org/enikesha/deluge-xmppnotify/
|
||||
|
156
trac_wiki_export/wiki_dir/Plugins%2FYaRSS2
Normal file
156
trac_wiki_export/wiki_dir/Plugins%2FYaRSS2
Normal file
@ -0,0 +1,156 @@
|
||||
= YaRSS2 =
|
||||
|
||||
An RSS plugin for Deluge configured through the GTK client.
|
||||
|
||||
[[PageOutline(2-4,,inline)]]
|
||||
|
||||
== Current features ==
|
||||
|
||||
* RSS Feeds with individual update times.
|
||||
* Cookie support
|
||||
* Magnet link support
|
||||
* Sending emails on torrent(s) added, with the list of torrents in the message.
|
||||
* Multiple (email message) notifications can be created and applied to different subscriptions.
|
||||
* Search using regex, one field for inclusion and one for exclusion.
|
||||
* "Move completed", "Download location" and "Add Paused" options.
|
||||
* Support for labeling torrents with the Label plugin.
|
||||
* Log window containing info on what is going on.
|
||||
* It runs on the daemon, so it will work well in a daemon/thin client setup.
|
||||
|
||||
Features that hopefully will be implement:
|
||||
|
||||
* Smart episodes filtering including history to avoid the same episodes being added multiple times.
|
||||
* Command line client
|
||||
* Better search, maybe a helper to create regex filters.
|
||||
|
||||
=== Deluge version support ===
|
||||
|
||||
For Deluge v1.3.X, use YaRRS2 v1.X
|
||||
|
||||
Tested with Deluge 1.3.5 on:
|
||||
* Windows XP
|
||||
* Ubuntu 14.04
|
||||
* FreeBSD 10 (daemon)
|
||||
|
||||
For Deluge v2.X use YaRSS2 v2.X
|
||||
|
||||
Tested with Deluge 2.0.3 on:
|
||||
* Ubuntu 18.04
|
||||
|
||||
|
||||
== Links ==
|
||||
|
||||
=== [https://bitbucket.org/bendikro/deluge-yarss-plugin/downloads Download] ===
|
||||
=== [https://bitbucket.org/bendikro/deluge-yarss-plugin/src/master/CHANGELOG.md Changelog] ===
|
||||
=== [http://forum.deluge-torrent.org/viewtopic.php?t=39551 Forum thread] (if you need help) ===
|
||||
|
||||
== Getting started ==
|
||||
|
||||
=== Download ===
|
||||
|
||||
Download YaRSS2 from the [https://bitbucket.org/bendikro/deluge-yarss-plugin/downloads bitbucket repo].
|
||||
|
||||
You must download the egg that matches your python version (e.g. py3.6.egg for python 3.6). See [http://dev.deluge-torrent.org/wiki/Plugins#InstallingPlugins] for details if you are unsure.
|
||||
|
||||
=== Installing the plugin ===
|
||||
|
||||
The plugin egg file can be installed through the Deluge GTK client, or it can be installed manually.
|
||||
|
||||
See [http://dev.deluge-torrent.org/wiki/Plugins#InstallingPlugins instructions for how to install]
|
||||
|
||||
If you run Deluge in non-Classic mode (daemon and client setup), take a look at [http://dev.deluge-torrent.org/wiki/Plugins/YaRSS2#RunningaserverseedboxwithaDelugedaemon Running a server/seedbox with a Deluge daemon]
|
||||
=== RSS feed ===
|
||||
|
||||
Start by registering a RSS feed in the tab "RSS Feeds". Make sure the links link to torrent files, and not a new HTML page.
|
||||
The "Update time" is how often this feed is checked. It depends on how often the feeds are updated, but usually, between 60-120 minutes should suffice. The minimum value is 5 minutes, to avoid overloading the server.
|
||||
|
||||
=== Subscription ===
|
||||
Subscriptions define the content you want to download from an RSS feed.
|
||||
The search is regex based, which enables extremely powerful search expressions. However, it's not always straight forward to define right.
|
||||
|
||||
To help you verify the expression, the list of the current torrents in the RSS feed will show if the torrent matches, and which part of the title that matches
|
||||
|
||||
Regex hints:
|
||||
||Regex||Comment||
|
||||
||.||Any character||
|
||||
||*||Zero or more of the previous expression||
|
||||
||+||One or more of the previous expression||
|
||||
||.*||Zero or more of any character||
|
||||
||\d||Any number 0-9 (Only one character)||
|
||||
||\d+||One or more numbers||
|
||||
||\d!{2}||Exactly two numbers||
|
||||
||\d{1,2}||One or two numbers||
|
||||
||(720p|1080p)|| '''720p''' or '''1080p'''||
|
||||
|
||||
Example
|
||||
* Title1: "My Favourite Series some-random-characters.720p.GROUP"
|
||||
* Title2: "My.Favourite.Series.some-random-characters.1080p.GROUP"
|
||||
* Title3: "My.Favourite.Series.S1E04.1080p.GROUP"
|
||||
* Title4: "My.Favourite.Series.S1E1.1080p.GROUP"
|
||||
|
||||
||Regex||Matche||
|
||||
||My Favourite Series|| Title1||
|
||||
||My.Favourite.Series|| all||
|
||||
||.|| all||
|
||||
||My.Favourite.Series.*720p|| Title1||
|
||||
||My.Favourite.Series.*(720p|1080p)|| All||
|
||||
||My.Favourite.Series.S01E\d!{2}*1080p|| Title3 (as well as any episode 00-99)||
|
||||
||My.Favourite.Series.S01E\d{1,2}.*1080p|| Title3 and Title4||
|
||||
|
||||
== Troubleshooting ==
|
||||
=== No torrents appear in the list when creating a new subscription ===
|
||||
|
||||
If no torrents appear in the list in the subscription dialog, but they show up fine in your web browser, the problem is likely that the web server requires some cookies. The cookies are added automatically by the browser, but you'll have to add them manually to YaRSS2.
|
||||
There are a lot of guides on how to find the correct cookie values (most torrent sites that require cookies have some guide or forum thread where this is explained).
|
||||
|
||||
1. Find the necessary cookie values for your tracker in your web browser.
|
||||
2. Go to the settings tab in YaRSS2 in the preferences and click the cookies tab at the bottom.
|
||||
3. Provide the base URL of the tracker in the "Site URL" field. If the address is ''www.address.com/rss+23423r/whatever++'', use only ''www.address.com''
|
||||
4. Add each value/pair as they are stored in your browser.
|
||||
5. Save the cookies and test if this works in the subscription dialog.
|
||||
|
||||
[[Image(YaRSS_cookies.2012-09-12.png, 400px)]]
|
||||
|
||||
The ''pass'' and ''uid'' keys are just examples, and might be named differently on your tracker.
|
||||
|
||||
=== Dealing with feeds that are missing a pubDate tag ===
|
||||
|
||||
Some trackers publish RSS feeds that do not have the standard pubDate tag for each item that contains the timestamp of when the item was added to the feed. Without this tag, YaRSS2 cannot process the feed, as it has no way of knowing a new item from an old one. Most of these trackers DO include a timestamp somewhere in each item's entry, but if it's not in the pubDate tag, then YaRSS2 doesn't find it. To solve this, you can contact the feed's publisher and request that they conform to the RSS standard and include the pubDate tag in their feed. When they tell you to go pound sand, fear not. There is a workaround that's fairly easy. To add the pubDate tag into an existing RSS feed yourself, you can use a service from Yahoo called Pipes:
|
||||
|
||||
[http://pipes.yahoo.com/pipes/]
|
||||
|
||||
Yahoo has pretty good documentation for this tool, so you should be able to figure out the Pipes tool after a little experimenting. Here's a general guideline of how to add the missing pubDate tag:
|
||||
|
||||
* Open the RSS feed in a web browser and view the page's source. You'll see all the tags for each item. Identify the tag that contains the published date.
|
||||
* Create a Yahoo account and build a new pipe. String the following modules together in the following order.
|
||||
* Use the fetch feed module to read the source feed.
|
||||
* Then use the rename module to copy the tag containing the date into a new tag called pubDate.
|
||||
* You may need to use the regex module to strip all but the time and date out of your new pubDate tag.
|
||||
* Use the Create RSS module to map the tags to conform to RSS standard.
|
||||
* Save and run the pipe. Click on "get as RSS" and use the link it generates as your RSS source in YaRSS2.
|
||||
* Enjoy. The feed now has a proper timestamp tag and should work.
|
||||
|
||||
Hopefully this will help some people get their favourite feeds working with YaRSS2.
|
||||
|
||||
=== Email notifications ===
|
||||
|
||||
You can send a test email to see if your email settings works.
|
||||
In a thin client/daemon setup, the test email is sent from the client machine, but the real emails sent by YaRSS2 when adding torrents are sent from the daemon, so if you have problems sending emails it might be caused by issues on your server.
|
||||
|
||||
For gmail, the following settings works:
|
||||
||'''SMTP server'''||'''smtp.gmail.com'''||
|
||||
||'''Port'''||'''587'''||
|
||||
||'''From email address'''||'''name @ gmail.com'''||
|
||||
||'''Username'''||'''same as your email address'''||
|
||||
||'''Password'''||'''app password'''||
|
||||
|
||||
To send emails with gmail, you must create an app password for authentication. Using your account password is reported to cause problems. See
|
||||
https://support.google.com/accounts/answer/185833?hl=en
|
||||
|
||||
== Running a server/seedbox with a Deluge daemon ==
|
||||
|
||||
If you have a server/seedbox you need to verify that the python version on the server corresponds to the version of the plugin egg you installed.
|
||||
|
||||
See [http://dev.deluge-torrent.org/wiki/Plugins#Client-ServerSetups section about Client-Server Setups]
|
||||
|
||||
After installing, restart both the daemon and the client and YaRSS2 should now be available in the list of plugins.
|
30
trac_wiki_export/wiki_dir/Plugins%2FYarss
Normal file
30
trac_wiki_export/wiki_dir/Plugins%2FYarss
Normal file
@ -0,0 +1,30 @@
|
||||
= Name of Plugin =
|
||||
yarss (yet another rss) plugin for deluge
|
||||
|
||||
This is just a beta now!
|
||||
|
||||
Please report bugs or feature request to the [http://forum.deluge-torrent.org/viewtopic.php?f=9&t=31553 forum]
|
||||
|
||||
== Download ==
|
||||
* [http://github.com/spjoe/deluge-yarss-plugin/downloads Plugin eggs]
|
||||
|
||||
|
||||
== Features ==
|
||||
* Easy to use with eztv
|
||||
* gtk UI
|
||||
* costume rss feeds with regex
|
||||
|
||||
== Commands ==
|
||||
|
||||
== Configuration ==
|
||||
* All config is through the UI
|
||||
|
||||
== Change Log ==
|
||||
* v0.1 beta2
|
||||
* feedparser is part of egg
|
||||
* sgmllib is part of egg
|
||||
|
||||
== Discussion/Support ==
|
||||
|
||||
== Source Code ==
|
||||
* [http://github.com/spjoe/deluge-yarss-plugin Source]
|
20
trac_wiki_export/wiki_dir/Plugins%2Fautoport
Normal file
20
trac_wiki_export/wiki_dir/Plugins%2Fautoport
Normal file
@ -0,0 +1,20 @@
|
||||
= autoport =
|
||||
|
||||
'''autoport''' is a 1.1.x plugin to change your listen port at a set interval, to a random port within a set range.
|
||||
|
||||
'''autoport''' has core and gtk components but no webui. A webui will be added in the deluge 1.2.x version.
|
||||
|
||||
Any questions/bugs should be sent to the plugin forum:
|
||||
http://forum.deluge-torrent.org/viewtopic.php?f=9&t=16305
|
||||
|
||||
Maintainer: Solexious
|
||||
|
||||
== Change Log ==
|
||||
|
||||
0.1 - Initial 1.1.x release
|
||||
|
||||
== Download ==
|
||||
|
||||
Egg files are attached to this wiki page.
|
||||
|
||||
The svn repo can be found at: http://opensvn.csie.org/autoport/
|
0
trac_wiki_export/wiki_dir/Plugins%2Fexecute
Normal file
0
trac_wiki_export/wiki_dir/Plugins%2Fexecute
Normal file
14
trac_wiki_export/wiki_dir/Plugins%2Fpriorities
Normal file
14
trac_wiki_export/wiki_dir/Plugins%2Fpriorities
Normal file
@ -0,0 +1,14 @@
|
||||
= Priorities =
|
||||
|
||||
This plugin is only compatible with the '''0.5.x''' and '''1.1.x''' releases of deluge.
|
||||
|
||||
This plugin allows you to assign a tracker to on of 5 upload-slots.
|
||||
These slots can have a different share of the available upload-bandwidth.
|
||||
|
||||
The shares stand in relation to each other. That means, if you have one tracker assigned with the value 99 and one with 98 and both have active uploading torrents, these tracker will both have nearly 50% of the bandwidth for their torrents.
|
||||
So you can assign smaller numbers as 1 for tracker a, and 3 for tracker b. This will result in 75% of the bandwidth for tracker b and 25% for tracker a.
|
||||
|
||||
The available bandwidth for each tracker will also be split by the number of active torrents.
|
||||
|
||||
I hope you enjoy it. Feel free to contact me about bugs or imporvements (It's my first python project)
|
||||
|
7
trac_wiki_export/wiki_dir/ProjectGoals
Normal file
7
trac_wiki_export/wiki_dir/ProjectGoals
Normal file
@ -0,0 +1,7 @@
|
||||
= Project Goals =
|
||||
|
||||
* '''Every feature needs to be complimented with an extensive set of tests'''
|
||||
* Strive to be light-weight
|
||||
* Use a split core and ui architecture to provide a core daemon that all clients can connect with
|
||||
* Provide a GTK+ desktop client, a web-based client and a console client usable on most major platforms
|
||||
* Provide extended functionality through plugins
|
52
trac_wiki_export/wiki_dir/Screenshots
Normal file
52
trac_wiki_export/wiki_dir/Screenshots
Normal file
@ -0,0 +1,52 @@
|
||||
= Deluge Screenshots =
|
||||
|
||||
== 1.2.x ''(Dust Burnt GTK Theme)'' ==
|
||||
|
||||
{{{
|
||||
#!html
|
||||
<div id="screenshots">
|
||||
<div>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_status.png">
|
||||
<img width="200px" alt="Status" src="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_status.png">
|
||||
</a>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_status.png">Status</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_details.png">
|
||||
<img width="200px" alt="Details" src="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_details.png">
|
||||
</a>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_details.png">Details</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_files.png">
|
||||
<img width="200px" alt="Files" src="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_files.png">
|
||||
</a>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_files.png">Files</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_peers.png">
|
||||
<img width="200px" alt="Peers" src="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_peers.png">
|
||||
</a>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_peers.png">Peers</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_options.png">
|
||||
<img width="200px" alt="Torrent Options" src="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_options.png">
|
||||
</a>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_options.png">Torrent Options</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_prefs_download.png">
|
||||
<img width="200px" alt="Download Preferences" src="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_prefs_download.png">
|
||||
</a>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/gtkui_dust_burnt_12x_prefs_download.png">Download Preferences</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/webui_slate_12x_files.png">
|
||||
<img width="200px" alt="Web UI" src="http://deluge-torrent.org/images/screenshots/webui_slate_12x_files.png">
|
||||
</a>
|
||||
<a href="http://deluge-torrent.org/images/screenshots/webui_slate_12x_files.png">Web UI (Slate Theme)</a>
|
||||
</div>
|
||||
<br style="clear: left;" />
|
||||
}}}
|
||||
|
142
trac_wiki_export/wiki_dir/Troubleshooting
Normal file
142
trac_wiki_export/wiki_dir/Troubleshooting
Normal file
@ -0,0 +1,142 @@
|
||||
{{{
|
||||
#!html
|
||||
<h1 style="text-align: left;">Deluge TroubleShooting</h1>
|
||||
}}}
|
||||
|
||||
[[PageOutline(1-2,,inline,unnumbered)]]
|
||||
|
||||
= General =
|
||||
|
||||
== Deluge won't start! What should I do? ==
|
||||
|
||||
Common startup errors with solutions:
|
||||
|
||||
`ImportError: No module named libtorrent`::
|
||||
You need to install [http://www.rasterbar.com/products/libtorrent/ libtorrent-rasterbar].
|
||||
|
||||
`gobject.GError: Unrecognised image file format`::
|
||||
You need to install SVG support. On !Debian/Ubuntu, the package is `librsvg2-common`.
|
||||
|
||||
Windows OS: `Deluge not starting` or `Error:14001 side-by-side configuration`::
|
||||
Install ''vcredist_x86.exe'': [https://www.microsoft.com/en-us/download/details.aspx?id=26368 Visual C++ 2008 SP1 Redistributable Package]
|
||||
|
||||
'''For any other issues not solved here see''' [wiki:Contributing/BugReporting Bug Reporting] '''and follow the detailed steps.'''
|
||||
|
||||
== Deluge's GTK UI won't connect to a remote daemon ==
|
||||
|
||||
Make sure both the GTK UI and the daemon are the same (or similar, e.g. 1.3.x) versions.
|
||||
|
||||
Otherwise make sure you've followed the [wiki:UserGuide/ThinClient thin client userguide].
|
||||
|
||||
== Deluge isn't working! What should I do? ==
|
||||
|
||||
See [wiki:Contributing/BugReporting Bug Reporting]
|
||||
|
||||
{{{
|
||||
#!comment
|
||||
This is currently not the case.
|
||||
~~If you are on Windows, the debug logs are located in your [wiki:Faq#WheredoesDelugestoreitssettings settings folder] under the names `deluged.log` and `deluge.log`.~~
|
||||
}}}
|
||||
|
||||
If you are pasting the log on the forums, please use the `[code][/code]` tags.
|
||||
|
||||
If you are pasting the log on IRC, please use [http://dpaste.com dpaste] or [http://pastebin.com pastebin] or something similar.
|
||||
|
||||
== How do I add an already completed torrent to Deluge? ==
|
||||
|
||||
If you add an already completed torrent to Deluge, you just need to set `Download Location` to the path where your data is, and Deluge will continue downloading/seeding the torrent.
|
||||
|
||||
A common error occurs if your torrent contained a folder. If your torrent contained a folder called Torrent.Name.2010, such that the data was in ~/downloads/Torrent.Name.2010/ You need to set the download location to ~/downloads/ '''not''' ~/downloads/Torrent.Name.2010/
|
||||
|
||||
If you have already added the torrent to Deluge, you can pause it, select 'Move Storage', point it to your data, then choose 'Force Re-check'
|
||||
|
||||
== Torrent stuck at 99% or some other point, even though seeders available ==
|
||||
|
||||
Check that local machine firewall or router is not detecting a SYN flood and blocking packets. As a torrent reaches completion and you become a seeder, there can be a sudden inrush of connections from other peers that causes firewalls to start blocking. If so, try reducing the total connections allowed in Deluge, or increasing the tolerance on the router, or turning off SYN flood detection. Also check local storage for the downloaded file is not out of space (shown on bottom status bar in Deluge UI).
|
||||
|
||||
== Samba Network Shares ==
|
||||
|
||||
=== Windows OS ===
|
||||
To use a Samba share in Deluge from within Windows, the share has to be mapped to a drive letter.
|
||||
|
||||
== How can I change Deluge language? ==
|
||||
|
||||
=== Windows OS ===
|
||||
There is a bug in the way GTK sets language on Windows but there are several workarounds:
|
||||
|
||||
* [http://www.howtogeek.com/51807/how-to-create-and-use-global-system-environment-variables/ Set a global] `LANG` environment variable to the language you require, e.g. `en`.
|
||||
|
||||
* Create a cmd file to set the `LANG` and open deluge. Copy the following text into notepad:
|
||||
{{{
|
||||
set lang=en
|
||||
start deluge.exe
|
||||
}}}
|
||||
Save the file as `Deluge.cmd` in the same folder as `Deluge.exe`. Create a shortcut to the .cmd file and use it to start Deluge.
|
||||
|
||||
* To force the use of English only, delete the following language files from Deluge program folder:
|
||||
`C:\Program Files\Deluge\deluge-1.3.x-py2.x.egg\deluge\i18n`[[BR]]
|
||||
`C:\Program Files\Deluge\share\locale`
|
||||
|
||||
= Deluge Version =
|
||||
|
||||
GTKUI::
|
||||
Open `About` dialog from the application Help menu.
|
||||
|
||||
From the terminal::
|
||||
`deluge --version`, `deluged --version`, etc.
|
||||
|
||||
== libtorrent version ==
|
||||
|
||||
The libtorrent version is in the output of [wiki:Troubleshooting#DelugeVersion Deluge Version].
|
||||
|
||||
From the terminal::
|
||||
`python -c "from deluge._libtorrent import lt; print lt.version"`
|
||||
|
||||
== Python Version ==
|
||||
|
||||
Linux/*nix::
|
||||
Usually Python 2.7 is default but verify from terminal with: `python --version`
|
||||
|
||||
Windows OS::
|
||||
Check the Deluge installed files: `%ProgramFiles%\Deluge\deluge-***-py2.6.egg` This would signify Deluge is running Python 2.6.[[br]]
|
||||
The suffix to the installer can also indicate version so ''deluge-1.3.x-win32-**py2.7**-setup.exe'' would be Python 2.7.
|
||||
|
||||
Mac OSX::
|
||||
For the Deluge.app the default is Python 2.7.
|
||||
|
||||
= Enable Deluge Logging =
|
||||
To enable logging run Deluge from a terminal with the following options.
|
||||
|
||||
* These options apply to all Deluge applications: `deluged`, `deluge-gtk`, `deluge-web` & `deluge-console`
|
||||
|
||||
== Logging to shell ==
|
||||
{{{
|
||||
deluge -L <loglevel>
|
||||
}}}
|
||||
== Logging to file ==
|
||||
{{{
|
||||
deluge -L <loglevel> -l <logfile>
|
||||
}}}
|
||||
|
||||
== Available Log levels ==
|
||||
* `none`
|
||||
* `critical`
|
||||
* `error`
|
||||
* `warning`
|
||||
* `info`
|
||||
* `debug`
|
||||
|
||||
Note: `debug` is ''very'' verbose and with a lot of torrents log files will be MB's in size.
|
||||
|
||||
== Windows Specific Logging ==
|
||||
|
||||
You will need to use the `*-debug.exe` program versions to view errors that may be propagated to console and missed by logging.
|
||||
|
||||
e.g. Open a Command Prompt and run:
|
||||
|
||||
`"%ProgramFiles%\Deluge\deluge-debug.exe" -L error -l "%UserProfile%\Desktop\deluge.log"`
|
||||
|
||||
|
||||
|
||||
|
||||
|
31
trac_wiki_export/wiki_dir/UserGuide
Normal file
31
trac_wiki_export/wiki_dir/UserGuide
Normal file
@ -0,0 +1,31 @@
|
||||
= Deluge User Guide =
|
||||
|
||||
== Steps for Getting Started ==
|
||||
|
||||
Guides for installing Deluge:
|
||||
[[TitleIndex(Installing/, hideprefix, depth=0, exclude=Installing/Source)]]
|
||||
* [Installing/Source From source-code]
|
||||
|
||||
Installation on a server (to run Deluge daemon in the background) setting up a `service` is useful:
|
||||
* [UserGuide/Service Service]
|
||||
To allow clients to remotely connect to the daemon `deluged` follow this guide:
|
||||
* [UserGuide/ThinClient ThinClient]
|
||||
|
||||
== Advanced Usage ==
|
||||
|
||||
[[TitleIndex(UserGuide/, hideprefix, depth=0, exclude=UserGuide/Service:UserGuide/ThinClient:UserGuide/InitScript)]]
|
||||
* [wiki:UserGuide/WebUI/ReverseProxy Reverse Proxy (Web UI)]
|
||||
|
||||
== Questions or Issues ==
|
||||
|
||||
* '''[wiki:Faq FAQ]'''
|
||||
|
||||
* '''[wiki:Troubleshooting Troubleshooting]'''
|
||||
|
||||
* '''[wiki:Contributing/BugReporting Report a Bug]'''
|
||||
|
||||
=== Contact Us ===
|
||||
|
||||
* '''[http://forum.deluge-torrent.org Forum]''' - The main area for support and discussion.
|
||||
|
||||
* '''[irc://irc.libera.chat/deluge IRC]''' - '''#deluge''' on '''irc.libera.chat''' (Quick tip: [https://rurounijones.github.io/blog/2009/03/17/how-to-ask-for-help-on-irc// Don't ask to ask] on IRC)
|
34
trac_wiki_export/wiki_dir/UserGuide%2FAuthentication
Normal file
34
trac_wiki_export/wiki_dir/UserGuide%2FAuthentication
Normal file
@ -0,0 +1,34 @@
|
||||
== Authentication ==
|
||||
The daemon looks at the file [http://dev.deluge-torrent.org/wiki/Faq#WheredoesDelugestoreitssettingsconfig <config folder>]/auth for doing authentication.
|
||||
|
||||
The format of this file is straightforward, each line contains a username:password:level tuple in plaintext.
|
||||
|
||||
There should always be a 'localclient' entry for use by the UIs running locally by your user.
|
||||
|
||||
'''Note:'''
|
||||
If you do not have an auth file in your config folder, first run the daemon to have it created for you.
|
||||
|
||||
Deluge 1.2.0 introduces different levels of authentication:
|
||||
|
||||
|| Level Name || Level Value ||
|
||||
|| None || 0 ||
|
||||
|| Read Only || 1 ||
|
||||
|| Normal || 5 ||
|
||||
|| Admin || 10 ||
|
||||
|
||||
'''Note:'''
|
||||
In Deluge 1.3.3 authentication levels don't do anything. In the future they will.
|
||||
In git master there is a multiuser option that makes use of authentication levels.
|
||||
|
||||
'''Example of an auth file:'''
|
||||
{{{
|
||||
localclient:a7bef72a890:10
|
||||
andrew:password:10
|
||||
user3:anotherpass:5
|
||||
}}}
|
||||
'''Example of adding a new user under Linux:'''
|
||||
{{{
|
||||
echo "username:password:level" >> ~/.config/deluge/auth
|
||||
}}}
|
||||
|
||||
From the GtkUI, you will have to add the host with a username and password, if you don't do this, you won't be able to connect to the host or tell if it's online.
|
87
trac_wiki_export/wiki_dir/UserGuide%2FBandwidthTweaking
Normal file
87
trac_wiki_export/wiki_dir/UserGuide%2FBandwidthTweaking
Normal file
@ -0,0 +1,87 @@
|
||||
[[PageOutline(2-4)]]
|
||||
|
||||
== Bandwidth Tweaking ==
|
||||
|
||||
The settings below are suggestions. They are intended to give users more guidance than the settings recommended in the FAQ, but are by no means definitive.
|
||||
|
||||
The most important thing to remember is: '''The speed of your downloads is determined by the speed of your uploads.''' That's built into the bittorrent protocol, and works through what is known as "choking."
|
||||
|
||||
From the [http://www.bittorrent.org/beps/bep_0003.html BitTorrent protocol]:
|
||||
|
||||
>Choking is done for several reasons. TCP congestion control behaves very poorly when sending over many connections at once. Also, choking lets each peer use a tit-for-tat-ish algorithm to ensure that they get a consistent download rate.
|
||||
|
||||
>There are several criteria a good choking algorithm should meet. It should cap the number of simultaneous uploads for good TCP performance. It should avoid choking and unchoking quickly, known as 'fibrillation'. It should reciprocate to peers who let it download. Finally, it should try out unused connections once in a while to find out if they might be better than the currently used ones, known as optimistic unchoking.
|
||||
|
||||
>The currently deployed choking algorithm avoids fibrillation by only changing who's choked once every ten seconds. It does reciprocation and number of uploads capping by unchoking the four peers which it has the best download rates from and are interested. Peers which have a better upload rate but aren't interested get unchoked and if they become interested the worst uploader gets choked. If a downloader has a complete file, it uses its upload rate rather than its download rate to decide who to unchoke.
|
||||
|
||||
>For optimistic unchoking, at any one time there is a single peer which is unchoked regardless of it's upload rate (if interested, it counts as one of the four allowed downloaders.) Which peer is optimistically unchoked rotates every 30 seconds. To give them a decent chance of getting a complete piece to upload, new connections are three times as likely to start as the current optimistic unchoke as anywhere else in the rotation.
|
||||
|
||||
If you don't set up your uploading setting properly, you will be forever choked on your downloads.
|
||||
|
||||
=== Determine Internet Connection Speed ===
|
||||
|
||||
Go to [http://speedtest.net/ SpeedTest.net] to test your connection. It's best to do this with all other applications, including Deluge, closed. You also should run the test a few times, hours or days apart, to make sure your initial results were accurate.
|
||||
|
||||
!SpeedTest.net by default will give you results in Mbps (Mb/s). To see the results in KB/s (which is what deluge's preferences uses):
|
||||
1. Click on "Settings", located in the top left corner of the page
|
||||
1. Select "kilobytes" under "Speed Measurement"
|
||||
1. Click "Save"
|
||||
|
||||
=== Preferences: Bandwidth ===
|
||||
|
||||
==== Global Settings ====
|
||||
|
||||
|| Maximum Connections || '''250''' || (You may never see this many connections depending on your per-torrent and active-torrent limits.) ||
|
||||
|| Maximum Upload Slots || '''4''' || (Let libtorrent manage this for you. It will open more upload slots as necessary to utilize available upstream bandwidth.) ||
|
||||
|| Maximum Download Speed || '''80 - 95%''' of tested download speed || (Be careful of setting this too high--it can strangle your browsing, media streaming, etc. and other people who use your connection.)
|
||||
|| Maximum Upload Speed || '''80%''' of tested upload speed || (Upload speed is the limiter for most p2p applications.) ||
|
||||
|| Maximum Half-Open Connections: || '''10 - 50''' || (Unless you've got a Windows install with limited half-open connections. Then this should be 80% of that limit.) ||
|
||||
|
||||
Everyone got all excited when it was noticed that Microsoft had initially limited half-open connections in XP and Vista to small numbers. As a plethora of hacks came out to remove this limit, somehow "half-open connections" became the scape-goat for slow download speeds. Suddenly it became ''de riguer'' to advise Windows users to hack the TCP/IP driver and set their half-open connections to something huge, like 200.
|
||||
|
||||
Most users have no need for a setting that high, and Microsoft has removed the original limit in later releases/patches, and made it user-adjustable. (Do not patch your tcpip.sys or whatever--just update to the current official release.) The reality is that half-open connections should--rapidly--resolve to fully-opened connections or be timed-out, so you really don't need that many of them hanging around, anyway.
|
||||
|
||||
|| Maximum Connection Attempts per Second || '''20''' || (When you set your per-torrent connections and such to a reasonable number, you will establish reliable connections with plenty of peers. You shouldn't need to be banging around for thousands of new connections every minute.) ||
|
||||
|
||||
|
||||
==== Per Torrent Settings ====
|
||||
|
||||
|| ''For upload speeds of:'' || < 50 KiB/s || 50 - 150 KiB/s || 150 - 250 KiB/s || > 250 KiB/s ||
|
||||
|| Maximum Connections || 30 || 50 || 80 || 120 ||
|
||||
|| Maximum Upload Slots || 4 || 5 || 7 || 8 ||
|
||||
|
||||
While a basic premise of bit-torrenting is a big-ol' "swarm" of peers, you, as a single client, can spread yourself too thin. You're more helpful to the swarm by feeding a limited number of peers with a steady, thick stream of data, than you are by spraying out droplets of data to a huge number of peers.
|
||||
|
||||
So, you should limit your upload slots based on your upload speeds to make sure that each connected peer is getting a reasonable amount of bandwidth.
|
||||
|
||||
You should limit your number of connections because it take resources to keep track of each connection, and why track connections that are giving you a trickle if any data? One peer feeding you 5 KiB/s is worth 50 peers flickering at 0.1 KiB/s. Similarly, you don't want/need to be keeping track of a large number of peers waiting around hoping one of your upload slots comes free.
|
||||
|
||||
|| Maximum Download Speed || -1 || (Let the per-torrent speed be limited by the global settings.) ||
|
||||
|| Maximum Upload Speed || -1 || (Let the per-torrent speed be limited by the global settings.) ||
|
||||
|
||||
You can, by setting the per-torrent maximums to less than the global maximums, prevent a single torrent from using up all the allocated bandwidth and forcing all of the other (auto-managed) torrents to pause. But there is no advantage to increasing your number of active torrents. Indeed, by letting the torrent with the best speeds dominate, it will finish as quickly as possible and then stop competing for resources with the other torrents in the queue.
|
||||
|
||||
|
||||
=== Preferences: Queue ===
|
||||
|
||||
==== Active Torrents ====
|
||||
|
||||
|| ''For upload speeds of:'' || < 50 KiB/s || 50 - 150 KiB/s || 150 - 250 KiB/s || > 250 KiB/s ||
|
||||
|| Total active || 3 || 5 || 10 || 15 ||
|
||||
|| Total active downloading || 3 || 4 || 8 || 10 ||
|
||||
|| Total active seeding: || 3 || 5 || 10 || 15 ||
|
||||
|
||||
By setting "active downloading" less than the "total active" you can make sure that you are seeding completed torrents at all times.
|
||||
|
||||
Deluge always prioritizes downloads over uploads, so seeding can be set the same as total but all of your downloading slots will still get used.
|
||||
|
||||
''Note'': All downloading torrents are automatically also seeding.
|
||||
|
||||
=== Example Results ===
|
||||
|
||||
|| Assumed upload speed (KiB/s) || 25 || 50 || 150 || 250 ||
|
||||
|| Total active torrents || 3 || 5 || 10 || 15 ||
|
||||
|| Maximum upload slots per torrent || 4 || 5 || 7 || 8 ||
|
||||
|| Maximum total upload slots || 12 || 25 || 70 || 120 ||
|
||||
|| Worst-case KiB/s per upload slot || 2.1 || 2.0 || 2.1 || 2.1 ||
|
||||
|| Worst-case KiB/s per torrent || 8.3 || 10 || 15 || 17 ||
|
1
trac_wiki_export/wiki_dir/UserGuide%2FInitScript
Normal file
1
trac_wiki_export/wiki_dir/UserGuide%2FInitScript
Normal file
@ -0,0 +1 @@
|
||||
See [wiki:"UserGuide/Service"].
|
@ -0,0 +1,3 @@
|
||||
= Debian Init Script =
|
||||
|
||||
See UserGuide/InitScript/Ubuntu
|
88
trac_wiki_export/wiki_dir/UserGuide%2FInitScript%2FFedora
Normal file
88
trac_wiki_export/wiki_dir/UserGuide%2FInitScript%2FFedora
Normal file
@ -0,0 +1,88 @@
|
||||
'''For Fedora version > 15 use: [wiki:UserGuide/Service/systemd]'''
|
||||
|
||||
= Fedora Init Script =
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
#!/bin/bash
|
||||
# chkconfig: 345 85 15
|
||||
# description: deluged is the Deulge bit torrent daemon,
|
||||
# it performs downloads and manages torrents.
|
||||
# Connect to the service through the configured port.
|
||||
# Script to manage start and stopping the fedora service
|
||||
# processname: deluged
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
RETVAL=0;
|
||||
|
||||
start() {
|
||||
echo "Starting deluged service"
|
||||
daemon --user=deluge deluged -c /storage/fileshare/Torrents/.deluge/ -p 58846 -l /storage/fileshare/Torrents/.deluge/deluged.log
|
||||
RETVAL1=$?
|
||||
echo
|
||||
[ $RETVAL1 = 0 ] && touch /var/lock/subsys/deluged
|
||||
|
||||
echo "Starting deluge webui"
|
||||
#daemon --user=deluge deluge -u web -c /storage/fileshare/Torrents/.deluge/ -l /storage/fileshare/Torrents/.deluge/deluge-web.log
|
||||
#deluge -u web -c /storage/fileshare/Torrents/.deluge/ -q &
|
||||
#cant find force background option in daemon function, so I add my own &
|
||||
runuser -s /bin/bash - deluge -c "ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1 ; deluge -u web -c /storage/fileshare/Torrents/.deluge/ -l /storage/fileshare/Torrents/.deluge/deluge-web.log &"
|
||||
[ "$?" -eq 0 ] && success $"$base startup" || failure $"$base startup"
|
||||
|
||||
RETVAL2=$?
|
||||
echo
|
||||
[ $RETVAL2 = 0 ] && touch /var/lock/subsys/deluge-web
|
||||
|
||||
RETVAL=1
|
||||
if [ $RETVAL1 == 0 ]; then
|
||||
if [ $RETVAL2 == 0 ]; then
|
||||
RETVAL=0
|
||||
fi
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "Stopping deluge webui"
|
||||
killproc deluge
|
||||
RETVAL1=$?
|
||||
echo
|
||||
[ $RETVAL1 = 0 ] && rm -f /var/lock/subsys/deluge-web
|
||||
|
||||
echo "Stopping deluged service"
|
||||
killproc deluged
|
||||
RETVAL2=$?
|
||||
echo
|
||||
[ $RETVAL2 = 0 ] && rm -f /var/lock/subsys/deluged
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
status)
|
||||
status deluged
|
||||
status deluge
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
}}}
|
||||
|
@ -0,0 +1 @@
|
||||
See [wiki:"UserGuide/Service/FreeBSD"].
|
134
trac_wiki_export/wiki_dir/UserGuide%2FInitScript%2FMandriva
Normal file
134
trac_wiki_export/wiki_dir/UserGuide%2FInitScript%2FMandriva
Normal file
@ -0,0 +1,134 @@
|
||||
= Mandriva Init Script =
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Startup script for the deluged daemon
|
||||
#
|
||||
# chkconfig: 2345 84 09
|
||||
#
|
||||
# description: deluged is the Deluge bit torrent daemon,
|
||||
# it performs downloads and manages torrents.
|
||||
# Connect to the service through the configured port.
|
||||
# Script to manage start and stopping the mandriva service
|
||||
# processname: deluged
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: deluged
|
||||
# Should-Start: $network
|
||||
# Should-Stop: $network
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop: $local_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: shadok
|
||||
# Description: shadok is the Deluge bit torrent daemon,
|
||||
# it performs downloads and manages torrents.
|
||||
# Connect to the service through the configured port.
|
||||
# Script to manage start and stopping the mandriva service
|
||||
# processname: deluged
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
# Check that networking is up.
|
||||
. /etc/sysconfig/network
|
||||
[ "${NETWORKING}" = "no" ] && exit 0
|
||||
|
||||
DAEMON='deluged'
|
||||
ACCOUNT='deluge'
|
||||
HOME='/var/share/deluge'
|
||||
# ----------- naming convention -----------
|
||||
|
||||
LOG="/var/log/$DAEMON"
|
||||
PIDF="/var/run/${DAEMON}.pid"
|
||||
LOCK="/var/lock/subsys/$DAEMON"
|
||||
# ----------- basic checks -----------
|
||||
|
||||
[ ! -d "${HOME}" ] && gprintf "Can't find home %s, exit.\n" "${HOME}" && exit 1
|
||||
[ -x '/usr/bin/deluged' -a -x '/usr/bin/deluge' ] || exit 0
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
daemon_start ) # real start
|
||||
[ `id -un` != "$ACCOUNT" ] && [ "$2" != '--test' ] && exit 3
|
||||
|
||||
/usr/bin/deluged -c $HOME/.deluge/ -l $LOG -P $PIDF
|
||||
RETVAL=$?
|
||||
if [ $RETVAL -eq 0 ] ; then
|
||||
/usr/bin/deluge -u web -c $HOME/.deluge/ > $HOME/weluge.log 2>&1 &
|
||||
RETVAL=$?
|
||||
echo $! >> $PIDF
|
||||
fi
|
||||
;;
|
||||
start)
|
||||
gprintf "Starting $DAEMON daemon: "
|
||||
touch $LOG $PIDF
|
||||
chown $ACCOUNT:`id -g $ACCOUNT` $LOG $PIDF
|
||||
daemon -9 --user=$ACCOUNT --check $DAEMON /bin/ionice -c 3 $0 daemon_start
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch $LOCK
|
||||
;;
|
||||
stop | smooth-stop)
|
||||
gprintf "Shutting down $DAEMON daemon: "
|
||||
[ -r "$PIDF" ] && pid=`cat $PIDF` 2>/dev/null
|
||||
#
|
||||
# kill first, think later
|
||||
#
|
||||
kill -TERM $pid >/dev/null 2>&1
|
||||
#
|
||||
# Saving state takes time: 10 sec
|
||||
#
|
||||
timeout=10
|
||||
for p in $pid ; do
|
||||
kill -s 0 $p 2>/dev/null
|
||||
for (( ; 0==$? && 0<$timeout ; timeout=$timeout - 1 )) do
|
||||
echo -n '.'
|
||||
sleep 1
|
||||
kill -s 0 $p 2>/dev/null
|
||||
done
|
||||
done
|
||||
if [ "$timeout" -eq 0 ] ; then
|
||||
failure "%s shutdown" $DAEMON
|
||||
kill -KILL $pid >/dev/null 2>&1
|
||||
RETVAL=1
|
||||
else
|
||||
success "%s shutdown" $base
|
||||
rm -f $LOCK
|
||||
RETVAL=0
|
||||
fi
|
||||
echo
|
||||
;;
|
||||
hard-stop)
|
||||
gprintf "Fast stopping $DAEMON daemon: "
|
||||
#
|
||||
# no time to save state
|
||||
#
|
||||
killproc -d 1 $DAEMON
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f $LOCK
|
||||
;;
|
||||
status)
|
||||
status $DAEMON
|
||||
RETVAL=$?
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
condrestart)
|
||||
[ -f $LOCK ] && $0 restart || status $DAEMON
|
||||
;;
|
||||
*)
|
||||
gprintf "Usage: %s {start|stop|smooth-stop|hard-stop|status|restart}\n" "$0"
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
||||
}}}
|
268
trac_wiki_export/wiki_dir/UserGuide%2FInitScript%2FOpenSUSE
Normal file
268
trac_wiki_export/wiki_dir/UserGuide%2FInitScript%2FOpenSUSE
Normal file
@ -0,0 +1,268 @@
|
||||
= openSUSE Init Script =
|
||||
|
||||
== Deluge daemon (deluged) ==
|
||||
|
||||
{{{
|
||||
#! /bin/sh
|
||||
# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
|
||||
#
|
||||
# Author: José Ferrandis
|
||||
#
|
||||
# /etc/init.d/deluged
|
||||
#
|
||||
# and symbolic its link
|
||||
#
|
||||
# /usr/sbin/deluged
|
||||
#
|
||||
# FROM http://dev.deluge-torrent.org/wiki/UserGuide/InitScript/OpenSUSE
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: deluged
|
||||
# Required-Start: $local_fs $remote_fs
|
||||
# Required-Stop: $local_fs $remote_fs
|
||||
# Should-Start: $network
|
||||
# Should-Stop: $network
|
||||
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Daemonized version of deluge.
|
||||
# Description: Starts the deluge daemon.
|
||||
### END INIT INFO
|
||||
|
||||
DELUGED_BIN=/usr/bin/deluged
|
||||
|
||||
test -x $DELUGED_BIN || exit 5
|
||||
|
||||
DELUGED_USER="deluge"
|
||||
test -n "$DELUGED_USER" || exit 6
|
||||
|
||||
DELUGED_PIDFILE=/home/$DELUGED_USER/.config/deluge/deluged.pid
|
||||
|
||||
DELUGED_ARGS="-c /home/$DELUGED_USER/.config/deluge/ -P $DELUGED_PIDFILE" # consult man deluged for more options
|
||||
|
||||
PYTHON_EGG_CACHE=/home/$DELUGED_USER/.python-eggs
|
||||
|
||||
. /etc/rc.status
|
||||
|
||||
# Shell functions sourced from /etc/rc.status:
|
||||
# rc_check check and set local and overall rc status
|
||||
# rc_status check and set local and overall rc status
|
||||
# rc_status -v ditto but be verbose in local rc status
|
||||
# rc_status -v -r ditto and clear the local rc status
|
||||
# rc_failed set local and overall rc status to failed
|
||||
# rc_reset clear local rc status (overall remains)
|
||||
# rc_exit exit appropriate to overall rc status
|
||||
|
||||
# First reset status of this service
|
||||
rc_reset
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
|
||||
echo -n "Starting DELUGE daemon"
|
||||
## Start daemon with startproc(8). If this fails
|
||||
## the echo return value is set appropriate.
|
||||
|
||||
export PYTHON_EGG_CACHE
|
||||
startproc -l /var/log/deluged.log -p $DELUGED_PIDFILE -u $DELUGED_USER $DELUGED_BIN $DELUGED_ARGS
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down DELUGE daemon"
|
||||
## Stop daemon with killproc(8) and if this fails
|
||||
## set echo the echo return value.
|
||||
|
||||
killproc -TERM $DELUGED_BIN
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart)
|
||||
## Stop the service and if this succeeds (i.e. the
|
||||
## service was running before), start it again.
|
||||
$0 status >/dev/null && $0 restart
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
force-reload|reload)
|
||||
## Signal the daemon to reload its config. Most daemons
|
||||
## do this on signal 1 (SIGHUP).
|
||||
|
||||
echo -n "Reload service DELUGED"
|
||||
|
||||
killproc -HUP $DELUGED_BIN
|
||||
|
||||
rc_status -v
|
||||
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service DELUGED "
|
||||
## Check status with checkproc(8), if process is running
|
||||
## checkproc will return with exit status 0.
|
||||
|
||||
# Status has a slightly different for the status command:
|
||||
# 0 - service running
|
||||
# 1 - service dead, but /var/run/ pid file exists
|
||||
# 2 - service dead, but /var/lock/ lock file exists
|
||||
# 3 - service not running
|
||||
|
||||
checkproc $DELUGED_BIN
|
||||
|
||||
rc_status -v
|
||||
;;
|
||||
probe)
|
||||
## Optional: Probe for the necessity of a reload,
|
||||
## give out the argument which is required for a reload.
|
||||
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
||||
}}}
|
||||
|
||||
== Web UI (deluge-web) ==
|
||||
|
||||
{{{
|
||||
#! /bin/sh
|
||||
# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
|
||||
#
|
||||
# Author: José Ferrandis
|
||||
#
|
||||
# /etc/init.d/deluge-webd
|
||||
#
|
||||
# and symbolic its link
|
||||
#
|
||||
# /usr/sbin/deluge-webd
|
||||
#
|
||||
# FROM http://dev.deluge-torrent.org/wiki/UserGuide/InitScript/OpenSUSE
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: deluge-webd
|
||||
# Required-Start: $local_fs $remote_fs
|
||||
# Required-Stop: $local_fs $remote_fs
|
||||
# Should-Start: $network deluged
|
||||
# Should-Stop: $network
|
||||
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Daemonized version of deluge-web.
|
||||
# Description: Starts the deluge-web daemon.
|
||||
|
||||
### END INIT INFO
|
||||
|
||||
DELUGED_WEB_BIN=/usr/bin/deluge-web
|
||||
test -x $DELUGED_WEB_BIN || exit 5
|
||||
|
||||
DELUGED_WEB_USER="deluge"
|
||||
|
||||
DELUGED_WEB_ARGS="-c /home/$DELUGED_WEB_USER/.config/deluge/ -f" # consult man deluge-web for more options
|
||||
|
||||
PYTHON_EGG_CACHE=/home/$DELUGED_WEB_USER/.python-eggs
|
||||
|
||||
. /etc/rc.status
|
||||
|
||||
# Shell functions sourced from /etc/rc.status:
|
||||
# rc_check check and set local and overall rc status
|
||||
# rc_status check and set local and overall rc status
|
||||
# rc_status -v ditto but be verbose in local rc status
|
||||
# rc_status -v -r ditto and clear the local rc status
|
||||
# rc_failed set local and overall rc status to failed
|
||||
# rc_reset clear local rc status (overall remains)
|
||||
# rc_exit exit appropriate to overall rc status
|
||||
|
||||
# First reset status of this service
|
||||
rc_reset
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
|
||||
echo -n "Starting DELUGE-WEB daemon"
|
||||
## Start daemon with startproc(8). If this fails
|
||||
## the echo return value is set appropriate.
|
||||
|
||||
export PYTHON_EGG_CACHE
|
||||
startproc -f -l /var/log/deluge-web.log -u $DELUGED_WEB_USER $DELUGED_WEB_BIN $DELUGED_WEB_ARGS
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down DELUGE-WEB daemon"
|
||||
## Stop daemon with killproc(8) and if this fails
|
||||
## set echo the echo return value.
|
||||
|
||||
killproc -TERM $DELUGED_WEB_BIN
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart)
|
||||
## Stop the service and if this succeeds (i.e. the
|
||||
## service was running before), start it again.
|
||||
$0 status >/dev/null && $0 restart
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
force-reload|reload)
|
||||
## Signal the daemon to reload its config. Most daemons
|
||||
## do this on signal 1 (SIGHUP).
|
||||
|
||||
echo -n "Reload service DELUGED_WEB"
|
||||
|
||||
killproc -HUP $DELUGED_WEB_BIN
|
||||
|
||||
rc_status -v
|
||||
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service DELUGED_WEB "
|
||||
## Check status with checkproc(8), if process is running
|
||||
## checkproc will return with exit status 0.
|
||||
|
||||
# Status has a slightly different for the status command:
|
||||
# 0 - service running
|
||||
# 1 - service dead, but /var/run/ pid file exists
|
||||
# 2 - service dead, but /var/lock/ lock file exists
|
||||
# 3 - service not running
|
||||
|
||||
checkproc $DELUGED_WEB_BIN
|
||||
|
||||
rc_status -v
|
||||
;;
|
||||
probe)
|
||||
## Optional: Probe for the necessity of a reload,
|
||||
## give out the argument which is required for a reload.
|
||||
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
||||
}}}
|
@ -0,0 +1 @@
|
||||
See [wiki:"UserGuide/Service/DebianUbuntuInitd"].
|
@ -0,0 +1 @@
|
||||
See [wiki:"UserGuide/Service/Upstart"].
|
@ -0,0 +1 @@
|
||||
See [wiki:"UserGuide/Service/systemd"].
|
29
trac_wiki_export/wiki_dir/UserGuide%2FService
Normal file
29
trac_wiki_export/wiki_dir/UserGuide%2FService
Normal file
@ -0,0 +1,29 @@
|
||||
= Deluge Service =
|
||||
|
||||
== What is a service? ==
|
||||
|
||||
Operating systems use services to start applications on system boot and leave them running in the background. They will also stop the application nicely on system shutdown and automatically restart them if they crash.
|
||||
|
||||
The Deluge daemon `deluged` and Web UI `deluge-web` can both be run as services.
|
||||
|
||||
== Linux ==
|
||||
|
||||
Most Linux distributions now use systemd. See [https://en.wikipedia.org/wiki/Systemd#Adoption_and_reception wikipedia] for releases with systemd as ''default''.
|
||||
|
||||
* [wiki:UserGuide/Service/systemd systemd]
|
||||
|
||||
* [wiki:UserGuide/Service/Upstart Upstart] ''(Ubuntu 11.04 to 14.10)''
|
||||
|
||||
* [wiki:UserGuide/Service/DebianUbuntuInitd init.d] ''(Obsolete)''
|
||||
|
||||
== Microsoft Windows ==
|
||||
|
||||
* [wiki:UserGuide/Service/MS_Windows Windows service]
|
||||
|
||||
== Apple OS X ==
|
||||
|
||||
* [wiki:UserGuide/Service/launchd launchd]
|
||||
|
||||
== FreeBSD ==
|
||||
|
||||
* [wiki:UserGuide/Service/FreeBSD rc.d]
|
@ -0,0 +1,252 @@
|
||||
= Ubuntu Init Script =
|
||||
|
||||
----
|
||||
'''This page is for obsolete/unsupported Ubuntu distributions, see [wiki:UserGuide/Service/systemd systemd] or [wiki:UserGuide/Service/Upstart Upstart] depending on your distribution.'''
|
||||
----
|
||||
|
||||
Based upon the script created [http://apocryph.org/2008/11/30/setting_deluge_headless_ubuntu_seedbox_windows_client/ here].
|
||||
|
||||
Put this in /etc/default/deluge-daemon and set DELUGED_USER to the user you which to run deluge as
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
# Configuration for /etc/init.d/deluge-daemon
|
||||
|
||||
# The init.d script will only run if this variable non-empty.
|
||||
DELUGED_USER="" # !!!CHANGE THIS!!!!
|
||||
|
||||
# Should we run at startup?
|
||||
RUN_AT_STARTUP="YES"
|
||||
}}}
|
||||
|
||||
This should be placed in /etc/init.d/deluge-daemon
|
||||
{{{
|
||||
#!sh
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: deluge-daemon
|
||||
# Required-Start: $local_fs $remote_fs
|
||||
# Required-Stop: $local_fs $remote_fs
|
||||
# Should-Start: $network
|
||||
# Should-Stop: $network
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Daemonized version of deluge and webui.
|
||||
# Description: Starts the deluge daemon with the user specified in
|
||||
# /etc/default/deluge-daemon.
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Adolfo R. Brandes
|
||||
# Updated by: Jean-Philippe "Orax" Roemer
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC="Deluge Daemon"
|
||||
NAME1="deluged"
|
||||
NAME2="deluge"
|
||||
DAEMON1=/usr/bin/deluged
|
||||
DAEMON1_ARGS="-d" # Consult `man deluged` for more options
|
||||
DAEMON2=/usr/bin/deluge-web
|
||||
DAEMON2_ARGS="" # Consult `man deluge-web` for more options
|
||||
PIDFILE1=/var/run/$NAME1.pid
|
||||
PIDFILE2=/var/run/$NAME2.pid
|
||||
UMASK=022 # Change this to 0 if running deluged as its own user
|
||||
PKGNAME=deluge-daemon
|
||||
SCRIPTNAME=/etc/init.d/$PKGNAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON1" -a -x "$DAEMON2" ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/$PKGNAME ] && . /etc/default/$PKGNAME
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
[ -f /etc/default/rcS ] && . /etc/default/rcS
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
if [ -z "$RUN_AT_STARTUP" -o "$RUN_AT_STARTUP" != "YES" ]
|
||||
then
|
||||
log_warning_msg "Not starting $PKGNAME, edit /etc/default/$PKGNAME to start it."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$DELUGED_USER" ]
|
||||
then
|
||||
log_warning_msg "Not starting $PKGNAME, DELUGED_USER not set in /etc/default/$PKGNAME."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#
|
||||
# Function to verify if a pid is alive
|
||||
#
|
||||
is_alive()
|
||||
{
|
||||
pid=`cat $1` > /dev/null 2>&1
|
||||
kill -0 $pid > /dev/null 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
|
||||
is_alive $PIDFILE1
|
||||
RETVAL1="$?"
|
||||
|
||||
if [ $RETVAL1 != 0 ]; then
|
||||
rm -f $PIDFILE1
|
||||
start-stop-daemon --start --background --quiet --pidfile $PIDFILE1 --make-pidfile \
|
||||
--exec $DAEMON1 --chuid $DELUGED_USER --user $DELUGED_USER --umask $UMASK -- $DAEMON1_ARGS
|
||||
RETVAL1="$?"
|
||||
else
|
||||
is_alive $PIDFILE2
|
||||
RETVAL2="$?"
|
||||
[ "$RETVAL2" = "0" -a "$RETVAL1" = "0" ] && return 1
|
||||
fi
|
||||
|
||||
is_alive $PIDFILE2
|
||||
RETVAL2="$?"
|
||||
|
||||
if [ $RETVAL2 != 0 ]; then
|
||||
sleep 2
|
||||
rm -f $PIDFILE2
|
||||
start-stop-daemon --start --background --quiet --pidfile $PIDFILE2 --make-pidfile \
|
||||
--exec $DAEMON2 --chuid $DELUGED_USER --user $DELUGED_USER --umask $UMASK -- $DAEMON2_ARGS
|
||||
RETVAL2="$?"
|
||||
fi
|
||||
[ "$RETVAL1" = "0" -a "$RETVAL2" = "0" ] || return 2
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --user $DELUGED_USER --pidfile $PIDFILE2
|
||||
RETVAL2="$?"
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --user $DELUGED_USER --pidfile $PIDFILE1
|
||||
RETVAL1="$?"
|
||||
[ "$RETVAL1" = "2" -o "$RETVAL2" = "2" ] && return 2
|
||||
|
||||
rm -f $PIDFILE1 $PIDFILE2
|
||||
|
||||
[ "$RETVAL1" = "0" -a "$RETVAL2" = "0" ] && return 0 || return 1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME1"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME1"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
log_daemon_msg "Restarting $DESC" "$NAME1"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
|
||||
}}}
|
||||
|
||||
Make the script executable by root
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
sudo chmod 755 /etc/init.d/deluge-daemon
|
||||
}}}
|
||||
|
||||
Run this script on start up
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
sudo update-rc.d deluge-daemon defaults
|
||||
}}}
|
||||
|
||||
Start the daemon
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
sudo invoke-rc.d deluge-daemon start
|
||||
}}}
|
||||
|
||||
== Make deluge log something ==
|
||||
Create a structure for deluge to log to:
|
||||
{{{
|
||||
sudo mkdir -p /var/log/deluge/daemon
|
||||
sudo mkdir /var/log/deluge/web
|
||||
}}}
|
||||
Give the user that deluge is running as (in this case deluge) write-access to the logs
|
||||
{{{
|
||||
sudo chmod -R 755 /var/log/deluge
|
||||
sudo chown -R deluge /var/log/deluge
|
||||
}}}
|
||||
Edit the init-script like so:
|
||||
{{{
|
||||
#!sh
|
||||
DAEMON1=/usr/bin/deluged
|
||||
DAEMON1_ARGS="-d -L warning -l /var/log/deluge/daemon/warning.log" # Consult `man deluged` for more options
|
||||
DAEMON2=/usr/bin/deluge-web
|
||||
DAEMON2_ARGS="-L warning -l /var/log/deluge/web/warning.log"
|
||||
}}}
|
||||
* See [wiki:Faq#EnableDelugeLogging Logging] for possible loglevels.
|
||||
Restart the daemon
|
||||
{{{
|
||||
sudo invoke-rc.d deluge-daemon restart
|
||||
}}}
|
||||
Tell logrotate to rotate the logs
|
||||
{{{
|
||||
sudo cat > /etc/logrotate.d/deluge << EOF
|
||||
/var/log/deluge/*/*.log {
|
||||
weekly
|
||||
missingok
|
||||
rotate 7
|
||||
compress
|
||||
notifempty
|
||||
copytruncate
|
||||
create 600
|
||||
}
|
||||
EOF
|
141
trac_wiki_export/wiki_dir/UserGuide%2FService%2FFreeBSD
Normal file
141
trac_wiki_export/wiki_dir/UserGuide%2FService%2FFreeBSD
Normal file
@ -0,0 +1,141 @@
|
||||
= FreeBSD Init Script =
|
||||
These scripts assume that the deluged daemon has been run once by a user named "deluge" with home directory "deluge".
|
||||
== Deluged ==
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
#!/bin/sh
|
||||
#
|
||||
# deluged RCng startup script
|
||||
# created by: R.S.A. aka .faust
|
||||
# mail: rsa dot aka dot f at gmail dot com
|
||||
#
|
||||
|
||||
# PROVIDE: deluged
|
||||
# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following line to /etc/rc.conf.local or /etc/rc.conf to enable deluged at startup
|
||||
# deluged_enable="YES"
|
||||
#
|
||||
# cfg_dir (str): Specify the full path to directory with deluged config files
|
||||
# log (str): Specify the full path to the LOG file
|
||||
# loglevel (str): Set loglevel (Available: none, info, warning, error, critical, debug)
|
||||
# pidfile (str): Specify the full path to the PID file
|
||||
# deluged_user (str): Set to user running deluged
|
||||
#
|
||||
# Warning! Rights to folders and files must be "rwx" for the user under which deluged is run
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="deluged"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
load_rc_config $name
|
||||
deluged_enable=${deluged_enable:=NO}
|
||||
|
||||
cfg_dir="/home/deluge/.config/deluge/"
|
||||
log="${cfg_dir}${name}.log"
|
||||
loglevel="error"
|
||||
pidfile="${cfg_dir}${name}.pid"
|
||||
deluged_user="deluge"
|
||||
|
||||
required_dirs=${cfg_dir}
|
||||
|
||||
command_interpreter="/usr/local/bin/python"
|
||||
command="/usr/local/bin/${name}"
|
||||
start_cmd="${name}_start"
|
||||
|
||||
deluged_start()
|
||||
{
|
||||
if [ ! -f "${pidfile}" ]; then
|
||||
su -m ${deluged_user} -c "/usr/local/bin/${name} -c ${cfg_dir} -L ${loglevel} -l ${log} -P ${pidfile}"
|
||||
echo "Starting ${name}."
|
||||
else
|
||||
GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/deluged/ && !/awk/ && !/sh/ {print $2}'`
|
||||
PIDFROMFILE=`cat ${pidfile}`
|
||||
if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then
|
||||
echo "${name} already running with PID: ${PIDFROMFILE} ?"
|
||||
echo "Remove ${pidfile} manually if needed."
|
||||
else
|
||||
rm -f ${pidfile}
|
||||
su -m ${deluged_user} -c "/usr/local/bin/${name} -c ${cfg_dir} -l ${log} -P ${pidfile}"
|
||||
echo "Starting ${name}."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
run_rc_command "$1"
|
||||
}}}
|
||||
|
||||
== Web UI ==
|
||||
|
||||
{{{
|
||||
#!sh
|
||||
#!/bin/sh
|
||||
#
|
||||
# deluge-web RCng startup script
|
||||
# created by: R.S.A. aka .faust
|
||||
# mail: rsa dot aka dot f at gmail dot com
|
||||
#
|
||||
|
||||
# PROVIDE: delugew
|
||||
# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following line to /etc/rc.conf.local or /etc/rc.conf to enable deluge-web at startup
|
||||
# delugew_enable="YES"
|
||||
#
|
||||
# cfg_dir (str): Specify the full path to directory with deluge-web config files
|
||||
# log (str): Specify the full path to the LOG file
|
||||
# pidfile (str): Specify the full path to the PID file
|
||||
# delugew_user (str): Set to user running deluge-web
|
||||
#
|
||||
# Warning! Rights to folders and files must be "rwx" for the user under which deluge-web is run
|
||||
. /etc/rc.subr
|
||||
|
||||
name="delugew"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
load_rc_config $name
|
||||
delugew_enable=${delugew_enable:=NO}
|
||||
|
||||
cfg_dir="/home/deluge/.config/deluge/"
|
||||
log="${cfg_dir}${name}.log"
|
||||
pidfile="${cfg_dir}${name}.pid"
|
||||
delugew_user="deluge"
|
||||
|
||||
required_dirs=${cfg_dir}
|
||||
|
||||
command_interpreter="/usr/local/bin/python"
|
||||
command="/usr/local/bin/deluge-web"
|
||||
start_cmd="${name}_start"
|
||||
start_postcmd="${name}_poststart"
|
||||
|
||||
delugew_start()
|
||||
{
|
||||
if [ ! -f "${pidfile}" ]; then
|
||||
su -m ${delugew_user} -c "/usr/local/bin/deluge-web -f -c ${cfg_dir} -l ${log}"
|
||||
echo "Starting ${name}."
|
||||
else
|
||||
GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/deluge-web/ && !/awk/ && !/sh/ {print $2}'`
|
||||
PIDFROMFILE=`cat ${pidfile}`
|
||||
if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then
|
||||
echo "${name} already running with PID: ${PIDFROMFILE} ?"
|
||||
echo "Remove ${pidfile} manually if needed."
|
||||
else
|
||||
rm -f ${pidfile}
|
||||
su -m ${delugew_user} -c "/usr/local/bin/deluge-web -f -c ${cfg_dir} -l ${log}"
|
||||
echo "Starting ${name}."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
delugew_poststart()
|
||||
{
|
||||
echo `/bin/ps -auxw | /usr/bin/awk '/deluge-web/ && !/awk/ {print $2}'` > $pidfile
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
}}}
|
@ -0,0 +1 @@
|
||||
Moved to: https://deluge.readthedocs.io/en/latest/how-to/nssm-service.html
|
153
trac_wiki_export/wiki_dir/UserGuide%2FService%2FUpstart
Normal file
153
trac_wiki_export/wiki_dir/UserGuide%2FService%2FUpstart
Normal file
@ -0,0 +1,153 @@
|
||||
= Ubuntu Upstart Job =
|
||||
|
||||
'''This page only applies to Ubuntu 11.04 Natty up to 14.10 Utopic, for newer Ubuntu distributions see: [wiki:UserGuide/Service/systemd systemd].'''
|
||||
|
||||
[[PageOutline(2-10,Ubuntu Upstart Job)]]
|
||||
|
||||
Firstly ensure Deluge daemon and Web UI are installed:
|
||||
{{{
|
||||
sudo apt-get install deluged deluge-web
|
||||
}}}
|
||||
|
||||
== User Management ==
|
||||
|
||||
It is best to run Deluge upstart scripts with a specific user and group. You can create one using the following command:
|
||||
|
||||
{{{
|
||||
sudo adduser --system --group --home /var/lib/deluge deluge
|
||||
}}}
|
||||
|
||||
* This creates a new system user and group named `deluge` with no login access and home directory: `/var/lib/deluge`
|
||||
|
||||
Add any users you wish to be able to easily manage or access files downloaded through Deluge to the group deluge will run as, for example:
|
||||
|
||||
{{{
|
||||
sudo adduser <username> deluge
|
||||
}}}
|
||||
|
||||
== Deluge Daemon (deluged) Job ==
|
||||
|
||||
Create the file `/etc/init/deluged.conf` with the following code and set `uid` and `gid` to the user and group you wish to run `deluged` as:
|
||||
|
||||
''Note: 11.04 Natty users replace `static-network-up` with `stopped networking`''
|
||||
{{{
|
||||
# deluged - Deluge daemon
|
||||
#
|
||||
# The daemon component of Deluge BitTorrent client. Deluge UI clients
|
||||
# connect to this daemon via DelugeRPC protocol.
|
||||
|
||||
description "Deluge daemon"
|
||||
author "Deluge Team"
|
||||
|
||||
start on filesystem and static-network-up
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
respawn limit 5 30
|
||||
|
||||
env uid=deluge
|
||||
env gid=deluge
|
||||
env umask=007
|
||||
|
||||
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d
|
||||
}}}
|
||||
* You may wish to modify the above `umask` as it applies to any files downloaded by deluged.
|
||||
* 007 grants full access to the user and members of the group deluged is running as (in this case deluge) and prevents access from all other accounts.
|
||||
* 022 grants full access to the user deluged is running as and only read access to other accounts.
|
||||
* 000 grants full access to all accounts.
|
||||
Refer to [http://en.wikipedia.org/wiki/Umask#Octal_umasks Wikipedia] for details of possible values and their effects. Deluged must be stopped and started instead of just restarted after changes. If you enable logging, as described later in this page, the umasks specified here also affect the permissions of newly created logs.
|
||||
|
||||
== Deluge Web UI (deluge-web) Job ==
|
||||
|
||||
Create the file `/etc/init/deluge-web.conf` with the following code and set `uid` and `gid` as required:'''
|
||||
{{{
|
||||
# deluge-web - Deluge Web UI
|
||||
#
|
||||
# The Web UI component of Deluge BitTorrent client, connects to deluged and
|
||||
# provides a web application interface for users. Default url: http://localhost:8112
|
||||
|
||||
description "Deluge Web UI"
|
||||
author "Deluge Team"
|
||||
|
||||
start on started deluged
|
||||
stop on stopping deluged
|
||||
|
||||
respawn
|
||||
respawn limit 5 30
|
||||
|
||||
env uid=deluge
|
||||
env gid=deluge
|
||||
env umask=027
|
||||
|
||||
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web
|
||||
}}}
|
||||
''umask `027` grants full access to `uid`, read access to `gid` and prevents access from all other accounts. This should only affect the permissions of plugins installed through the Web UI and, if enabled, logs. Group permissions are restricted to read-only to prevent compromised member accounts injecting malicious code into plugins or modifying the logs.''
|
||||
|
||||
|
||||
== Migration from init.d script ==
|
||||
If you followed the old guide to create an init script you need to remove them:
|
||||
{{{
|
||||
sudo /etc/init.d/deluge-daemon stop
|
||||
sudo rm /etc/init.d/deluge-daemon
|
||||
sudo update-rc.d deluge-daemon remove
|
||||
}}}
|
||||
|
||||
== Starting (and stopping) Upstart Scripts ==
|
||||
|
||||
=== Deluge Daemon ===
|
||||
{{{
|
||||
sudo start deluged
|
||||
}}}
|
||||
{{{
|
||||
sudo stop deluged
|
||||
}}}
|
||||
|
||||
=== Web UI ===
|
||||
Although the Web UI will start/stop automatically when deluged starts/stops it can be manually controlled with:
|
||||
{{{
|
||||
sudo start deluge-web
|
||||
}}}
|
||||
{{{
|
||||
sudo stop deluge-web
|
||||
}}}
|
||||
''Note: To prevent the web UI starting automatically comment out (# prefix) the '`start on`' line in `deluge-web.conf`.''
|
||||
|
||||
== Logging ==
|
||||
Create a structure for Deluge to log to and give the user that Deluge is running as (in this case `deluge`) full access to that directory:
|
||||
{{{
|
||||
sudo mkdir -p /var/log/deluge
|
||||
sudo chown -R deluge:deluge /var/log/deluge
|
||||
sudo chmod -R 750 /var/log/deluge
|
||||
}}}
|
||||
* Note: The above commands affect the log directory and all files within it, combined with the umask specified in the upstart jobs these affect the permissions new logs are created with.
|
||||
* 750 grants full access to the deluge user, only recurse tree and read access to members of the deluge group and prevents access from all other accounts. [http://en.wikipedia.org/wiki/Chmod#Octal_numbers Chmod]
|
||||
Edit the upstart job confs like so:
|
||||
{{{
|
||||
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d -l /var/log/deluge/daemon.log -L warning
|
||||
}}}
|
||||
{{{
|
||||
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web -- -l /var/log/deluge/web.log -L warning
|
||||
}}}
|
||||
* Refer to the [wiki:Faq#EnableDelugeLogging FAQ] for possible log-levels.
|
||||
|
||||
Restart the daemon:
|
||||
{{{
|
||||
sudo restart deluged
|
||||
}}}
|
||||
|
||||
Create `/etc/logrotate.d/deluge` with the following code to rotate the logs:
|
||||
{{{
|
||||
/var/log/deluge/*.log {
|
||||
rotate 4
|
||||
weekly
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
sharedscripts
|
||||
postrotate
|
||||
initctl restart deluged >/dev/null 2>&1 || true
|
||||
initctl restart deluge-web >/dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
}}}
|
1
trac_wiki_export/wiki_dir/UserGuide%2FService%2Flaunchd
Normal file
1
trac_wiki_export/wiki_dir/UserGuide%2FService%2Flaunchd
Normal file
@ -0,0 +1 @@
|
||||
Moved to: https://deluge.readthedocs.io/en/latest/how-to/launchd-service.html
|
1
trac_wiki_export/wiki_dir/UserGuide%2FService%2Fsystemd
Normal file
1
trac_wiki_export/wiki_dir/UserGuide%2FService%2Fsystemd
Normal file
@ -0,0 +1 @@
|
||||
Moved to: https://deluge.readthedocs.io/en/latest/how-to/systemd-service.html
|
162
trac_wiki_export/wiki_dir/UserGuide%2FThinClient
Normal file
162
trac_wiki_export/wiki_dir/UserGuide%2FThinClient
Normal file
@ -0,0 +1,162 @@
|
||||
= Thin Client =
|
||||
|
||||
[[PageOutline(2-4,,inline)]]
|
||||
|
||||
Deluge can be setup in such a way that a Deluge daemon, `deluged`, can be setup on a central computer, `server`, which can then be accessed and controlled by other computers, `clients`, using one of Deluge's UIs.
|
||||
|
||||
* Both the Deluge client and daemon need to be the same major versions, i.e. both `1.2.x` or both `1.3.x`.
|
||||
|
||||
== Deluge Daemon Setup ==
|
||||
|
||||
The Deluge daemon `deluged` and `deluge-console` should be [wiki:Installing installed] on the server.
|
||||
|
||||
See the [UserGuide/Service service guides] to run `deluged` as a service so that it starts/stops on server boot/shutdown. Substitute any daemon start or stop commands below with the appropriate service commands.
|
||||
|
||||
To debug any problems setting up `deluged` [wiki:Faq#HowdoIstartthedaemonwithloggingenabled enable logging] and check for errors.
|
||||
|
||||
=== Create Default Config ===
|
||||
|
||||
To create the config directory and populate with the default files, run and then stop `deluged`. ''(If using a service substitute appropriate operating system commands)'':
|
||||
{{{
|
||||
#!sh
|
||||
deluged
|
||||
killall deluged
|
||||
}}}
|
||||
|
||||
''Note: The config location is either the [wiki:Faq#WheredoesDelugestoreitssettingsconfig default location] with reference to the `user` that `deluged` is running as. Alternatively if using a service it will be specified in the service config files with `-c <path>` option.''
|
||||
|
||||
=== Add User to the authentication file ===
|
||||
|
||||
Create a Deluge user for clients/UIs to access the daemon by editing the authentication file, `auth`, located in the above config location.
|
||||
|
||||
The `auth` file should consist of lines of `<username>:<password>:<level>`. Replace <username> and <password> with your choice and <level> with the desired [UserGuide/Authentication authentication level].
|
||||
|
||||
You can use your favourite text editor to achieve this or can be done with a one-line echo command e.g.:
|
||||
{{{
|
||||
#!sh
|
||||
echo "alice:MyC0mpL3xPass:10" >> ~/.config/deluge/auth
|
||||
}}}
|
||||
|
||||
=== Enable Remote Connection ===
|
||||
|
||||
We will use `deluge-console` to configure `deluged` to accept connections from computers other than `localhost`. For `SSH Tunnelling` you do not need to enable remote connections so this step can be skipped.
|
||||
|
||||
Using the Console in command-line mode, set the `allow_remote` option and then verify with these commands:
|
||||
{{{
|
||||
#!sh
|
||||
deluge-console "config -s allow_remote True"
|
||||
deluge-console "config allow_remote"
|
||||
}}}
|
||||
|
||||
If you are running `deluged` under another user (e.g. `deluge`) you will need to temporarily login as that user to enable deluge-console to access that daemon's config:
|
||||
{{{
|
||||
#!sh
|
||||
su --shell /bin/bash --login deluge
|
||||
}}}
|
||||
|
||||
Alternatively you can edit `core.conf` (`deluged` must not be running) in the config and change `allow_remote` from `false` to `true`.
|
||||
|
||||
=== Start Deluge Daemon ===
|
||||
|
||||
{{{
|
||||
deluged
|
||||
}}}
|
||||
|
||||
=== Verify Server IP Address ===
|
||||
|
||||
You will need to know the server's IP address for configuring clients, for private IP: `hostname -I` or public IP: `curl ifconfig.me`
|
||||
|
||||
Congratulations! The server is now setup for remote client access.
|
||||
|
||||
-------
|
||||
|
||||
== Client Setup ==
|
||||
|
||||
=== Accessing deluged service with local UI Client ===
|
||||
When attempting to access a daemon `deluged` on the same machine but running as a different user e.g. your login user is `user` and `deluged` is running as `deluge`, you may be unable access to `deluged`. This is due to the client automatically authorising using the localhost line in the auth file, which is assumed to be at the same config location as `deluged`.
|
||||
|
||||
The workaround is to replace the `localclient` line in your user config auth file (`~/.config/deluge/auth`) with the `localclient` line from the `deluged` config `auth` file e.g. `/var/lib/deluge/auth`.
|
||||
|
||||
=== GTK UI ===
|
||||
|
||||
The Deluge GTK UI setup require switching the GTK UI from Classic mode to Thin-client mode, then adding and connecting to the remote daemon on the server.
|
||||
|
||||
1. In `Preferences -> Interface` and disable (untick) `Classic Mode`
|
||||
1. Restart `deluge` and you should see the `Connection Manager`.
|
||||
* If it is not needed you can remove the `localhost` daemon.
|
||||
* If SSH Tunnelling, before continuing [UserGuide/ThinClient#CreateSSHTunnel Create SSH Tunnel], and for `Hostname`, below, `127.0.0.2` ''must'' be used.
|
||||
1. Create a new entry with `Add` button:
|
||||
* `Hostname` is your server's IP.
|
||||
* `Port` should be default `58846`.
|
||||
* `Username` and `Password` are those added to the `deluged` config `auth` file.
|
||||
|
||||
If this was successful a green tick should now appear as the status for the daemon you just added.
|
||||
|
||||
Click on `Connect` and the Connection Manager should disappear.
|
||||
|
||||
''Optional step:'' Expand `Options` and select '`Automatically connect to selected host on startup`' and '`Do not show this dialog on start-up`'.
|
||||
|
||||
|
||||
|
||||
Congratulations! You can now access the Deluge daemon, `deluged`, on the server via the GTK UI.
|
||||
|
||||
|
||||
=== Console ===
|
||||
|
||||
If accessing a local `deluged` daemon run the following and it will connect automatically:
|
||||
{{{
|
||||
deluge-console
|
||||
}}}
|
||||
|
||||
To connect to a remote daemon use the `connect` command in deluge-console:
|
||||
{{{
|
||||
connect <host>[:<port>] <user> <password>
|
||||
}}}
|
||||
or from the terminal:
|
||||
{{{
|
||||
deluge-console "connect <host>[:<port>] <user> <password>"
|
||||
}}}
|
||||
For adding torrents directly to the daemon through automatic methods such as with autodl-irssi:
|
||||
{{{
|
||||
deluge-console "connect <host>[:<port>] <user> <password> ; add $(TorrentPathName) ; exit"
|
||||
}}}
|
||||
|
||||
|
||||
=== Web UI ===
|
||||
|
||||
The Web UI is slightly different as the `client` is a web server daemon `deluge-web` that connects to a running `deluged`.
|
||||
|
||||
1. [wiki:Installing Install ] `deluge-web` and run it:
|
||||
{{{
|
||||
#!sh
|
||||
deluge-web
|
||||
}}}
|
||||
Note: To run it in the background as a daemon, use `--fork` option. You may also want to set it up as a [UserGuide/InitScript service].
|
||||
|
||||
In your web browser, enter the url below where <server> is the IP address of the server:
|
||||
{{{
|
||||
http://<server>:8112
|
||||
}}}
|
||||
|
||||
* Default password is: `deluge`
|
||||
|
||||
Congratulations! You can now access deluge on the server via the Web UI.
|
||||
|
||||
----------
|
||||
|
||||
== Create SSH Tunnel ==
|
||||
|
||||
From Deluge 1.2 onward, all communication between the GTK UI and daemon is encrypted using a automatically generated self-signed certificate so SSH tunneling is not a requirement if you are on a trusted local network. If you access the daemon over the internet, you should still use a SSH tunnel.
|
||||
|
||||
In a Terminal, enter the following, replacing `<server>` with the public IP of your server.
|
||||
{{{
|
||||
#!sh
|
||||
ssh -fNL 127.0.0.2:58846:localhost:58846 <server>
|
||||
}}}
|
||||
Note: We use `127.0.0.2` instead of `localhost` so that Deluge client knows that we are connecting to a remote daemon. Otherwise you will encounter problems with file browsing as it will assume to be on local client machine rather than remote server.
|
||||
|
||||
If you get the error '`bind: Can't assign requested address`', you need to add `127.0.0.2` as an alias for the loopback device:
|
||||
{{{
|
||||
#!sh
|
||||
sudo ifconfig lo0 add 127.0.0.2
|
||||
}}}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user