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

Scan Folders plugin recursion

Tags: None
(comma "," separated)
phunyguy
Registered Member
Posts
4
Karma
0

Scan Folders plugin recursion

Fri Oct 28, 2011 7:30 pm
Hello, I have a quick question (maybe feature request?) - Currently I use FlexGet for .torrent file downloads via RSS, and it separates different things in different folders. Currently the Scan Folder plugin only downloads to your default download location. Is there a way to make it download to the folder it got the .torrent from? I see the plugin recursively searches folders for .torrent files, but what is the point of that recursion if it just dumps the downloads into one big directory? That gets very messy... Thank you for your time.

EDIT: I have found the dbus commands to load the torrent via command line, is there a way to specify "Move {here} when complete" in the same command, or as a command right after? It has to be command line. This would solve my dilemma. Thanks!

EDIT#2: OK so I found my own solution, using dbus commands. I have it get the LastSaveDir property in settings, write a temporary value in there specifying download directory, add torrent, then reset value back to original. I put it all together in a quick and dirty Perl script, and here it is.

Code: Select all
#!/usr/bin/perl

@file    = split('/', shift);
$torrent = pop(@file);
$path    = join("/", @file);

$origLastSaved = `qdbus org.ktorrent.ktorrent /settings lastSaveDir`;
`qdbus org.ktorrent.ktorrent /settings setLastSaveDir "$path"`;
`ktorrent "$path/$torrent" --silent`;
`qdbus org.ktorrent.ktorrent /settings setLastSaveDir "$origLastSaved"`;


just call it with:
Code: Select all
perl download.pl /path/to/torrent/file.torrent
George
Moderator
Posts
5421
Karma
1

Re: Scan Folders plugin recursion

Thu Mar 22, 2012 5:55 pm
phunyguy wrote:Hello, I have a quick question (maybe feature request?) - Currently I use FlexGet for .torrent file downloads via RSS, and it separates different things in different folders. Currently the Scan Folder plugin only downloads to your default download location. Is there a way to make it download to the folder it got the .torrent from? I see the plugin recursively searches folders for .torrent files, but what is the point of that recursion if it just dumps the downloads into one big directory? That gets very messy... Thank you for your time.


This is not possible at the moment. I could add an option to save in the same location as the torrent.

EDIT: I have found the dbus commands to load the torrent via command line, is there a way to specify "Move {here} when complete" in the same command, or as a command right after? It has to be command line. This would solve my dilemma. Thanks!

EDIT#2: OK so I found my own solution, using dbus commands. I have it get the LastSaveDir property in settings, write a temporary value in there specifying download directory, add torrent, then reset value back to original. I put it all together in a quick and dirty Perl script, and here it is.

Code: Select all
#!/usr/bin/perl

@file    = split('/', shift);
$torrent = pop(@file);
$path    = join("/", @file);

$origLastSaved = `qdbus org.ktorrent.ktorrent /settings lastSaveDir`;
`qdbus org.ktorrent.ktorrent /settings setLastSaveDir "$path"`;
`ktorrent "$path/$torrent" --silent`;
`qdbus org.ktorrent.ktorrent /settings setLastSaveDir "$origLastSaved"`;


just call it with:
Code: Select all
perl download.pl /path/to/torrent/file.torrent

[/quote]

It's a bit hacky, but it will work. Maybe I should expand the dbus interface of the load call with a location parameter.
phunyguy
Registered Member
Posts
4
Karma
0

Re: Scan Folders plugin recursion

Tue Apr 10, 2012 3:08 am
George wrote:This is not possible at the moment. I could add an option to save in the same location as the torrent.


George, has this been implemented yet? Thanks!

EDIT: Also, my apologies, I stumbled on this post and didn't realize your reply was just a couple weeks ago. I am not trying to rush you. I assumed it was months ago.
rain922
Registered Member
Posts
1
Karma
0

Re: Scan Folders plugin recursion

Wed Apr 11, 2012 7:40 am
:
phunyguy wrote:
George wrote:This is not possible at the moment. I could add an option to save in the same location as the torrent.


George, has this been implemented yet? Thanks!

EDIT: Also, my apologies, I stumbled on this post and didn't realize your reply was just a couple weeks ago. I am not trying to rush you. I assumed it was months ago.

:lol: thx George, you need not to apology.
phunyguy
Registered Member
Posts
4
Karma
0

Re: Scan Folders plugin recursion

Mon May 07, 2012 6:33 pm
rain922 wrote::
phunyguy wrote:
George wrote:This is not possible at the moment. I could add an option to save in the same location as the torrent.


George, has this been implemented yet? Thanks!

EDIT: Also, my apologies, I stumbled on this post and didn't realize your reply was just a couple weeks ago. I am not trying to rush you. I assumed it was months ago.

:lol: thx George, you need not to apology.



rain922, that was ME that was apologizing to GEORGE. =P


Bookmarks



Who is online

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