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

Email Notifications by Groups

Tags: None
(comma "," separated)
theLured
Registered Member
Posts
3
Karma
0

Email Notifications by Groups

Sun Jan 02, 2011 3:10 pm
Hello

The email notifications script is pretty good.

I use ktorrent for several people and having an auto email sent to them would be really useful.

Is there any way to send the email to a different address for each group?

I don't really know how to program in python, I might be able to get by with some guidance though.


EDIT:
I've been looking through the code and line 32 looks of interest
Code: Select all
msg['To'] = self.mail_dest
I can change this to an email address of my choice.
All I need to know is how I can get the torrent's group name.
Once I know this, I can make some basic if statements.

I went into qdbusviewer(barely know how to use it) and found ktorrent. I went into the methods torrent > info hash > org.ktorrent.torrent. I couldn't find anything to do with the torrents group.
George
Moderator
Posts
5421
Karma
1

Re: Email Notifications by Groups

Mon Jan 03, 2011 6:06 pm
First of all, the scripting plugin currently doesn't support this. I was going to expand grouping support in the scripting plugin significantly in 4.1, but due to various reasons it has been shifted to 4.2.

And second, torrents don't have groups, groups have torrents. It's an important distinction.
theLured
Registered Member
Posts
3
Karma
0

Re: Email Notifications by Groups

Thu Jan 06, 2011 6:57 am
Okay, thanks. It's good to know.

I understand what you mean by groups having torrents.

I guess I will have to wait :).

At the moment though I have a solution.
My torrents are moved to a different directory for each group, so I could just check the torrents location.
The script is a bit too quick because it's picking up the current "incomplete" location.
I guess I will have to add a pause and check once every 30 seconds to see if the file has moved.

I'm a little busy at the moment, but will post the code once I have it written. There will be no gui for it though.
theLured
Registered Member
Posts
3
Karma
0

Re: Email Notifications by Groups

Sun Jan 23, 2011 11:01 am
Checking by folder doesn't work.
tor.dataDir() only returns the incomplete folder. Even If I add a whole minute delay before checking.

I think the script is run before the data is moved, since keeping a delay at line 137 seems to make ktorrent freeze when a download is complete.

Does anyone else have any ideas?


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]