Torrent Invites! Buy, Trade, Sell Or Find Free Invites, For EVERY Private Tracker! HDBits.org, BTN, PTP, MTV, Empornium, Orpheus, Bibliotik, RED, IPT, TL, PHD etc!



Results 1 to 10 of 10
Like Tree2Likes
  • 1 Post By Telaku
  • 1 Post By WallE

Thread: Automatic cross seeding script

  1. #1
    Donor
    Telaku's Avatar
    Reputation Points
    30045
    Reputation Power
    100
    Join Date
    Feb 2015
    Posts
    1,311
    Time Online
    21 d 6 h 10 m
    Avg. Time Online
    9 m
    Mentioned
    226 Post(s)
    Quoted
    163 Post(s)
    Liked
    429 times
    Feedbacks
    57 (100%)

    Automatic cross seeding script

    Currently I am a member of several trackers, which has the same contents, however some of them are easier to maintain ratio, while for others it's like impossible to seed a good amount of data without uploading or cross seeding torrents. I would like to get some help from someone who is experienced in these things about how to set it up to make it working automaticly through irssi.

  2. #2
    Banned Stump's Avatar
    Reputation Points
    10
    Reputation Power
    0
    Join Date
    Mar 2017
    Posts
    15
    Time Online
    16 h 23 m
    Avg. Time Online
    N/A
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)
    Feedbacks
    1 (100%)
    I am also interested, let me know too.

  3. #3
    Donor
    DirtyCrackPipe's Avatar
    Reputation Points
    2831
    Reputation Power
    73
    Join Date
    Mar 2012
    Posts
    91
    Time Online
    5 d 7 h 45 m
    Avg. Time Online
    1 m
    Mentioned
    15 Post(s)
    Quoted
    18 Post(s)
    Liked
    36 times
    Feedbacks
    4 (100%)
    Quote Originally Posted by gergo View Post
    Currently I am a member of several trackers, which has the same contents, however some of them are easier to maintain ratio, while for others it's like impossible to seed a good amount of data without uploading or cross seeding torrents. I would like to get some help from someone who is experienced in these things about how to set it up to make it working automaticly through irssi.
    What torrent client are you using or going to be using?

  4. #4
    Donor
    Telaku's Avatar
    Reputation Points
    30045
    Reputation Power
    100
    Join Date
    Feb 2015
    Posts
    1,311
    Time Online
    21 d 6 h 10 m
    Avg. Time Online
    9 m
    Mentioned
    226 Post(s)
    Quoted
    163 Post(s)
    Liked
    429 times
    Feedbacks
    57 (100%)
    Quote Originally Posted by DirtyCrackPipe View Post
    What torrent client are you using or going to be using?
    rTorrent with ruTorrent web UI.

  5. #5
    New user Crazytoo's Avatar
    Reputation Points
    10
    Reputation Power
    26
    Join Date
    May 2017
    Posts
    6
    Time Online
    2 h 43 m
    Avg. Time Online
    N/A
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)
    Feedbacks
    0
    Great offer
    count me in

    thanks

  6. #6
    Donor
    Mart's Avatar
    Reputation Points
    31217
    Reputation Power
    100
    Join Date
    Apr 2017
    Posts
    663
    Time Online
    31 d 14 h 9 m
    Avg. Time Online
    17 m
    Mentioned
    414 Post(s)
    Quoted
    106 Post(s)
    Liked
    660 times
    Feedbacks
    60 (100%)
    What offer Crazytoo?

  7. #7
    Donor
    invert06's Avatar
    Reputation Points
    1866
    Reputation Power
    43
    Join Date
    Jul 2017
    Posts
    22
    Time Online
    2 d 17 h 35 m
    Avg. Time Online
    1 m
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)
    Liked
    18 times
    Feedbacks
    0
    Quote Originally Posted by Macroco View Post
    Currently I am a member of several trackers, which has the same contents, however some of them are easier to maintain ratio, while for others it's like impossible to seed a good amount of data without uploading or cross seeding torrents. I would like to get some help from someone who is experienced in these things about how to set it up to make it working automatically through irssi.
    If you find this out I'm interested also! Using hardlinks for files to save one space, this would be amazing! Might have to make a feature request for sonarr/radarr to include something like this

  8. #8
    ~Carpe Diem~
    WallE's Avatar
    Reputation Points
    128635
    Reputation Power
    100
    Join Date
    Jun 2017
    Posts
    4,605
    Time Online
    79 d 6 h 6 m
    Avg. Time Online
    45 m
    Mentioned
    656 Post(s)
    Quoted
    76 Post(s)
    Liked
    2432 times
    Feedbacks
    6 (100%)
    i saw something on another forum but not sure if it is any good, I am reading it now here it is
    "
    Default [SCRIPT] AUTO CROSS-SEED WITH RUTORRENT & AUTODL-IRSSI

    After spending a little while looking I couldn't find any Rutorrent plugins to allow for automatic cross seeding without having to manually download the torrents from the trackers and add them, which is surprising. I wrote a tiny script Ive been using for a few days that cross seeds everything you download via IRSSI to all your trackers (that have the release) and thought I'd share it. Incredibly simple but I'm pretty pleased with it!

    For it to work it requires 'inotifywait', which is part of inotify-tools. It an awesome tool that monitors the kernel for any changes to the filesystem. Much more efficient that a timed loop and is instant. I'm using Ubuntu and it can be installed by
    Code:
    sudo apt-get install inotify-tools
    More info on the github
    HTML Code:
    https://github.com/rvoicilas/inotify-tools/wiki
    You'll also need the IRSSI plugin set up and working to get your releases…

    Create a directory for the script where the torrents are to be added by IRSSI, i.e.

    Code:
    /home/star_69/cross-seed/import
    then a directory for the script to hold the torrents while the first one of a matching release is being downloaded, i.e.
    Code:
    /home/star_69/cross-seed/staging
    create the script by

    Code:
    sudo nano cross-seed.sh
    and paste in the code below, but change the folder paths to the ones you just created:
    Code:
    #!/bin/bash
    #Simple crossseeding script by Star_69 for *********************
    
    
    #Create a folder where IRSSI plugin puts the torrent files. Will be used to sort
    import="/home/star_69/cross-seed/import/"
    #This folder is used to store the torrents IRSSI has snatched and will be sent to rtorrent after the first one has downloaded
    staging="/home/star_69/cross-seed/staging/"
    #Folder for your autoload or AutoTools folder where torrents are put to automatically be imported by rtorrent
    #If using autotools specify the root folder. You can create identical folders in the import dir above ie ./Movies/1080p/ and it will send them
    #to the matching directories within the autotools folder, ie /home/YOURUSERNAME/AutotoolsWATCH/Movies/1080p/
    rtorrent="/home/star_69/cross-seed/RTWATCH_FOLDER/"
    clear
    echo "MONITORING $import FOR TORRENTS"
    
    
    #inotify waits until the kernal detects a change in the folder. To test without using irssi by copying the torrents manually, use the CREATE event rather than MOVED_TO
    inotifywait -q -m -e MOVED_TO -r "$import" --format "%w%f" |
      while read file
      do
      #name of torrent file
      filename=$(basename "$file")
      #hopefully a .torrent - irssi initially adds it as a .torrent1 but renames it after download - hence MOVED_TO rather than create on the inotify event
      extension="${filename##*.}"
      #name without the extension.. probably now redundant as irssi prepends tracker name
      releasename="${filename%.*}"
      #trimmed release name without the extension or the tracker prepended name
      trimmedrelease="${releasename#*-}"
      #Replaces spaces in release name for dots. Useful as some trackers (ie TL) sometimes have whitespaces in the torrent name
      trimmedrelease="$(echo ${trimmedrelease} | tr " " ".")"
      #checks its a valid torrent file
        if [ "$extension" == "torrent" ]; then
        echo "$(date +"%d-%m-%Y %T") $filename FOUND!!"
        #create directory based on release name
          #checks if directory doesnt exist
          if [ ! -d "$staging$trimmedrelease" ]; then
          #creates folder based on releasename
          mkdir "$staging$trimmedrelease"
          echo "$(date +"%d-%m-%Y %T") NEW RELEASE so created folder $staging$trimmedrelease"
          #moves to rtorrent watch folder
          mv "$file" "$rtorrent${file#$import}"
          echo "$(date +"%d-%m-%Y %T") SENT $filename to $rtorrent${file#$import} for rtorrent to pickup"
          else
          #copies to matched release folder
          mv "$file" "$staging$trimmedrelease/"
          echo "$(date +"%d-%m-%Y %T") EXISTING FOLDER FOUND. SENDING $filename TO $staging$trimmedrelease/"
          fi
        else
        echo "$(date +"%d-%m-%Y %T") $filename IS NOT A VALID TORRENT - IGNORING"
      fi
    done
    set permissions
    Code:
    sudo chmod 777 ./cross-seed.sh
    run it with the same permissions you run IRSSI (i.e. root or user) otherwise it will get stuck moving the torrents. Its best to use screen like rtorrent and IRSSI as you can detach and it runs in the background
    Code:
    screen -d -m -S cross-seed ./cross-seed.sh
    This next script is fired on completion of the first torrent to import the other torrents from the same release and remove the folder in the staging area. Create it by
    Code:
    sudo nano rtcomplete.sh
    paste this
    [/CODE]#!/bin/bash
    Releasename="$1"
    Releasename="$(echo ${Releasename} | tr " " ".")"
    staging="/home/star_69/cross-seed/staging/"
    rtorrent="/home/star_69/cross-seed/RTWATCH_FOLDER/"


    while [ -d "$staging$Releasename" ]
    do
    mv "$staging$Releasename"/* "$rtorrent"
    rmdir "$staging$Releasename"
    done[/CODE]

    set permissions
    Code:
    sudo chmod 777 ./rtcomplete.sh
    add the following line to your rtorrent.rc (changing the path)
    Code:
    system.method.set_key = event.download.finished,notify_me,"execute=/home/star_69/cross-seed/rtcomplete.sh,$d.get_name=" 
    system.method.set_key = event.download.hash_done,notify_me,"execute=/home/star_69/cross-seed/rtcomplete.sh,$d.get_name="
    You will need to restart rtorrent for saves to take effect
    In autodl-irssi Preferences check the boxes 'Download duplicate releases' and 'use unique torrent filenames'. The first option is self explanatory, the second prepends the tracker name to the torrent file so it doesn't overwrite the file as it downloads an identical torrent name from each tracker.



    On your filters, remove the tracker you've specified so its blank. When the filter finds a release you will get multiple torrents. In the Action tab on the filter change the drop down to Save to watch folder and put in the directory of the import directory you created earlier. inotify works recursively so you can have TV / MOVIE / HD / SD folders within the import folder to match your AutoTools folders (if you use it)




    Now you're all set

    Say you have 6 trackers and you have a filter for 'Game Of Thrones'. The 'fastest' site has their torrent downloaded first and its instantly sent to rtorrent for download. All subsequent torrents IRSSI downloads for that release (whilst its being downloaded) get moved to a folder based on the release name in the 'staging' folder, i.e. a dir called Game.of.Thrones.S03E04.720p.HDTV.x264-EVOLVE. When the download is complete, all the other torrents which have been snatched for that release get moved to rtorrent's watch folder (or AutoTools dir) and immediately get seeded, and the folder Game.of.Thrones.S03E04.720p.HDTV.x264-EVOLVE is deleted. Should a tracker be REALLY slow and its not announced while the first one is downloading, it'll still be added, but you'll already have it regardless and will cross seed as normal.



    If you wanted to cross seed on a 'faster' site to build your ratio and download on a 'slower' one first, change the delay accordingly on the trackers section in IRSSI.

    This obviously only works on trackers where the files are identical, i.e. not unrar'ed. Sometimes the file sizes differ slightly but it only downloads the few meg difference i.e. proof or sample and seeds as normal. If you have a few sites that do unrar or are worried about downloading multiple releases unnecessarily you can specify in the filter under MATCHED SITES to include certain trackers with a comma separating them, i.e. putting 'SCC, TL, IPT, TBY' etc are all 'scene' trackers and do not unrar. Obviously you'd need to have a play about...

    Its a quick and dirty but works for me. I hope its useful to someone else! Documentation is not really my strong point, so if you get stuck or have any questions, please shout.

    Happy boosting


    ********I am not the creator nor do I know if it works I just saw it in a search. If anyone tries it let me know, I am currently having directory issues on my client.****
    masonos likes this.

  9. #9
    Donor
    masonos's Avatar
    Reputation Points
    155541
    Reputation Power
    100
    Join Date
    Aug 2014
    Posts
    7,845
    Time Online
    504 d 6 m
    Avg. Time Online
    3 h 25 m
    Mentioned
    2824 Post(s)
    Quoted
    895 Post(s)
    Liked
    6617 times
    Feedbacks
    372 (100%)
    The above script needs root access to be installed so don't try this unless you have a dedi seedbox and some linux experience or you might screw up your box.

    Sent from my HTC 10 using Tapatalk

  10. #10
    ~Carpe Diem~
    WallE's Avatar
    Reputation Points
    128635
    Reputation Power
    100
    Join Date
    Jun 2017
    Posts
    4,605
    Time Online
    79 d 6 h 6 m
    Avg. Time Online
    45 m
    Mentioned
    656 Post(s)
    Quoted
    76 Post(s)
    Liked
    2432 times
    Feedbacks
    6 (100%)
    thank you for clarifying that


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •