the forums at degreez.net

It is currently Mon Nov 20, 2017 5:21 am

All times are UTC - 7 hours [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
PostPosted: Mon May 04, 2009 9:15 pm 
Offline

Joined: Sat May 10, 2008 8:45 am
Posts: 5
Is there any way to limit the number of log messages at the bottom of the btlaunchmanycurses screen? I've got ten lines devoted to that right now, and I'd rather only have 4, letting me see more torrent info at a time...


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 06, 2009 3:41 am 
Offline

Joined: Sun Mar 07, 2004 10:05 am
Posts: 1212
You can hack btlaunchmanycurses.py to change the main window height; it's calculated at line 112, "self.mainwinh = int(2*(self.scrh)/3)". Changing it to 4*(self.scrh)/5 may give you what you want. Beware though, it may blow up on you if you then make the window too small.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 06, 2009 12:42 pm 
Offline

Joined: Sat May 10, 2008 8:45 am
Posts: 5
TheSHAD0W wrote:
You can hack btlaunchmanycurses.py to change the main window height; it's calculated at line 112, "self.mainwinh = int(2*(self.scrh)/3)". Changing it to 4*(self.scrh)/5 may give you what you want. Beware though, it may blow up on you if you then make the window too small.


Thanks -- I'll give that a look.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 08, 2009 11:00 am 
Offline

Joined: Sat May 10, 2008 8:45 am
Posts: 5
dstar wrote:
TheSHAD0W wrote:
You can hack btlaunchmanycurses.py to change the main window height; it's calculated at line 112, "self.mainwinh = int(2*(self.scrh)/3)". Changing it to 4*(self.scrh)/5 may give you what you want. Beware though, it may blow up on you if you then make the window too small.


Thanks -- I'll give that a look.


I've been considering this further, and I think that I confused my goal with one way of achieving it. I often have a dozen or two torrents running, most of which aren't doing anything (I'm seeding them, but no one is downloading at the moment), and it takes a long time to cycle through to see the one or two active torrents. If there was a way to only show active torrents, that would be perfect.

Would it work to modify _display_data to operate on a copy of its data argument that's had inactive torrents removed? If so, you could bind a key to a method that toggles a variable, and check that at the beginning of _display_data to determine whether or not to display inactive torrents.

I'm not at all familiar with python, so I'm not sure if that would work or not. It looks like it might, but I could be wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 08, 2009 12:56 pm 
Offline

Joined: Sat May 10, 2008 8:45 am
Posts: 5
dstar wrote:
Would it work to modify _display_data to operate on a copy of its data argument that's had inactive torrents removed? If so, you could bind a key to a method that toggles a variable, and check that at the beginning of _display_data to determine whether or not to display inactive torrents.

I'm not at all familiar with python, so I'm not sure if that would work or not. It looks like it might, but I could be wrong.


Worked like a charm. I renamed the data argument to data_arg, and added this at the beginning of _display_data (and some other code elsewhere to toggle show_inactive when I hit the spacebar):
Code:
        if self.show_inactive:
            data = data_arg
        else:
            data = [x for x in data_arg if (x[3] > 0 or x[4] > 0) and (x[9] > 100 or x[8] > 100)]
            data.sort(lambda a,b: cmp(a[1],b[1]) or cmp(a[13],b[13]) or cmp(b[2],a[2])  or cmp(b[9],a[9]) or cmp(b[8],a[8]) or cmp(b[4],a[4]) \
or cmp(b[3],a[3]))


I'm checking both that it has a peer, and that it's sending or receiving at least 100 bytes/s. I added the second check because I had several torrents that had clients connecting and disconnecting without actually downloading anything, causing the display to flicker.

Would you be interested in a patch to add this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: Majestic-12 [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group