NOOB guide to Automatically grab torrents with flexget

  • I did not create this I was reading how the old forum would be offline as of september 1 and all post's would be lost. After reading this post I thougth it would be a waste as the original poster put alot of time into the write up. Hope the original poster does not mind.
    NOOB guide to Automatically grab torrents with flexget


    Postby magnets99 » Sat Jan 28, 2012 5:41 am
    So, you have openmediavault (OMV) running, it saves all your media for you to stream around the house/office/interwebs
    you have transmission running, meaning you can get OMV to download your favorite shows for you
    But... you still have to manually find the torrent files and send them to OMV for downloading.
    Not such a big deal, but if you have a lot of regular programs you like to watch, this can be time consuming.
    If your favorite torrent site offers rss, you can use a program called flexget to read that feed, select from the feed the programs you like the most, and then downoad them.


    this guide is how to install flexget.
    it is aimed at people who are new to linux
    you will probably need some windows knowlege though.




    First of all, you need to have OpenMediaVault up and running and be able to see at least one share (with write persmissions) from your windows box.
    I also really reccomend you do NOT use a flash drive for your OS, though if you are already running transmission with OMV you will have probably found out that OMV eats flash memory for breakfast


    Second remember that linux/debian/unix is CaSe sEnSiTive and that it will punish you for any and all spelling mistakes (sometimes instantly, sometimes many hours later as you are crying out for beer and an ok button).




    got it? great.



    now were are going to be working in the OMV web gui, windows and the Linux shell, to work with the linux shell you will need a telnet client


    download Putty from here
    http://www.chiark.greenend.org…atham/putty/download.html
    The putty.exe will do fine
    Handy tip for putty, Ctrl+shift+c for copy and a single right click for paste
    ctrl+c for cancel operation


    ok, here we go:



    requirements:


    OMV NOT RUNNING ON A FLASH DRIVE
    bit torrent up and running with a tested watch folder
    windows share


    in the OMV web gui, click on ssh and enable ssh
    leave everything else blank



    now my watch folder lives in a folder called Data, inside a share caled dropzone
    from windows the path would be
    \\openmediavault\dropzone\watch


    remember this for later



    run putty.exe
    in the box marked host name type the ip address of OMV
    when it logs in, use root as the username and whatever you chose during install as the password
    You should see something like this





    Next we install python


    see if you've already installed it via another plugin by typing one or all of the following



    Code
    python -V
        python2.5 -v
        python2.6 -v
        python2.7 -v
        python25 -v
        python26 -v
        python27 -v




    if you get anything other than command not found, it's installed


    if not, we need to install it, type



    Code
    apt-get install python2.6




    type y to additional disk space


    now type



    Code
    python2.6 -v



    and you should get loads of stuff


    type



    Code
    exit()



    to actually get out of the python program (which we entered when you typed python2.6 -v)
    ok next up is installing easy_install, type



    Code
    apt-get install python-setuptools




    then we can install flexget (yay!) type



    Code
    easy_install flexget




    once installed, verify by typing



    Code
    flexget -V



    (note the capital V here)
    i'm running 1.0r2688 but depending on when you are doing this, you may get a later version than me.


    next up is to move the default locaiton of the flexget config file so we can edit it from windows.
    find out where it currently is



    Code
    which flexget




    it should be



    Code
    /usr/local/bin/flexget




    but we are going to put the config file in the Dropzone folder (the folder that also has my watch folder in it)


    to find that path in linux we go to the openmediavault web gui
    click on Shared folders and it's wrriten in Directory, my one says
    /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data


    now, i got a bit confused here, there is a difference between the path and the share
    on windows i vist \\openmediavault\dropzone\
    but "dropzone" is the NAME OF THE SHARE on a filer called openmediavault
    on openmediavault itself, that 'folder' does not exist (as it's not a folder its the name of a share)


    So, in windows i go to \\openmediafiler\dropzone and i create a new text file called config.yml
    (you should do this now too)
    but in linux/openmeidavault the actual path is


    /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/config.yml


    and not


    /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/dropzone/config.yml


    hope that makes sense.


    so anyway, create a blank text file called config.yml and pop it in the folder (or share) that contains your watch folder (not actually in your watch folder, the one above it).
    ok, now we tell flexget where to get the config file, in putty type



    Code
    flexget -c /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/config.yml




    obviously change my path shown above to match your path.
    you should get an error similar to



    Code
    2012-01-28 15:09 INFO     manager                       Running database cleanup.
        2012-01-28 15:09 WARNING  manager                       There are no feeds to execute, please add some feeds




    if you get



    Code
    2012-01-28 15:09 INFO     manager                       Tried to read from: /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/config.ym3
        2012-01-28 15:09 CRITICAL main                          Failed to find configuration file /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/config.ym3
        2012-01-28 15:09 INFO     manager                       Tried to read from: /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/config.ym3
        2012-01-28 15:09 CRITICAL main                          Failed to find configuration file /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/config.ym3




    you have typed the path wrong (yes you have, seriously, i spent like an hour doing this. Its not a permisions problem, you have the path wrong ok). Don't forget you can paste with a right click in putty


    next up is configuring the flexget config.yml
    there are many resources about this; start here
    http://flexget.com/wiki/Configuration


    its a huge topic and has many options so i'm not going to go into it in this post.
    my test config file looks like this


    feeds:
    tv-shows:
    rss: http://my.favoritedownloadsite.com/rss. ... rect&cat=7
    series:
    - hot geeks and why they are awesome
    - futurama
    - some other show i like
    download: /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/watch/


    you can even run flexget now and see what would happen, it has a test scenario where it looks through the config file and tells you what would happen
    type



    Code
    flexget -c /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/config.ym --test




    ok once you are happy that your flexget config is correct, we need to tell openmediavault to run flexget every n minutes.
    Linux does this via a utility called cron, if you're used to windows, think of it as task scheduler.
    luckily its very easy to set up, we can do it in OpenmediaVaults web gui


    click on cronjobs
    click on add


    now i get mine to run every 5 minutes, so that means i set minute to 5 and tick the box Every N minute
    i leave the others.
    user i set as root
    i set the command to
    flexget -c /media/9cefe750-d523-42a3-b9b8-8a03a1a3a2fd/data/config.yml


    and to make sure it works i'm going to get it to send an email (i'll turn it off once i'm happy)
    this option only works if you've set your email up and working ok from omv


    Ok
    you now have flexget, watching for the files you are seeking, which then saves them automatically to your watch folder where transmission will download them.
    yay






    a note:
    I'm a beginner linux user so its likley that what i've done here is not best practice. I'm pretty sure i shouldn't have done everything using the root user, and i should have put it in a jail (though i wasn't sure what would happen after a reboot)
    so if somoene wants to comment on how i should do it. please feel free
    also, if somoene can reccomend a better tool than flexget (and why it's better) please do post.


    /media/16bacc3f-3b07-4f97-9e2d-d5f2db20b753/media
    Foxcon 4CS Atom M/B


    Intel® AtomTM single-core 230 processor mounted onboard
    533 MHz (FSB)
    2Gbb DDR2 533 MHz x 1 DIMM, (Max. 2GB)
    10/100M LAN, Realtek® RTL8100C


    SATA II WD 2TB Cavier Green for data


    nasty 80gb sata drive i found in a bin for the OS

  • The only change/correction/update I'd make is to actually do the install via pip (ability to uninstall being the most useful):


    Code
    s/apt-get install python-pip/apt-get install python-setuptools/


    Code
    s/easy_install flexget/pip install flexget


    The FlexGet developers list this as the install process on their website, so I would tend to go with what they say.

  • Hi,


    although it works its a pitty that you can not use the transmission plugin in flexget as for that you need to run transmissionrpc bigger then version 0.6 and python-transmissionrpc (0.8-1) is in wheezy so we need to wait for this

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!