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

Is posible this feature?

Tags: None
(comma "," separated)
Kaisermart
Registered Member
Posts
2
Karma
0

Is posible this feature?

Sun May 21, 2006 5:19 pm
dcop for the stats. Download rate and up rate. For superkaramba themes or other scripts.

Thanks
George
Moderator
Posts
5421
Karma
1

Sun May 21, 2006 7:59 pm
It's certainly possible to do this. Which stats do you want ?
Kaisermart
Registered Member
Posts
2
Karma
0

Sun May 21, 2006 9:52 pm
Total Download Rate, Total Upload rate, total downloaded and total uploaded in sesion, for example.

Thanks
silver7
Registered Member
Posts
7
Karma
0

My suggestion

Mon May 22, 2006 12:37 am
I think something like this would be pretty cool (ordered by importance, most important first):

dcop KTorrent ...

totalDownloadSpeed or just downloadSpeed // in byte/sec
totalUploadSpeed
totalDownloaded // byte
totalUploaded
--
torrents // return torrentId list of torrents, separated with newline, for example:
1
2
3

runningTorrents or activeTorrents // return torrentId list of active torrents, for example (2 is inactive):
1
3

torrentName(int torrentId) // return "File" field
torrentComplete(int torrentId) // for example: 34.25
--
torrentDownloadSpeed(int torrentId)
torrentUploadSpeed(int torrentId)
--
torrentStatus(int torrentId)
torrentDownloaded(int torrentId)
torrentUploaded(int torrentId)
torrentSize(int torrentId)
--
torrentStop(int torrentId)
torrentStart(int torrentId)
torrentRemove(int torrentId)
torrentAnnounce(int torrentId)
--
etc.
agforsyth
Registered Member
Posts
133
Karma
0

Mon May 22, 2006 3:58 am
I was just thinking about extending the dcop interface in basically the way you said, and then writing a console application that made it easy to interact with KTorrent when ssh'd in.

If the devs have other things to work on or aren't interested in this feature, I would be glad to work on this.
George
Moderator
Posts
5421
Karma
1

Mon May 22, 2006 4:30 pm
phantom042 wrote:I was just thinking about extending the dcop interface in basically the way you said, and then writing a console application that made it easy to interact with KTorrent when ssh'd in.

If the devs have other things to work on or aren't interested in this feature, I would be glad to work on this.


I have no problem with that, we accept patches. I have bigger things to do so, if somebody else does this, that's fine by me.
agforsyth
Registered Member
Posts
133
Karma
0

Mon May 22, 2006 7:02 pm
My take on what should be impemented:

getInfo()
returns all the info shown in the statusbar
getTorrentNumbers(type)
1=downloads 2=uploads 3=all, returns the torX dir # of a torrent
getTorrentInfo(tornumber)
this would return all the info shown in the torrent list area
getFileCount(tornumber)
return number of files in the torrent
getFileNames(tornumber)
returns a list of all the files in the torrent
getFilePriorities(tornumber)
returns priorities for each file
setFilePriority(tornumber, fileindex, priority)
sets the priority of a file
start(tornumber)
stop(tornumber)
remove(tornumber)
announce(tornumber)

Pretty much everything you see / can do in the torrent list and the infowidget file view is covered here or is already implemented. Not listed here are the things you can see / change on the other tabs of the infowidget plugin and queue manager stuff.

If you think I missed anything important please post it here.
George
Moderator
Posts
5421
Karma
1

Mon May 22, 2006 7:12 pm
Maybe the name of each torrent. Numbers do not really say much.
agforsyth
Registered Member
Posts
133
Karma
0

Mon May 22, 2006 8:04 pm
My idea is getTorrentNumbers basically returns indexes, and you call getTorrentInfo() for each index to get the name, status, etc. for the torrent. So a little console application would do: (ignoring dcop stuff)

QValuelist<unsigned char> tornumbers = getTorrentNumbers(3);
QValuelist<unsigned char>::iterator i = tornumbers.begin();
while(i != tornumbers.end())
{
QStringList infoz = getTorrentInfo(tornumber);
output the torrent index, status, and name on one line
output the d/l rate, u/l rate, peers, size, time left, etc on the next
i++;
}

Then someone would type in the number of the torrent they wanted to manipulate and select an action from a list. That seems like the best way to me.
silver7
Registered Member
Posts
7
Karma
0

Torrent numbers

Tue May 23, 2006 9:28 am
Torrent numbers are "unique" or just 1-[number of torrents]? How about I remove torrent #1. Renumber or start with #2?
George
Moderator
Posts
5421
Karma
1

Re: Torrent numbers

Tue May 23, 2006 4:32 pm
silver7 wrote:Torrent numbers are "unique" or just 1-[number of torrents]? How about I remove torrent #1. Renumber or start with #2?


The number would be based on its torX directory, and we allways take the next available, so 1 will be reused by the next torrent you start.
agforsyth
Registered Member
Posts
133
Karma
0

Tue May 30, 2006 9:53 pm
I've written a patch to add the functionality talked about here. It's attached to:
http://bugs.kde.org/show_bug.cgi?id=128332


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]