Unrar and cleanup script - UPDATE 2013.05.24
Re: Unrar and cleanup script - UPDATE 2011.10.24
Hey globalrebel, the added statements (an mkdir and a cd) have nothing to do with where the resulting files will end up. You have to assign a new path to DEST_DIR for that.
Good luck with that ...
Good luck with that ...
Re: Unrar and cleanup script - UPDATE 2011.10.24
How would I add "remove in x days (or seconds)" to this script?
Could someone assist please.
Could someone assist please.
Re: Unrar and cleanup script - UPDATE 2011.10.24
A delay of 1 hour before removing the torrent is in there already using the sleep command. Please read the manual page for sleep. Oh, and make sure transmission is not restarted during the sleep period because you might end up removing an unrelated torrent.ZaPHoN wrote:How would I add "remove in x days (or seconds)" to this script?
Could someone assist please.
Unrar and cleanup script - UPDATE 2013.01.10
Changelog
- Use TR_TORRENT_HASH instead of TR_TORRENT_ID for referencing torrents. This will ensure the proper torrent is deleted after a restart of the daemon.
Re: Unrar and cleanup script - UPDATE 2013.01.10
I would love a simplified remove when seed complete, "Finished". (just the torrent not the data)
trying to figure out how to do this.
transmission-remote -n user:password -l | grep Finished
will list the current finished seeded torrents.
how do i issue
transmission-remote -n user:password -r "Name of torrent without .torrent"
with the result of the first command input'ed correctly into the "Name of torrent without .torrent"
or if there is a simpler way to do it. Thanks.
trying to figure out how to do this.
transmission-remote -n user:password -l | grep Finished
will list the current finished seeded torrents.
how do i issue
transmission-remote -n user:password -r "Name of torrent without .torrent"
with the result of the first command input'ed correctly into the "Name of torrent without .torrent"
or if there is a simpler way to do it. Thanks.
-
- Posts: 552
- Joined: Sun Dec 13, 2009 10:44 pm
Re: Unrar and cleanup script - UPDATE 2013.01.10
Quick and crude way, someone could probably improve it a bit:ccomly wrote:I would love a simplified remove when seed complete, "Finished". (just the torrent not the data)
trying to figure out how to do this.
transmission-remote -n user:password -l | grep Finished
will list the current finished seeded torrents.
how do i issue
transmission-remote -n user:password -r "Name of torrent without .torrent"
with the result of the first command input'ed correctly into the "Name of torrent without .torrent"
or if there is a simpler way to do it. Thanks.
Code: Select all
transmission-remote -n user:pw -l | grep Finished | awk '{ print $1 }' | xargs -I '{}' transmission-remote -n user:pw -t'{}' -r
Re: Unrar and cleanup script - UPDATE 2013.01.10
thanks a bunch seems to work, also thanks for pointing to xargs and awk.blacke4dawn wrote:Quick and crude way, someone could probably improve it a bit:ccomly wrote:I would love a simplified remove when seed complete, "Finished". (just the torrent not the data)
trying to figure out how to do this.
transmission-remote -n user:password -l | grep Finished
will list the current finished seeded torrents.
how do i issue
transmission-remote -n user:password -r "Name of torrent without .torrent"
with the result of the first command input'ed correctly into the "Name of torrent without .torrent"
or if there is a simpler way to do it. Thanks.Code: Select all
transmission-remote -n user:pw -l | grep Finished | awk '{ print $1 }' | xargs -I '{}' transmission-remote -n user:pw -t'{}' -r
Re: Unrar and cleanup script - UPDATE 2013.01.10
@cconly, blacke4dawn:
Your solutions have nothing to do with the unrar-and-cleanup script, which runs when a torrent is complete.
In the script there's is the line:
Why not just replace that with:
Your solutions have nothing to do with the unrar-and-cleanup script, which runs when a torrent is complete.
In the script there's is the line:
Code: Select all
transmission-remote -n $TR_USERNAME:$TR_PASSWORD -t $TR_TORRENT_HASH --remove-and-delete
Code: Select all
transmission-remote -n $TR_USERNAME:$TR_PASSWORD -t $TR_TORRENT_HASH --remove
-
- Posts: 552
- Joined: Sun Dec 13, 2009 10:44 pm
Re: Unrar and cleanup script - UPDATE 2013.01.10
The way he worded it sounded like he wanted them removed when they where done seeding and not "just" done downloading.killemov wrote:@cconly, blacke4dawn:
Your solutions have nothing to do with the unrar-and-cleanup script, which runs when a torrent is complete.
In the script there's is the line:Why not just replace that with:Code: Select all
transmission-remote -n $TR_USERNAME:$TR_PASSWORD -t $TR_TORRENT_HASH --remove-and-delete
Code: Select all
transmission-remote -n $TR_USERNAME:$TR_PASSWORD -t $TR_TORRENT_HASH --remove
Re: Unrar and cleanup script - UPDATE 2013.01.10
I get this error I do not understand why?
Haven't touched the script except edit the log location.
Anybody knows what's wrong?
Haven't touched the script except edit the log location.
Code: Select all
posttorrent.sh: line 19: syntax error near unexpected token `then'
posttorrent.sh: line 19: ` if [ -e "$SRC_DIR/keep" ]; then'
Re: Unrar and cleanup script - UPDATE 2013.01.10
I think I found my pb, it's the copy/paste.
I don't understand why people don't simply post the file itself as c/p has so much issues.
I am using SELECT ALL and right click and selecting copy.
Then I go on my Linux terminal using nano and just paste...and apparently there are some bad caracters in the script. :/
Can someone please post the script in a file please.
I don't understand why people don't simply post the file itself as c/p has so much issues.
I am using SELECT ALL and right click and selecting copy.
Then I go on my Linux terminal using nano and just paste...and apparently there are some bad caracters in the script. :/
Can someone please post the script in a file please.
Re: Unrar and cleanup script - UPDATE 2013.01.10
Tried it again myself and ... It's just your fingers being twitchy.
Re: Unrar and cleanup script - UPDATE 2013.01.10
I have not managed to c/p it either with nano or vi without getting errors.
to bad for me I guess.
Thanks for your time.
to bad for me I guess.
Thanks for your time.
Re: Unrar and cleanup script - UPDATE 2013.01.10
Hello,
Script looks really good, but since I'm such a newbie at this I'm a little afraid to implement it before I know a few things.
Can you toggle it, so it doesnt actually delete the rarfiles after the extracting is done? I use a FTP ratio community, so they would get really angry if someone just downloaded the files and delete it right after.
Also, will it extract it in the same folder as the rars are in?
Lastly, I'm using ReadyNAS Ultra 2, I assume it works with it?
Script looks really good, but since I'm such a newbie at this I'm a little afraid to implement it before I know a few things.
Can you toggle it, so it doesnt actually delete the rarfiles after the extracting is done? I use a FTP ratio community, so they would get really angry if someone just downloaded the files and delete it right after.
Also, will it extract it in the same folder as the rars are in?
Lastly, I'm using ReadyNAS Ultra 2, I assume it works with it?
Re: Unrar and cleanup script - UPDATE 2013.01.10
Yeah, I just finished slapping some lipstick on her.GAPP wrote:Hello,
Script looks really good, but since I'm such a newbie at this I'm a little afraid to implement it before I know a few things.
Sure, just give me your account data and I will edit it for you. (Or put a file named "keep" in the top folder of your torrent. Or find "--remove-and-delete" in the script and replace it with "--remove".)Can you toggle it, so it doesn't actually delete the rarfiles after the extracting is done? I use a FTP ratio community, so they would get really angry if someone just downloaded the files and delete it right after.
No, but DEST_DIR="$SRC_DIR" might do the trick.Also, will it extract it in the same folder as the rars are in?
You haven't read the first post or you you have a hard time understanding it, right? But wouldn't that make your initial compliment just a bit ... insincere?Lastly, I'm using ReadyNAS Ultra 2, I assume it works with it?
In short: @alln00bs: You need to find some things out for yourselves!