[PyQt] Add a download to KGet

Jan Holthuis jan at holmek.de
Sat Aug 16 10:46:42 BST 2008


Thanks both of you!
Dog pointed me the right direction. However, I am now using the DBUS interface 
instead of DCOP (KDE 4 replaced it).

The Method is:
qdbus org.kde.kget /KGet addTransfers string:"http://www.example.com" 
string:"My Downloads" bool:True

All the Best,
Jan Holthuis

Am Donnerstag 14 August 2008 23:10:54 schrieb Dog Walker:
> On Thu, Aug 14, 2008 at 1:23 PM, Roberto Alsina <ralsina at kde.org> wrote:
> > On Thursday 14 August 2008 16:37:16 Dog Walker wrote:
> >> On Thu, Aug 14, 2008 at 6:47 AM, Jan Holthuis <jan at holmek.de> wrote:
> >> > Well, I really need to know if there's a way to do this. Maybe via
> >> > DBUS or something like that...
> >> > Can someone please help me?
> >> >
> >> > Thanks in advance,
> >> > Jan Holthuis
> >> >
> >> > Am Sonntag 10 August 2008 15:10:17 schrieb Jan Holthuis:
> >> >> Hi!
> >> >> I was just wondering if there's a method to add a download to KGet.
> >> >> Maybe something like this:
> >> >> http://api.kde.org/4.x-api/kdenetwork-
> >> >> apidocs/kget/html/classKGet.html#2cb901470443e9fdd5c4b703b6f97434
> >> >>
> >> >> Unfortunately, it seems that kdenetwork doesn't exist in PyKDE. Is
> >> >> (or will) there (be) another way to do this?
> >> >>
> >> >> All the best,
> >> >> Jan Holthuis
> >>
> >> I would like at dcop. kget has a addTransfers method which you may be
> >> able to use via the dcopext module. Run kdcop to find the names
> >> required. (kdcop wouldn't execute the addTransfers method when I tried
> >> it because it didn't know what the KURL::list type was, but dcopext
> >> does know.)
> >
> > I replied already but maybe it didn't show up: just call kget with the
> > URLs you want to download as arguments in its CLI.
> >
> > It will add them itself.
>
> [...]
>
> When I use your method, Roberto, kget displays a dialog asking where
> to store the downloaded file, then immediately starts to download it
> (this when kget isn't already downloading something). What the OP
> pointed to looks exactly like what is available through the dcop
> interface.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080816/f721df3e/attachment-0001.bin


More information about the PyQt mailing list