This forum has been archived. All content is frozen. Please use KDE Discuss instead.

PATCH: WebGUI with multi-file torrents

Tags: None
(comma "," separated)
The_Kernel
Registered Member
Posts
8
Karma
0
I use the webgui a lot (meaning just about all the time) and while it's really useful most of the time, it is very limited when dealing with torrents that have multiple files within them. Being both sick of this state of affairs and really bored I decided to try my hand at fixing this problem.

I've upload an archive containing a patch and a version of the default webgui skin that I modified to make use of the updated functionality. It seems to be working for me pretty good, which is all that I ever hoped for since I code very little and have never used html or php before. In other words some of the code is probably rough and some of the solutions are not the best ones.

To get it going just move "webgui_fileview.patch" in the main directory and run "patch -p1 < webgui_fileview.patch". You also need to copy the directory "fileview" to wherever your webgui skins are. On my system thats /usr/share/apps/ktorrent/www. With this patch you can see the Status of individual files within a torrent as well as set each files priority (high, normal, low, do not download).

Any suggestions or improvements are much appreciated, and hopefully some people find this as useful an addition as I do.

*Download HERE
George
Moderator
Posts
5421
Karma
1

Sat Oct 27, 2007 10:36 am
OK, I will check it out.
George
Moderator
Posts
5421
Karma
1

Sun Oct 28, 2007 10:04 am
Patch looks good, but I have two complaints :
1) Setting a file to do not download is dangerous because you lose the data, so you either want to show a confirmation dialog, or use the only seed priority.

2) The fileview isn't properly updated when you change the priority, I will see if I can fix this.
The_Kernel
Registered Member
Posts
8
Karma
0

Mon Oct 29, 2007 6:12 pm
George wrote:Patch looks good, but I have two complaints :
1) Setting a file to do not download is dangerous because you lose the data, so you either want to show a confirmation dialog, or use the only seed priority.

2) The fileview isn't properly updated when you change the priority, I will see if I can fix this.


Thanks George. For issue 1 I wasn't aware that it caused data loss. I think it's best to just change it to only seed priority (which is what I meant it to do anyway). Should I leave the tooltip as "Do Not Download" though? It's a little confusing because it looks like the info area calls seed only priority "Do Not Download" too.

For issue 2 I'm not sure what you mean. Are you saying that details.php doesn't refresh when you change a file's priority? If that is what you mean then that's strange since it does refresh for me.
George
Moderator
Posts
5421
Karma
1

Mon Oct 29, 2007 7:14 pm
I mean the files tab in ktorrent itself, when you change the priority in the webgui, this is not updated. Of course seeing that you are using the webgui, you are nowhere near KT to see this.
George
Moderator
Posts
5421
Karma
1

Mon Oct 29, 2007 7:43 pm
I'm gonna commit the patch with the only seed modification I made. I will solve the fileview issue later.
The_Kernel
Registered Member
Posts
8
Karma
0

Mon Oct 29, 2007 9:31 pm
George wrote:I mean the files tab in ktorrent itself, when you change the priority in the webgui, this is not updated. Of course seeing that you are using the webgui, you are nowhere near KT to see this.

Ah right, I had noticed that. It's pretty annoying but like you said I don't see it much primarily using the webgui. It's awesome your commiting it, I'm just glad to be able to contribute my little part to such a great program.
Zajec
Registered Member
Posts
53
Karma
0

Sat Nov 03, 2007 10:01 pm
Thanks The_Kernel for your patch. I was just going to do the same :-)

However I'll let myself to improve a little your files support in webgui. I find using
Code: Select all
'files' => array (
   0 = > array (
      'file' => 'value',
      'size' => 'value',
      'perc_done' => 'value',
      'status' => 'value'
   ),
   1 = > array (
      'file' => 'value',
      'size' => 'value',
      'perc_done' => 'value',
      'status' => 'value'
   )
)
much better, easier and faster than
Code: Select all
'files' => array (
   'file_0' => 'value',
   'size_0' => 'value',
   'perc_done_0' => 'value',
   'status_0' => 'value',
   'file_1' => 'value',
   'size_1' => 'value',
   'perc_done_1' => 'value',
   'status_1' => 'value'
)


I have patch ready, waiting for Joris for submitting my previous one :)

P.S.
I also implemented support for files in "coldmilk" skin.
Zajec
Registered Member
Posts
53
Karma
0

Wed Nov 14, 2007 9:22 pm
Unfortunately, my support for files needed some improvements and I wasn't able to make it before 2.2.3. Now it's finished and already sent, so I'm quite sure you will able to manage your files using coldmilk skin in ktorrent 2.2.4.


P.S.
Wooow, I am famous now! Check this part of Changelog:
Code: Select all
- Added several patches from Rafael Mileki which fix and improve some things in the webgui
:) :) :) Well, maybe my name is "Rafał Miłecki" but who cares :wink:
1998chevy1500
Registered Member
Posts
25
Karma
0

Thu Nov 15, 2007 10:23 pm
Fine work on the upgrade to the WebGUI. I run ktorrent remotely on a headless computer and use the WebGUI almost exclusively and this upgrade really makes using ktorrent that much better.

However I do have one small complaint, I see that the "Shutdown" button has been moved from the lower right corner of the GUI to being placed between "Refresh" and "Logout." While I have not yet accidentally pressed the "Shutdown" button, I can see my self going to hit the "Refresh" button and accidentally pressing the "Shutdown" button. Is it possible to either move it back where it was or align it to the right side of the "button bar" so that it is readily viewable, but far enough away that it will not accidentally get pressed.

Keep up the good work,
Conrad

P.S. The upgrade to the look with the faded inactive buttons and the shadowing of the "button bar" is equally impressive.
Zajec
Registered Member
Posts
53
Karma
0

Fri Nov 16, 2007 6:33 am
1998chevy1500 wrote:However I do have one small complaint, I see that the "Shutdown" button has been moved from the lower right corner of the GUI to being placed between "Refresh" and "Logout." While I have not yet accidentally pressed the "Shutdown" button, I can see my self going to hit the "Refresh" button and accidentally pressing the "Shutdown" button. Is it possible to either move it back where it was or align it to the right side of the "button bar" so that it is readily viewable, but far enough away that it will not accidentally get pressed.
Ahh, it was me, my fault, sorry! By the ay of removing table layout I moved this link without thinking a lot. Do you think that such a position will be OK? By the way, I noticed that "Shutdown" doesn't display confirmation question, I'll change it soon.


1998chevy1500 wrote:P.S. The upgrade to the look with the faded inactive buttons and the shadowing of the "button bar" is equally impressive.
Thanks, I am glad to hear I have done something useful :-) There is nothing nicer than hearing that :-)
1998chevy1500
Registered Member
Posts
25
Karma
0

Fri Nov 16, 2007 3:19 pm
Zajec wrote: Do you think that such a position will be OK? By the way, I noticed that "Shutdown" doesn't display confirmation question, I'll change it soon.


That position would be perfect. 8) And I guess I never noticed that it didn't have a conformation message, but then again I tried to avoid pressing it. :D

Keep up the good work,
Conrad
The_Kernel
Registered Member
Posts
8
Karma
0

Thu Nov 22, 2007 6:28 am
Zajec wrote:
1998chevy1500 wrote:P.S. The upgrade to the look with the faded inactive buttons and the shadowing of the "button bar" is equally impressive.
Thanks, I am glad to hear I have done something useful :-) There is nothing nicer than hearing that :-)

I feel the same way :)

And nice work by the way on the cosmetic updates. I'm installing 2.2.4 right now, so I'm looking forward to checking out the updated Coldmilk too.
urbinek
Registered Member
Posts
18
Karma
0
The_Kernel wrote:*Download HERE




Code: Select all
Sorry, the file you requested is not available.

This file was available for a limited period of time and has now been deleted. For more information please check our FAQ's.

Please contact the uploader and ask them to upload the file again. sendspace is not able to help you in this matter


can you upload it again ?
Zajec
Registered Member
Posts
53
Karma
0
urbinek wrote:can you upload it again ?

I don't have this patch locally, however this was already included into 2.2.3 (and still works in 2.2.4).


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]