Activity Stream
48,167 MEMBERS
61225 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1.     
    #11
    mmm mmm!
    Hi

    I can give you my script of unraring the files when the whole torrent is downloaded. It also manages .zip and .001 files.

    I haven't found a solution on deleting the .rar/.001/.zip files when the ratio is met however.

    Here goes:

    In .rtorrent.rc add this to invoke the script:
    Code: 
    system.method.set_key = event.download.finished,unpack_rar,"execute=~/unrar_files.sh,$d.get_base_path="
    Then make the script in the home folder of the user which runs rtorrent (you can specify searchpath if you want aswell but I won't add this in my example).

    vim unrar_files.sh

    Cut-n-paste this:
    Note you need to change "nedladdat/torrents" to the folder your rtorrent download files to. And "/home/daniel" to the folder the user your using.
    These two checks are there for rtorrent freaks out if the script takes too long to complete.

    Code: 
    #!/bin/bash
    #Skapat av Gymmarn 2010-02-11
    #Variabel $1 is the folder sent
    #Start to check if we're in the right folder (rTorrent seems to bug sometimes)
    if [ "$(ls -d $1 | grep -F nedladdat/torrents/)" ]; then
            #Create only 1 instance of this script to avoid rTorrent crashing
            if [ ! "$(ls /home/daniel/ | fgrep -i pidfile)" ]; then
                    yes no | nice -n 15 touch /home/daniel/pidfile
                    #Find and repeat for all folders and subfolders
                    for directory in $(find $1 -type d); do
                            #Check for .rar files and unpack them if found
                            if [ "$(ls $directory | fgrep -i .rar)" ]; then
                                    rarFile=`ls $directory | fgrep -i .rar`;
                                    searchPath="$directory/$rarFile"
                                    yes no | nice -n 15 unrar x -o+ $searchPath $directory
                            #Check for .001 files and unpack them if found
                            elif [ "$(ls $directory | fgrep -i .001)" ]; then
                                    rarFile=`ls $directory | fgrep -i .001`;
                                    searchPath="$directory/$rarFile"
                                    yes no | nice -n 15 unrar x -o+ $searchPath $directory
                            #Check for .zip files and unpack them if found
                            elif [ "$(ls $directory | fgrep -i .zip)" ]; then
                                    for zipFiles in `ls $directory | fgrep -i .zip`; do
                                            searchPath="$directory/$zipFiles"
                                            yes no | nice -n 15 unzip -n $searchPath -d $directory
                                    done
                                    #When there is .zip files there is often .rar/.001 in them. Check and unpack if so
                                    if [ "$(ls $directory | fgrep -i .rar)" ]; then
                                    rarFile=`ls $directory | fgrep -i .rar`;
                                    searchPath="$directory/$rarFile"
                                    yes no | nice -n 15 unrar x -o+ $searchPath $directory
                                    #Check for .001 files and unpack them if found
                                    elif [ "$(ls $directory | fgrep -i .001)" ]; then
                                    rarFile=`ls $directory | fgrep -i .001`;
                                    searchPath="$directory/$rarFile"
                                    yes no | nice -n 15 unrar x -o+ $searchPath $directory
                                    fi
                            fi
                    done
                    yes no | nice -n 15 rm -f /home/daniel/pidfile
            fi
    fi
    I'm no programmer and things could probably be made nicer, but here it is in all it's glory
    HATERS GONNA probably bring up some valid points considering I am an ignorant little twat so far up my own ass that i blame my problems on everyone and if you criticize me you're automatically wrong.

  2.   Sponsored Links

  3.     
    #12
    Member
    Website's:
    mytinydick.com
    Great post Sandvik.

    Bad bitch in my chevy.

  4.     
    #13
    Member
    Website's:
    eotips.com
    thanx OJ , but need to Read thoroughly to make it work

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. rar unrar in rapidleech
    By Gempis in forum Technical Help Desk Support
    Replies: 21
    Last Post: 21st Nov 2011, 07:56 AM
  2. [Other] RL with MTN, rar/unrar
    By Cojba in forum Archive
    Replies: 6
    Last Post: 23rd May 2011, 07:31 PM
  3. can't unrar on rapidleech
    By leonight in forum Technical Help Desk Support
    Replies: 12
    Last Post: 14th Jan 2011, 02:11 PM
  4. How to unrar in rapidleech..?
    By torrfriend in forum Technical Help Desk Support
    Replies: 1
    Last Post: 26th Dec 2010, 08:36 AM
  5. RL RAR/UNRAR
    By nICEsHARE in forum General Discussion
    Replies: 4
    Last Post: 13th Nov 2010, 11:10 PM

Tags for this Thread

BE SOCIAL