Giter Site home page Giter Site logo

pyroscope / rtorrent-ps Goto Github PK

View Code? Open in Web Editor NEW
455.0 29.0 43.0 3.37 MB

:art: Extended rTorrent distribution with a fully customizable canvas and colors, other feature additions, and complete docs.

Home Page: http://rtorrent-ps.readthedocs.io/

License: GNU General Public License v2.0

Shell 19.61% Python 20.11% C++ 60.27%
c-plus-plus rtorrent curses distribution user-interface

rtorrent-ps's Introduction

Migrated pyroscope Google Code repository

⚠️ This is the original subversion repository migrated from https://code.google.com/p/pyroscope/ to GitHub. It is only here for archival purposes, see pyroscope/pyrocore and pyroscope/rtorrent-ps for any further development.
🐛 Old issues are available in the issue tracker of this project! Open new issues in the tracker of the respective new project; new issues opened here will be instantly closed.

WHAT'S HERE?

Nothing of interest to you. Please read the notices at the top of this README.

rtorrent-ps's People

Contributors

bobobo1618 avatar chros73 avatar kannibalox avatar nosubstitute avatar pyroscope avatar robfrawley avatar tochev avatar xsmile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtorrent-ps's Issues

Modify rpath-linking to use relative path

Is that possible? It would be a great improvement.
Right now, if I move a compiled dir into another one rtorrent won't work.
I tried myself but I failed in a pretty bad way :)

If it's manageable then modify symlinks as well to use relative path.

Stucked http/htpps (announce) requests

I compiled rtorrent-ps about a month ago from current master on Ubuntu 14.04 x64 and I noticed that there are stucked http/https (announce) requests regardless what tracker is used: it seems they won't disappear anymore (after 1 day I have 10 [H 10/99]). And the bigger problem is that announcing those torrents to the tracker doesn't work anymore (meaning we won't get new peers).
In status you can see this:
Tracker[0:0]: Connecting to http...

Can the problem be the recent curl?

RT_PS_CARES_VERSION=1.10.0
RT_PS_CURL_VERSION=7.47.1
RT_PS_XMLRPC_REV=2775

The old 0.9.6 versions (I don't recall whether this had the problem or not but it was a long time ago):

RT_PS_CARES_VERSION=1.10.0
RT_PS_CURL_VERSION=7.38.0
RT_PS_XMLRPC_REV=2626

Installation process on OS X

I was trying to install it on Mac OS X, but I don't know where to start.
I can download the source and compile, but don't know how to apply the patches and generate a working binary.
If it had a Homebrew recipe it will be much better, which will benefit all Mac users.
Or at least the README would be updated with instructions to install it.
Thanks for this great project.

Provide a sane / modern daemon access API

Explore options:

  • gRPC
  • HTTP + JSON

Add missing use-cases for efficient client/server interaction:

  • query language for items
  • bulk operations
  • streaming state changes (event queues)

How many torrents per instance? Is there a safe limit?

I am currently seeding ~ 1800 torrents, ~ 50 MB average size of each torrent. There are about 15K more that I plan to add and seed indefinitely. I see that I'd need to run multiple instances of rTorrent, but would like to know how many to keep per instance. Is there a safe no. where the reliability of rTorrent isn't affected? (crashing, missing torrent files in watch directory, forgetting where data is, problems bulk hash-checking/rehashing, etc.)

Any advice is appreciated. Thanks!

PS: I am thinking ~ 7k per instance, but if known to be safe, doing 10k would be awesome and much less pain.

Small doc update

Thanks for the packaging info in the main Readme file.
Just a small correction, instead of this:
./build.sh pkg2deb
the correct could be:
export DEBFULLNAME="pyroscope"; export DEBEMAIL="[email protected]"; ./build.sh pkg2deb

Build script - Arch Linux support

Support building packages for Arch Linux. See fork https://github.com/xsmile/rtorrent-ps for changes to the build script.

Things to consider:

  • different package naming conventions
  • architecture specific CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, MAKEFLAGS can be sourced from /etc/makepkg.conf
  • creating a package: RT_PS_VERSION, RT_PS_REVISION must not contain a hyphen (-)

Attached are a log files for the "install" and "pkg2pacman" operations, in case you want to trace the whole process yourself: rtorrent-ps-arch.zip

$ lsb_release -a
LSB Version:	1.4
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
$ gcc --version | head -n1 | tr -s '()' ' ' | cut -f2 -d' '
GCC

can't display correctly in the terminal (such as xshell)

1.It seems that rtorrent-ps can't display correctly in the terminal such as xshell.
pyroscope

2.It can't redraw after resize the terminal window.

but when display in the os's terminal(like mate-terminal), it has no problem.

os: Fedora 22
rtorrent: 0.9.6
pyroscope: latest version
terminal xshell 5

Command: view.query=viewname,condition(s)

  • Like view.filter, but return a list of hashes instead of changing the view display
  • Use a more versatile query language? (SQL like dialect)
  • Need at least an operator comparing item attributes against a literal string / a pattern / a regex
  • Include optional sorting, and field selection?

Add "pkg2rpm" to build script

Just curious if there is a RPM based install script already so I can install / build on a opensuse 42.2 machine.

Thanks.

Command: ui.notice=duration,message

  • short message replacing title bar, disappearing after X secs
  • possibly just in "downloadlist" (main canvas)
  • ui.notice=0 to clear
  • add ui.notice as feedback to certain key bindings

Installation on gentoo

Hey there,
I was told about this project, and as the ui looks really good and your based on rtorrent,
I would like to install it on gentoo, but I did not find any ebuild available, so if you have any pointers to help installing on this system, that could be great.

An other question, I see in the source, your building process is made by the 'build.sh' shell script,
but inside it, in the build steps you finally call make, why do not just use a plain Makefile (it could be simpler to port it on any system) ?

Guillaume :neckbeard:

m_stalled & encrypted handshake crashing

Caught internal_error: Read past initial payload after incoming encrypted handshake.
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent14internal_error10initializeERKSs+0x202) [0x7fadb7969a32]
/home/user/bin/rtorrent-0.9.4(_ZN7torrent14internal_errorC2EPKc+0x3e) [0x4510ee]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0xc4814) [0x7fadb79fe814]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent9PollEPoll7performEv+0xd7) [0x7fadb797e077]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent9PollEPoll7do_pollEli+0x50) [0x7fadb797e120]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(ZN7torrent11thread_base10event_loopEPS0+0x11c) [0x7fadb79b357c]
/home/user/bin/rtorrent-0.9.4() [0x411eb9]
/lib64/libc.so.6(__libc_start_main+0xf5) [0x7fadb5d22af5]
/home/user/bin/rtorrent-0.9.4() [0x4126b5]

Caught internal_error: Block::clear() m_stalled != 0.
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent14internal_error10initializeERKSs+0x202) [0x7f73e86e4a32]
/home/user/bin/rtorrent-0.9.4(_ZN7torrent14internal_errorC2EPKc+0x3e) [0x4510ee]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent5BlockD1Ev+0x1b2) [0x7f73e87034c2]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent9BlockListD1Ev+0x3f) [0x7f73e8705b5f]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0x57723) [0x7f73e870c723]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0x5861d) [0x7f73e870d61d]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0xb24e9) [0x7f73e87674e9]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0xb2d83) [0x7f73e8767d83]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0x80993) [0x7f73e8735993]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent15signal_bitfield4workEv+0x67) [0x7f73e872e067]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(ZN7torrent11thread_base10event_loopEPS0+0x162) [0x7f73e872e5c2]
/home/user/bin/rtorrent-0.9.4() [0x411eb9]
/lib64/libc.so.6(__libc_start_main+0xf5) [0x7f73e6a9daf5]
/home/user/bin/rtorrent-0.9.4() [0x4126b5]

Caught internal_error: Block::clear() m_stalled != 0.
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent14internal_error10initializeERKSs+0x202) [0x7f6b47e2ba32]
/home/user/bin/rtorrent-0.9.4(_ZN7torrent14internal_errorC2EPKc+0x3e) [0x4510ee]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent5BlockD1Ev+0x1b2) [0x7f6b47e4a4c2]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent9BlockListD1Ev+0x3f) [0x7f6b47e4cb5f]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0x57b98) [0x7f6b47e53b98]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0xaa622) [0x7f6b47ea6622]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(+0xb0e69) [0x7f6b47eace69]
/home/user/bin/rtorrent-0.9.4() [0x4c13b2]
/home/user/bin/rtorrent-0.9.4() [0x4c1640]
/home/user/bin/rtorrent-0.9.4() [0x4667c3]
/home/user/bin/rtorrent-0.9.4() [0x4f7dd4]
/home/user/bin/rtorrent-0.9.4() [0x4ff8f0]
/home/user/bin/rtorrent-0.9.4() [0x5104b8]
/home/user/bin/rtorrent-0.9.4() [0x5125d8]
/home/user/bin/rtorrent-0.9.4() [0x48d120]
/home/user/bin/rtorrent-0.9.4() [0x4f6e72]
/home/user/bin/rtorrent-0.9.4() [0x4f52b4]
/home/user/bin/rtorrent-0.9.4() [0x4f509f]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent9PollEPoll7performEv+0xd7) [0x7f6b47e40077]
/home/user/lib/rtorrent-0.9.4/lib/libtorrent.so.18(_ZN7torrent9PollEPoll7do_pollEli+0x50) [0x7f6b47e40120]

Reoccuring crash issue happens while download & seeding torrents.

CentOS LInux 7.1.1503 (Core)
Kernal 3.10.0-229.14.1.el7_x86_64
rtorrent-ps-0.9.4 extended
pyrocore 0.4.3.dev2015103

Handle partially done downloads (new commands + UI config)

I just wanted you to know that I modified the UI a bit to handle partially done downloads (if it will be merged into rtorrent/libtorrent someday :) ):

  • display d.selected_size_bytes instead of d.size_bytes in the size column
  • do not modify Completion column (it can inform us which download isn't completely finished)

Here is the patch for it. (Maybe it includes columns that your version doesn't have, I don't remember :) )

Custom input prompts

  • Patch or copy the DownloadList::receive_view_input code
  • Allow settings a custom title (prompt)
  • Call specified command afterwards, with the input as arg.0
  • ui.prompt=title,((command, foo, (argument.0))) or similar

command_pyroscope.cc has compile error on rtorrent 0.9.4

when i patch&compile against with rtorrent 0.9.2,everything is ok. when update to rtorrent 0.9.4(update to the latest source from the github), then the follow error occured:
command_pyroscope.cc:49:22: error: ‘tr1’ has not been declared
#define cxxstd tr1
^

Add 'is.*' command group

See also rakshasa/rtorrent#591

  • Operator group like elapsed.* or math.*
  • At minimum is.eq, is.lt, is.gt, is.ne, is.le, is.ge
  • Maybe is.like for matches (and use SQL syntax 'cause like?!)
  • Accept literal values as arguments, either value or string
  • Accept 1-2 args: 1 = cmp TO against literal, 2 = compare literals
  • If one arg and it is a list, then compare two torrent objects using the given field names in order
  • Cast literal to object type, then compare

Add 'string.*' command group

https://rtorrent-docs.readthedocs.io/en/latest/cmd-ref.html#string-functions

  • ✔️ Update / finish documentation
  • ✔️ UTF8 support for all this!
  • ✔️ string.len → value
  • ✔️ string.substr → string
  • ✔️ string.strip → string (optional char sequence to strip, lstrip / rstrip?)
  • ✔️ string.replace → string
  • ✔️ string.map → string
  • ✔️ string.split → list
  • ✔️ string.join → string – like cat, but with a delimiter
  • ✔️ string.contains[_i] → value
  • ✔️ string.equals → value
  • ✔️ string.endswith → value
  • ✔️ string.startswith → value
  • string.chop – see string.substr
  • ✔️ string.[lr]pad → string

Fallback fonts for urxvt

I'm trying to setup rtorrent-ps, and I have some difficulties to get all icons displayed. I was using font "DejaVu Sans Mono" on Linux with urxvt. The missing glyphes were available with this command:

python -c 'print u"\u2934 \u2935 \u231a \u2780 \u2781 \u2782 \u2783 \u2784 \u2785 \u2786 \u2787 \u2788 \u2789 \u26af".encode("utf8")'

I order to solve the problem I first used the Inconsolata font, the one proposed here, but I think this font does not contain all necessary glyphes....

ttfdump /usr/share/fonts/truetype/inconsolata/Inconsolata.otf | grep numGlyphs
numGlyphs:		 359

This font seems to contain only 359 glyphes that are displayed on this site, and glyphes needed by rtorrent-ps are not shown.

However, when I'm using gnome-terminal instead of urxvt, it works. I suppose that gnome-terminal is using fallback fonts when a glyphe is not found. Therefore I looked for the missing glyphes, to find which font bring the glyphe. I used gucharmap.

I found that glyphes :

  • \u2934 \u2935 are contained in Noto Sans Mono CJK JP font
  • \u231a is contained in FreeSerif
  • \u2780 until \u2789 and \u26af are contained in "DejaVu Sans"

Furthermore, all those glyphes at least in urxvt cannot be displayed if the size of the font is lower than 15.

My final urxvt configuration working for rtorrent-ps linked to font is:

URxvt*font: xft:DejaVu Sans Mono:style=regular:pixelsize=15,xft:Noto Sans Mono CJK JP:pixelsize=15,xft:FreeSerif

I hope it will help someone, and do not hesitate to correct me if I'm wrong.

Docs update: How to make PuTTY show all rt-ps glyphs in Windows

Download and install these two fonts.

EverMono
http://www.evertype.com/emono/
http://www.evertype.com/emono/evermono.zip

DejaVu Sans Mono
http://dejavu-fonts.org/wiki/Download
http://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.zip

Use font linking to make EverMono complement DevaVu Sans Mono.

Add (or Edit) a multi-string value for your preferred font under the Windows registry key

Start Regedit. Go to the key below.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink

The added (or edited) key name should be the font name, and the value associated is a list of fallback font options to display the characters not recognized by previous font. There should be some existing ones, you can copy the value from there. Or, add a new Multi String key.

That's what you should do.
Right click SystemLink and select New, then Multi String Value.
Name it DejaVu Sans Mono.

After it's been created, double-click it and enter this inside.
Everson Mono.ttf,EversonMono

At the very least you must logout from Windows and back in again to activate this font link, but I recommend a full reboot.

Now, after rebooting, with PuTTY running change the settings for fonts. Click the PuTTY icon, top-left on your PuTTY window, and then Change settings. Go to Window / Appearance and select DejaVu Sans Mono.

Now your rtorrent-PS should look as beautiful as pyroscope always intended it!

Base info taken from
http://superuser.com/questions/393834/how-to-configure-putty-to-display-these-characters/764855#764855
Complemented with the MSDN doc linked therein.
https://msdn.microsoft.com/en-us/goglobal/bb688134.aspx

Tracker: Map collision hashes

Goal: Load and track multiple metafiles having the same hash, safely.

  • Manipulate 2nd metafile: info.x_infohash = __hash__
  • Now it has its own hash, load it
  • Change download::hash to deliver the alternative hash
  • Define a primary_key() method that always delivers the "real" hash, and use it at “appropriate” code locations. Alternativly: deliver value of a primary_key field added to metafile, and the hash if not present. Might need less changes.

In any case, be very sure to not mix stuff up.

compile error

config.status: executing default-1 commands
configure: ==>
configure: ==>We are not building any client XML transport (see earlier messages explaining why), therefore WE WILL NOT BUILD THE CLIENT LIBRARY.
configure: ==>
rm -f shell_config
Lots of echoes to 'shell_config' suppressed here ...
rm -f xmlrpc-c-config
Echoes to 'xmlrpc-c-config' suppressed here ...
cat shell_config >>xmlrpc-c-config
cat xmlrpc-c-config.main >>xmlrpc-c-config
chmod a+rx xmlrpc-c-config
rm -f xmlrpc-c-config.test
Echoes to 'xmlrpc-c-config.test' suppressed here ...
cat shell_config >>xmlrpc-c-config.test
cat xmlrpc-c-config.test.main >>xmlrpc-c-config.test
chmod a+rx xmlrpc-c-config.test
make -C include/ -f /home//src/rtorrent-ps/xmlrpc-c-advanced-2366//include/Makefile
all
make[1]: Entering directory '/home/
/src/rtorrent-ps/xmlrpc-c-advanced-2366/include'

xmlrpc-c/config.h
Lots of echoes to 'xmlrpc-c/config.h' suppressed here ...
make[1]: Leaving directory '/home//src/rtorrent-ps/xmlrpc-c-advanced-2366/include'
make -C lib/ -f /home/
/src/rtorrent-ps/xmlrpc-c-advanced-2366//lib/Makefile
all
make[1]: Entering directory '/home//src/rtorrent-ps/xmlrpc-c-advanced-2366/lib'
make -C util/ -f /home/
/src/rtorrent-ps/xmlrpc-c-advanced-2366/lib/util/Makefile
all
make[2]: Entering directory '/home//src/rtorrent-ps/xmlrpc-c-advanced-2366/lib/util'
/home/
/src/rtorrent-ps/xmlrpc-c-advanced-2366/lib/util/Makefile:60: depend.mk: No such file or directory
cat /dev/null >depend.mk
ln -s /home//src/rtorrent-ps/xmlrpc-c-advanced-2366 srcdir
ln: failed to create symbolic link ‘srcdir’: File exists
/home/
/src/rtorrent-ps/xmlrpc-c-advanced-2366/common.mk:313: recipe for target 'srcdir' failed
make[2]: *** [srcdir] Error 1
make[2]: Leaving directory '/home//src/rtorrent-ps/xmlrpc-c-advanced-2366/lib/util'
/home/
/src/rtorrent-ps/xmlrpc-c-advanced-2366/common.mk:323: recipe for target 'util/all' failed
make[1]: *** [util/all] Error 2
make[1]: Leaving directory '/home//src/rtorrent-ps/xmlrpc-c-advanced-2366/lib'
/home/
/src/rtorrent-ps/xmlrpc-c-advanced-2366/common.mk:323: recipe for target 'lib/all' failed
make: *** [lib/all] Error 2

Linux version 3.19.0-22-generic (buildd@allspice) (gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13) ) #22-Ubuntu SMP Tue Jun 16 17:15:15 UTC 2015
Ubuntu 15.04

Config error with latest release(s)

After updating both rtorrent-ps to the latest git build with https://aur.archlinux.org/packages/rtorrent-pyro-git/ and the latest pyrocore update with the update-to-head.sh script attempting to start rtorrent using the default rtorrent-0.8.9.rc for pyro's rc file causes this error on startup.

rtorrent: Failed to parse command line option: Error in option file: ~/.rtorrent.rc:53: Error in option file: ~/.pyroscope/rtorrent-0.8.9.rc:49: Invalid type.

Which points to this line:

method.insert = d.last_active, simple|value, "if=$d.peers_connected=,$cat=$system.time=,$d.custom=last_active"

Commenting out the line allows rtorrent-ps to launch, I have experimented within the started client by feeding the line to it with the ^x prompt and the error is the same, Input failed: Invalid type.

Removing |value from the line stops the error (but probably breaks the purpose of the line).

rTorrent-PS git~e291b6e 0.9.6/0.13.6
pyroadmin 0.4.3.dev20161216

Change build.sh to apply patches to version-bumped git build

Commit rakshasa/rtorrent@30d8379 merges the "cmd_ui_current_view" from rtorrent-pryo's codebase. However since the function is still defined in rtorrent-pyro, compiling rtorrent-pyro fails with this error complaining about multiple definitions:

libsub_root.a(command_pyroscope.o): In function `cmd_ui_current_view()':
command_pyroscope.cc:(.text+0x190): multiple definition of `cmd_ui_current_view()'
libsub_root.a(command_ui.o):command_ui.cc:(.text+0x3b0): first defined here
collect2: error: ld returned 1 exit status
Makefile:548: recipe for target 'rtorrent' failed
make[3]: *** [rtorrent] Error 1

Is this a bug in rtorrent or rtorrent-pyro?

Command: schedule.call=delay_secs,command

  • a one-shot schedule
  • can probably be done as a wrapper of schedule2
  • start=now + delay_secs, repeat=0
  • needs math.add
  • use case: delayed print= for asynchronous calls

'tr1' namespace problems with gcc5

I think it's need to make some changes to the patches for the rtorrent 0.9.6:

  1. patches\command_pyroscope.cc and ui_pyroscope.cc
    I should apply the follow patches else it will have the error: command_pyroscope.cc:49:22: error:‘tr1’ undefined. In fact, rtorrent 0.9.4 also needs these patches.

patch for command_pyroscope.cc

--- command_pyroscope_backup.cc 2014-07-10 13:03:01.812145000 +0800
+++ command_pyroscope.cc    2014-07-14 15:56:41.578104590 +0800
@@ -45,11 +45,11 @@
 #include "control.h"
 #include "command_helpers.h"
 
-#if (RT_HEX_VERSION >= 0x000901)
-    #define _cxxstd_ tr1
-#else
+//#if (RT_HEX_VERSION >= 0x000901)
+//    #define _cxxstd_ tr1
+//#else
     #define _cxxstd_ std
-#endif
+//#endif
 
 
 // handle for message log file

patch for ui_pyroscope.cc

--- ui_pyroscope_backup.cc  2014-07-10 13:03:01.824145000 +0800
+++ ui_pyroscope.cc 2014-07-15 10:26:58.401085617 +0800
@@ -38,11 +38,11 @@
 #include "control.h"
 #include "command_helpers.h"
 
-#if (RT_HEX_VERSION >= 0x000901)
-    #define _cxxstd_ tr1
-#else
+//#if (RT_HEX_VERSION >= 0x000901)
+//    #define _cxxstd_ tr1
+//#else
     #define _cxxstd_ std
-#endif
+//#endif

 #define D_INFO(item) (item->info())
 #include "rpc/object_storage.h"

2.patches\ps-throttle-steps_all.patch
"std::tr1::bind" should be replaced for std::bind

3.patches\ps-ssl_verify_host_all.patch
It seems that rtorrent 0.9.6 had already add the ssl_verify_host, so this patch is not need.

4.patches\pyroscope.patch(rtorrent 0.9.4 also needs this)

diff -ur '--exclude=.git' rtorrent/src/command_helpers.cc rtorrent-new/src/command_helpers.cc
--- rtorrent/src/command_helpers.cc 2014-07-04 16:59:50.991171000 +0800
+++ rtorrent-new/src/command_helpers.cc 2014-07-10 16:23:28.168287710 +0800
@@ -50,6 +50,7 @@
 void initialize_command_peer();
 void initialize_command_local();
 void initialize_command_logging();
+void initialize_command_pyroscope();
 void initialize_command_network();
 void initialize_command_groups();
 void initialize_command_throttle();
@@ -65,6 +66,7 @@
   initialize_command_groups();
   initialize_command_local();
   initialize_command_logging();
+  initialize_command_pyroscope();
   initialize_command_ui();
   initialize_command_download();
   initialize_command_file();
diff -ur '--exclude=.git' rtorrent/src/Makefile.am rtorrent-new/src/Makefile.am
--- rtorrent/src/Makefile.am    2014-07-04 16:59:50.911171000 +0800
+++ rtorrent-new/src/Makefile.am    2014-07-10 16:24:23.008288357 +0800
@@ -25,6 +25,7 @@
    command_tracker.cc \
    command_scheduler.cc \
    command_ui.cc \
+   command_pyroscope.cc \
    control.cc \
    control.h \
    globals.cc \
diff -ur '--exclude=.git' rtorrent/src/ui/download_list.h rtorrent-new/src/ui/download_list.h
--- rtorrent/src/ui/download_list.h 2014-07-04 16:59:52.171171000 +0800
+++ rtorrent-new/src/ui/download_list.h 2014-07-10 16:21:48.756286537 +0800
@@ -97,6 +97,8 @@
 
   void                activate_display(Display d);
 
+  ElementBase*        display(Display d) { return d < DISPLAY_MAX_SIZE ? m_uiArray[d] : 0; }
+
   core::View*         current_view();
   void                set_current_view(const std::string& name);
 

5.patches\ui_pyroscope.patch(rtorrent 0.9.4 also needs this)

diff -ur '--exclude=.git' rtorrent/src/command_helpers.cc rtorrent-new/src/command_helpers.cc
--- rtorrent/src/command_helpers.cc 2014-07-04 16:59:50.991171000 +0800
+++ rtorrent-new/src/command_helpers.cc 2014-07-10 16:35:05.400295939 +0800
@@ -57,6 +57,7 @@
 void initialize_command_tracker();
 void initialize_command_scheduler();
 void initialize_command_ui();
+void initialize_command_ui_pyroscope();
 
 void
 initialize_commands() {
@@ -75,4 +76,5 @@
   initialize_command_throttle();
   initialize_command_tracker();
   initialize_command_scheduler();
+  initialize_command_ui_pyroscope();
 }
diff -ur '--exclude=.git' rtorrent/src/display/canvas.cc rtorrent-new/src/display/canvas.cc
--- rtorrent/src/display/canvas.cc  2014-07-04 16:59:51.579171000 +0800
+++ rtorrent-new/src/display/canvas.cc  2014-07-10 16:43:36.952301977 +0800
@@ -99,6 +99,8 @@
   m_isInitialized = true;
 
   initscr();
+  extern void ui_pyroscope_canvas_init();
+  ui_pyroscope_canvas_init();
   raw();
   noecho();
   nodelay(stdscr, TRUE);
diff -ur '--exclude=.git' rtorrent/src/display/canvas.h rtorrent-new/src/display/canvas.h
--- rtorrent/src/display/canvas.h   2014-07-04 16:59:51.579171000 +0800
+++ rtorrent-new/src/display/canvas.h   2014-07-10 16:36:53.580297216 +0800
@@ -131,8 +131,10 @@
   va_list arglist;
 
   va_start(arglist, str);
+  if (y < height()) {
   wmove(m_window, y, x);
   vw_printw(m_window, const_cast(str), arglist);
+     }
   va_end(arglist);
 }
 
diff -ur '--exclude=.git' rtorrent/src/display/window_download_list.cc rtorrent-new/src/display/window_download_list.cc
--- rtorrent/src/display/window_download_list.cc    2014-07-04 16:59:51.667171000 +0800
+++ rtorrent-new/src/display/window_download_list.cc    2014-07-10 16:43:07.120301625 +0800
@@ -82,6 +82,8 @@
 
   m_canvas->print(0, 0, "%s", ("[View: " + m_view->name() + "]").c_str());
 
+  bool ui_pyroscope_download_list_redraw(Window* window, display::Canvas* canvas, core::View* view);
+  if (ui_pyroscope_download_list_redraw(this, m_canvas, m_view)) return;
   if (m_view->empty_visible() || m_canvas->width() < 5 || m_canvas->height() < 2)
     return;
 
@@ -113,6 +115,8 @@
     print_download_status(buffer, last, *range.first);
     m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
 
+    void ui_pyroscope_download_list_redraw_item(Window* window, display::Canvas* canvas, core::View* view, int pos, Range& range);
+    ui_pyroscope_download_list_redraw_item(this, m_canvas, m_view, pos, range);
     ++range.first;
   }    
 }
diff -ur '--exclude=.git' rtorrent/src/display/window_statusbar.cc rtorrent-new/src/display/window_statusbar.cc
--- rtorrent/src/display/window_statusbar.cc    2014-07-04 16:59:51.835171000 +0800
+++ rtorrent-new/src/display/window_statusbar.cc    2014-07-10 16:39:38.968299168 +0800
@@ -66,7 +66,8 @@
     position = print_status_extra(buffer, last);
     m_canvas->print(m_canvas->width() - (position - buffer), 0, "%s", buffer);
   }
-
+  void ui_pyroscope_statusbar_redraw(Window* window, display::Canvas* canvas);
+  ui_pyroscope_statusbar_redraw(this, m_canvas);
   m_lastTick = control->tick();
 }
 
diff -ur '--exclude=.git' rtorrent/src/Makefile.am rtorrent-new/src/Makefile.am
--- rtorrent/src/Makefile.am    2014-07-04 16:59:50.911171000 +0800
+++ rtorrent-new/src/Makefile.am    2014-07-10 16:31:58.868293738 +0800
@@ -30,6 +30,7 @@
    control.h \
    globals.cc \
    globals.h \
+   ui_pyroscope.cc \
    option_parser.cc \
    option_parser.h \
    signal_handler.cc \

6.patches\ps-ui_pyroscope_all.patch(rtorrent 0.9.4 also needs this)

--- orig/src/rpc/object_storage.h   2011-04-07 09:44:06.000000000 +0200
+++ rtorrent-0.8.8/src/rpc/object_storage.h 2011-06-05 13:20:24.000000000 +0200
@@ -149,6 +149,8 @@
   void                   list_push_back(const torrent::raw_string& key, const torrent::Object& object);
   void                   list_push_back_str(const std::string& str, const torrent::Object& object) { list_push_back(torrent::raw_string::from_string(str), object); }
 
+  const torrent::Object& set_color_string(const torrent::raw_string& key, const std::string& object);
+
   // Functions callers:
   torrent::Object        call_function(const torrent::raw_string& key, target_type target, const torrent::Object& object);
   torrent::Object        call_function_str(const std::string& key, target_type target, const torrent::Object& object);

system.method.set_key equivalent?

I was using the following in my vanilla rtorrent config to move downloads from a temp dir to a completed dir.

system.method.set_key = event.download.finished,move_complete,"d.set_directory=~/Downloads/;execute=mv,-n,$d.get_base_path=,~/Downloads/"

This does not seem to work with the pyro patched version. Is there some equivalent I should be using instead? Also is there documentation of the new config file format somewhere?

Feature request for Home and End keys on the interface

Can you add support for Home and End keys on the interface:

  • home: jump to the top (no torrents selected)
  • end: jump to the bottom (last torrent will be selected)

It's pretty annoying to go through for 400-500 torrents if you are in the middle of a view.
Thanks

adding makeflags

I have been trying compile rtorrent-ps with on my arm based dev boards with icecc. No matter what techniques I try the build fails when passing -j. Is it possible to acheive this

rTorrent crashes when run from systemd

I have successfully compiled and installed rTorrent-PS, and it runs fine with tmux if started from the command line. I have created a rtorrent.service file so rTorrent can be started and stopped like a service, and it is apparently working fine too.

I am using a couple of watch directories (the start and load directories from the rtorrent.rc example), and if I put a couple of files there rTorrent-PS works fine whatever the method to start it is used (directly from the shell or as a service).

But now I have sort of 3000 torrents in the wath directories. If rTorrent is started from the command line it runs fine. But if it is started as a service it dies after a few seconds with the following message (also logged in the log directory; /home/rtorrent/bin/rtorrent is a symlink to /opt/rtorrent/bin/rtorrent):

C Caught internal_error: 'Call to curl_easy_init() failed.'.
---DUMP---
/opt/rtorrent/lib/libtorrent.so.19(_ZN7torrent14internal_error10initializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x227) [0x7f7054629557]
/home/rtorrent/bin/rtorrent(_ZN7torrent14internal_errorC2EPKc+0x87) [0x456637]
/home/rtorrent/bin/rtorrent() [0x4fdf77]
/opt/rtorrent/lib/libtorrent.so.19(+0xdfb33) [0x7f70546dab33]
/opt/rtorrent/lib/libtorrent.so.19(_ZN7torrent11TrackerList10send_stateEPNS_7TrackerEi+0x74) [0x7f70546469f4]
/opt/rtorrent/lib/libtorrent.so.19(_ZN7torrent17TrackerController16send_start_eventEv+0xe3) [0x7f7054645323]
/home/rtorrent/bin/rtorrent() [0x4d8871]
/home/rtorrent/bin/rtorrent() [0x4df892]
/opt/rtorrent/lib/libtorrent.so.19(+0xb537e) [0x7f70546b037e]
/opt/rtorrent/lib/libtorrent.so.19(+0x2a703) [0x7f7054625703]
/opt/rtorrent/lib/libtorrent.so.19(_ZN7torrent11thread_base10event_loopEPS0_+0x170) [0x7f7054678fa0]
/home/rtorrent/bin/rtorrent() [0x412474]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f705316a830]
/home/rtorrent/bin/rtorrent() [0x415839]

---END---

The curl library used is the correct one. It seems that it is a resources problem, but I am totally at a loss here.

IMPORTANT: The compiled rtorrent-vanilla crashes too.

Just for completeness, this is the service file:

[Unit]
Description=rTorrent
Documentation=https://github.com/rakshasa/rtorrent
Requires=network.target local-fs.target
After=network.target local-fs.target

[Service]
Type=forking
Environment=TERM=xterm-256color
User=rtorrent
WorkingDirectory=~
ExecStart=/usr/bin/tmux -2u -S /tmp/rtorrent.sock new-session -d -n rT-PS -s rtorrent /home/rtorrent/bin/rtorrent
ExecStop=/usr/bin/tmux -S /tmp/rtorrent.sock send-keys -t rtorrent C-q
KillMode=none
Restart=no

[Install]
WantedBy=multi-user.target

Finally, I am using Ubuntu (Server) 16.04 LTS.

Any clue on how to try to solve this issue?

Issues displaying condensed lines on wheezy

Hello,

I have compiled and installed rtorrent-0.9.6 on my Debian Wheezy and when I hit the * key, the condensed format look like the following:

   M-b~XM-" M-b~X~M M-b~L~X M-b~\M-0 M-bM-#M-? M-b~ZM-! M-b~XM-/ M-b~Z~Q  M-b~FM-:  M-bM-$M-4  M-bM-$M-5   M-b~H~F   M-b~L~Z M-b~I~@M-b~H~G   M-b~\~G   Name                            Tracker Domain

instead of:

   ☢ ☍ ⌘ ✰ ⣿ ⚡ ☯ ⚑  ↺  ⤴  ⤵   ∆   ⌚ ≀∇   ✇   Name                                                                                                                                       Tracker Domain

I have compiled the exact same way a while back rtorrent-0.9.2 on a debian squeeze, and it was working perfectly fine. The overall configuration of the server's terminal is the same as much as I can tell. I connect to both servers through ssh, using OSX' terminal, I'm using on both zsh. The only difference is one is squeeze and the other one is wheezy.

Here's a screenshot of the issue:

rtorrent-ps-sshot

Any idea of what could be causing the issue?

Prune patches + build.sh

Remove old patches (before 0.9.2) and the AUR stuff (copy over what's left, only 1 or 2 of them).

Make extended canvas more configurable

Tasks

  • ✅ Update all documentation (description of default columns, new commands)

  • ✅ Clean up code

    • deprecate "ui.style.ratio" and "ui.style.progress"
  • ✅ Catch errors thrown by render methods, show error indicator (e.what()).

  • 💡 Add ui.render.cycle = ‹speed›, ‹cmd1›, ‹cmd2›, … to rotate through alternate display values

    • driven by a tick value (increased per canvas refresh)
    • ‹speed› is measured in ticks
    • ui.tick and private ui.tick.bump command
    • this means Ctrl-L can be used to cycle manually (bump tick count artificially in the key binding)

final canvas

  • ✅ Add a multi-method for column rendering: ui.column.render

    • Call those methods, order is determined by keys as usual
    • Keys encode column title + length sort:[?]len[coldef]:title, with optional parts for sacrificial headers (?) and colorization
    • Chop rendered contents to the length of the header
  • ✅ Make chopping of columns UTF8-aware!

  • ✅ Start out with one of the new fields in #29 to make @chros73 happy

  • ✅ X-position (column) must be made dynamic in the code (advance by header length)

  • ✅ Add colouring support (needed for remaining columns)

    • ✅ New ui.color.custom1…9 commands
    • ✅ New private ui.color.*.index commands
    • ✅ New ui.canvas_color[.set] command
    • ✅ Static color definitions in column index (Cidx/len): "180:2C2/2: ↻"
    • ✅ Custom colors moved to index 1…9
    • ✅ System colors – dynamically mapped color index values, starting at index 90
  • ❌ Existing columns might be factored into commands, to make everything configurable (d.‹name›.render)

  • ✅ Move "tagged" to its own column

  • ✅ Add convert.magnitude command (used in scrape columns)

  • ✅ Add string.map=text,{from,to},… (for throttle names)

  • ✅ Add event.view.hide/show multi command, and call them on view changes

    • method.set_key = event.view.hide, ~log, ((print, ((ui.current_view)), " → ", ((argument.0))))

Example

Custom columns with custom colors (subject to change):

ui.color.custom1.set = 242
ui.color.custom2.set = 105
ui.color.custom3.set =  51

method.set_key = ui.column.render, "910:4C15/3C21/1: ✇  "
method.set_key = ui.column.render, "910:4C3/3C2/1: ✇  ", \
    ((convert.human_size, ((d.size_bytes)) ))

method.set_key = ui.column.render, "900:4C24/3C21/1: Σ⇈ "
method.insert = _pyro.middot_custom, private|simple, \
    "branch=d.up.total=,ui.canvas_color.set=C24/3C2/1,ui.canvas_color.set=C2/4 ; cat=\"  · \""
method.set_key = ui.column.render, "900:4C24/3C2/1: Σ⇈ ", \
    ((if, ((d.up.total)), \
        ((convert.human_size, ((d.up.total)), (value, 10) )), \
        ((_pyro.middot_custom)) \
    ))

preview

Compile Errors building in FreeBSD 10.1

I have installed libtorrent/rtorrent from the ports and it compiles just fine. There are some differences in clang and gcc and I am not capable of converting the configure flags from one to the other.

I tried to build again after the last commit. I needed to install gcc and upgrade
openssl. Then I edited build.sh to change make to gmake and now things compile,
until libtorrent.

I use these scripts in all of my servers and would like to get them working in my one FreeBSD server. Any help would be appreciated.

Thanks

/bin/sh ../../../libtool  --tag=CXX    --mode=compile g++ -DHAVE_CONFIG_H  -I. 
-I../../..  -I. -I./.. -I./../.. -I../../.. -I 
/home/jonnyboy/lib/rtorrent-0.9.4/include   -pipe -O2 -pthread  -DNDEBUG 
-fvisibility=hidden -D_THREAD_SAFE  -I/usr/local/include -MT option_strings.lo 
-MD -MP -MF .deps/option_strings.Tpo -c -o option_strings.lo option_strings.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../.. 
-I../../.. -I /home/jonnyboy/lib/rtorrent-0.9.4/include -pipe -O2 -pthread 
-DNDEBUG -fvisibility=hidden -D_THREAD_SAFE -I/usr/local/include -MT 
option_strings.lo -MD -MP -MF .deps/option_strings.Tpo -c option_strings.cc  
-fPIC -DPIC -o .libs/option_strings.o
In file included from ./../../torrent/connection_manager.h:46:0,
                 from option_strings.cc:43:
/usr/include/netinet/in_systm.h:49:9: error: 'u_int16_t' does not name a type
 typedef u_int16_t n_short;  /* short as received from the net */
         ^
/usr/include/netinet/in_systm.h:50:9: error: 'u_int32_t' does not name a type
 typedef u_int32_t n_long;  /* long as received from the net */
         ^
/usr/include/netinet/in_systm.h:52:9: error: 'u_int32_t' does not name a type
 typedef u_int32_t n_time;  /* ms since 00:00 GMT, byte rev */
         ^
In file included from ./../../torrent/connection_manager.h:47:0,
                 from option_strings.cc:43:
/usr/include/netinet/ip.h:51:2: error: 'u_char' does not name a type
  u_char ip_hl:4,  /* header length */
  ^
/usr/include/netinet/ip.h:58:2: error: 'u_char' does not name a type
  u_char ip_tos;   /* type of service */
  ^
/usr/include/netinet/ip.h:59:2: error: 'u_short' does not name a type
  u_short ip_len;   /* total length */
  ^
/usr/include/netinet/ip.h:60:2: error: 'u_short' does not name a type
  u_short ip_id;   /* identification */
  ^
/usr/include/netinet/ip.h:61:2: error: 'u_short' does not name a type
  u_short ip_off;   /* fragment offset field */
  ^
/usr/include/netinet/ip.h:66:2: error: 'u_char' does not name a type
  u_char ip_ttl;   /* time to live */
  ^
/usr/include/netinet/ip.h:67:2: error: 'u_char' does not name a type
  u_char ip_p;   /* protocol */
  ^
/usr/include/netinet/ip.h:68:2: error: 'u_short' does not name a type
  u_short ip_sum;   /* checksum */
  ^
/usr/include/netinet/ip.h:166:2: error: 'u_char' does not name a type
  u_char ipt_code;  /* IPOPT_TS */
  ^
/usr/include/netinet/ip.h:167:2: error: 'u_char' does not name a type
  u_char ipt_len;  /* size of structure (variable) */
  ^
/usr/include/netinet/ip.h:168:2: error: 'u_char' does not name a type
  u_char ipt_ptr;  /* index of current entry */
  ^
/usr/include/netinet/ip.h:170:2: error: 'u_char' does not name a type
  u_char ipt_flg:4,  /* flags, see below */
  ^
/usr/include/netinet/ip.h:217:2: error: 'u_char' does not name a type
  u_char  ippseudo_pad; /* pad, must be zero */
  ^
/usr/include/netinet/ip.h:218:2: error: 'u_char' does not name a type
  u_char  ippseudo_p; /* protocol */
  ^
/usr/include/netinet/ip.h:219:2: error: 'u_short' does not name a type
  u_short  ippseudo_len; /* protocol length */
  ^
*** Error code 1

Stop.
make[4]: stopped in 
/usr/home/jonnyboy/temp/rtorrent-ps/libtorrent-0.13.4/src/torrent/utils
*** Error code 1

Stop.
make[3]: stopped in 
/usr/home/jonnyboy/temp/rtorrent-ps/libtorrent-0.13.4/src/torrent
*** Error code 1

Stop.
make[2]: stopped in /usr/home/jonnyboy/temp/rtorrent-ps/libtorrent-0.13.4/src
*** Error code 1

Stop.
make[1]: stopped in /usr/home/jonnyboy/temp/rtorrent-ps/libtorrent-0.13.4
*** Error code 1

Stop.
make: stopped in /usr/home/jonnyboy/temp/rtorrent-ps/libtorrent-0.13.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.