Simple GUIDE: *Fully Automated* TV/Movie Following via XBMC


 
579 posts   Page 1 of 24   1, 2, 3, 4, 5 ... 24
by zilexa » Fri Jun 14, 2013 2:17 pm
Hi all,
This guide is intended for people who like to watch TV Shows and Movies via their mediacentre (XBMC) on the TV. After you finish this guide, you will be able to just sit back, relax and watch everything in HD quality you like without manually searching for downloads etc. This is a simple guide, meaning you don't have to be an expert.
Also, you don't need paid subscriptions on newsgroups and if you don't know what that means, you are in the right place because we are not even going to talk about that after this intro :)

Pros compared to using newsgroups:
- No need for a (paid) subscription on newsgroups.
- No need for postprocessing of the files (extracting and unparring), this saves precious CPU and memory resources on the RPI.
- By prioritising the processes on the RPi, this solution is "light" enough to run on the same RPi that runs XBMC simultaneously!
Pros compared to Sickbeard & Couchpotato:
- Flexget is a more lightweight solution
Cons:
- Flexget, the superlightweight intelligent tool used here is complex to set up initially, but not anymore with the preconfigured settings file in this guide!


LAST UPDATE: 8-11-2013
removed more unnecessary details since XBIAN takes care of most stuff automatically, now only 6 steps. Now the guide also matches the upcoming beta2 release of XBian. The most amazing XBMC experience on a Raspberry ever!

REQUIRED INGREDIENTS:
  • Raspberry Pi with internet connection
  • USB harddrive attached to the RPi or to a USB hub which is connected to the RPi
  • A very fast SD card: ICIDU class 10 4GB or Transcend class 10 8GB or similar. In Holland you can buy the ICIDU at Dixons and Mycom.
  • a Windows laptop with putty (download and put it on the desktop) or Macbook, go to Applications>Utilities>Terminal.
  • an FTP client like Cyberduck.

QUICK SUMMARY HOW IT WILL WORK:
Have you ever heard of imdb.com? This is like the Wikipedia of movies and tv shows. There is a similar site called Trakt.tv. Biggest difference: you can create an account at Trakt.tv, install the addon in XBMC, and it will automatically keep track of what you watched in XBMC and, very important for this guide: what you would like to watch.

Basically, you will not notice anything after adding a running TV Show to Trakt. Once an episode or movie becomes available in the quality you prefer --> it will appear in XBMC.

in detail:
On trakt.tv, you can simply add tv shows to a list. Special software (Flexget) on the RPi keeps an eye on this list of yours. Secondly, this software will use intelligent scripting (nothing you need to do, dont worry) to get the latest episodes or movies from online newsfeeds (torrents) that are meant for this setup. Thirdly, after an episode or movie has been downloaded, XBMC will be notified and add just that download to its library.


PREPARATIONS:

  • (optional but recommended) create an account at showrss.karmorra.info and add the shows you like to your list.
  • (required) Create an account at Trakt.tv.
  • When done, move your mouse to your accountname in the upper right corner and choose "Lists" in the context menu that appears. This is also called "Custom List"
  • Create a list "Following". If you are like me and you follow most tv shows in normal quality and some in high 720p quality, create two lists (“Following” and “Following in HD”). I consider normal quality to be hdtv but not 720p rips.
  • add all tv shows you like watch in XBMC to this list by going to TV Shows and scroll through the shows or search the shows. You can do this by selecting "Add to Custom List" for every tv show.
  • for Movies: simply select "add to Watchlist". A movie will automatically be removed from this Watchlist once you have watched it in XBMC.
Flexget config
Flexget config: copy the text of this file and save as config.yml (you will need it later)

  • Open config.yml with Notepad (Windows) or TextEdit (I recommend TextWrangler) on Mac and modify the things in CAPITALS to your personal accounts:
    - your desired Transmission username/password
    - your http://showrss.info USER ID
    - your Trakt.tv account info and API key (you can find this in Trakt.tv > Settings > API)
    - change the names of the Trakt custom lists to the names of the list(s) you created on trakt.tv. This config supports 2 lists for tv shows, you can easily add more or remove one.

START: INSTALL THE RPI WITH XBIAN
Follow the XBian install instructions here.

NOTE: Make sure you insert the SD card in the RPi and connect all cables BEFORE you connect it to power.
NOTE: Check your router to see what the iP address of the RPi is. If your router supports it, reserve a fixed IP for the RPi so that the RPi will always be accessible via this IP address.
If you prefer using RaspBMC, you can follow the spin off guide created by Vypr. As far as I know and also according to this review, XBian is easier to set up (and current version is faster).

-STEP 1-. INSTALL TOOLS
Open Putty (Windows) or the Terminal (mac) and connect to your RPi.
How? Putty: input the IP of your RPI (for example 192.168.1.1) and the username (default: xbian) and password (default:raspberry). On the mac, copy paste this command and hit enter, then enter your password: ssh -l xbian 192.168.1.1 (you can find your IP address in XBMC via Settings>System Info).
--> once connected, a blue/grey menu will be shown. This is Xbian-Config. You will rarely need this, since you can already do everything from within XBMC (and I assume you know how to control XBMC, using an app on your phone or tablet like Yatse Remote from Google Play or XBMC Remote from iTunes).


1. Transmission
  • In XBian-Config, go to Packages > Net and select Transmission, install this.
2. Flexget
  • Exit Xbian-Config and run these commands one by one. Always choose Yes when it asks to install something:
    sudo apt-get install python-pip
    sudo pip install flexget
    sudo pip install transmissionrpc
test Flexget install
  • Then run this, it should return a version, if not, something went wrong, install again
    flexget -V

-STEP 2-. CREATE THE FOLDER STRUCTURE ON USB DRIVE
You need to configure the file structure on your external USB drive.
I assume you just exited Xbian-Config and I assume you connected your USB harddrive already, if not, you can do it know and wait 30sec before continuing. Your USB harddrive will then be accessible via /media/usb0

  • (only if this is the first time) create the folders that do not exist already (you might need to add 'sudo' to the command):
    mkdir /media/usb0/Downloads
    mkdir /media/usb0/Downloads/flexget
    mkdir /media/usb0/Downloads/incomplete
    mkdir /media/usb0/Downloads/torrents
    mkdir '/media/usb0/TV Shows'
    mkdir /media/usb0/Movies
    mkdir /media/usb0/Pictures
    mkdir /media/usb0/Music
  • remove the folders on the SD card:
    sudo rmdir /home/xbian/downloads
    sudo rmdir /home/xbian/incomplete
    sudo rmdir /home/xbian/torrents
  • make sure you and the downloadtool transmission has permission to use the folders on your usb disk:
    chmod -R 777 /media/usb0/Downloads
    chmod -R 777 '/media/usb0/TV Shows'
    chmod -R 777 /media/usb0/Movies
    chmod -R 777 /media/usb0/Music


-STEP 3-. CONFIGURE TRANSMISSION
login via putty or terminal. When you are in Xbian-Config, choose Exit.
Transmission should be configured after you stopped it from running, otherwise the changed settings will not be saved. Follow the steps below:

  • 1. copy/paste and run this command: sudo service transmission stop
  • 2. copy/paste and run this command: sudo nano /etc/transmission/settings.json
  • 3. now you see all settings of Transmission. change the following settings to these values and add your preferred login credentials:
    "alt-speed-down": 400,
    "download-dir": "/media/usb0/TV Shows",
    "download-queue-enabled": true,
    "download-queue-size": 2,
    "incomplete-dir": "/media/usb0/Downloads/incomplete",
    "ratio-limit": 0.2,
    "ratio-limit-enabled": true,
    "rpc-password": "YOURDESIREDPW",
    "rpc-username": "YOURDESIREDUSERNAME",
    "rpc-whitelist-enabled": false,
    "script-torrent-done-enabled": true,
    "script-torrent-done-filename": "/etc/transmission/xbmc-upd.sh",
    "seed-queue-enabled": false,
    "seed-queue-size": 2,
    "speed-limit-down": 2000,
    "speed-limit-down-enabled": true,
    "speed-limit-up": 90,
    "speed-limit-up-enabled": true,
    "watch-dir": "/media/usb0/Downloads/torrents",
  • press CTRL+O and then choose enter to save the file. Then press CTRL+X to exit the settings file.
  • copy/paste and run this command: sudo service transmission start

-STEP 4-. USE CYBERDUCK TO ADD FLEXGET SETTINGS
Start Cyberduck on your laptop and login to your RPi by entering IP address, username (xbian) and password. Go to Media/usb. This is your usb harddrive. Here you'll see all important folders (simply type ls and hit enter) you created in the previous steps like Downloads, TV Shows, Movies. Episodes that are downloading will be in media/usb/Downloads/incomplete. When done they should appear in the appropriate subfolder of TV Shows. Now perform these steps:

  • Open the folder /media/usb0/Downloads/Flexget
  • Copy the config.yml file you locally saved during the PREPARATIONS (above) to this folder

-STEP 5-. TRIGGER XBMC TO AUTO-UPDATE LIBRARY IF NEW DOWNLOAD IS FINISHED
You need to create a script via Putty (Windows) or Terminal (Mac) and allow permissions. I assume you are already logged in and not in xbian-config.

First we create a new textfile and open a texteditor:
  • sudo nano /etc/transmission/xbmc-upd.sh
  • Now copy this and save it with CTRL+O, exit texteditor with CTRL+X:
    Code: Select all
    /usr/bin/wget --header='Content-Type:application/json' --post-data='{"jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "xbian", "params": {"directory":"'"$TR_TORRENT_DIR"'/"}}' "http://localhost:8080/jsonrpc"
  • give the file execution permission: sudo chmod +x /etc/transmission/xbmc-upd.sh

-STEP 6-. TEST FLEXGET AND SCHEDULE IT
test Flexget

  • Now go back to Putty (windows) or Terminal). I assume you exited Xbian-Config. Run this command to test Flexget. Nothing will actually be saved or downloaded.
    flexget -c /media/usb0/Downloads/flexget/config.yml --test

If your config.yml is correct, it will show its progress and take a few minutes to finish. If your config.yml is incorrect you will get to see an explanation what went wrong. Use --check if you simply want to check if your config.yml contains typos.

Schedule Flexget

  • If nothing went wrong, you can now go ahead and schedule Flexget. I choose to schedule it every 3 hours starting at 3 AM since I live Europe and between 2-6 AM most US tv shows from the previous evening become available.
    Run this command:[/size]
    crontab -e
  • Now scroll all the way down and copy paste this line, then hit CTRL+O to save it and CTRL+X to close it.
    0 3,6,9,12,15 * * * nice -n 4 /usr/local/bin/flexget -c /media/usb0/Downloads/flexget/config.yml --cron

This will run Flexget every three hours starting at 3AM and last one at 15AM. Sometimes, a newer version of an episode is released later because the first release had errors (like audio not in sync with video etc).


OPTIONAL STEPS
Sync watch status with Trakt

reason: as backup and if you have multiple TVs/devices with XBMC. Make sure you install the Trakt.tv addon for XBMC! This way, you keep a backup of what you already watched. If anything ever destroys your RPi, you still have the watched status backed up when you install XBMC again (on the RPi or different device). Also, after a movie has been downloaded and you have watched it in XBMC, it will be removed from the Trakt Watchlist.

Sources
Add your sources! Go to Videos and choose Add Source. Go to ROOT, then media>usb>TV Shows and select this folder. Then select This folder contains TV Shows and save it. Do the same for Movies but select it contains Movies.

Access your Raspberry when you are not at home
Handy if you don't want to remember your IP address and do want remote access. For instance to check status of your torrents. Add a torrent while you are still at work or reboot the RPi when your wife broke it. Update IP address to domain service

Run from USB drive instead of SD card (Your Raspberry could run faster)
Many people report they can run XBian much faster when running it via USB harddrive or USB stick. Especially since you could then overclock the RPi to the highest CPU frequency without causing instability. For me it runs fast already on a ICIDU 4GB class 10 SD card. If you want to switch to USB follow this guide:
easy how to: http://www.ifc0nfig.com/running-xbian-f ... ard-drive/
And this topic for support: http://forum.xbian.org/thread-427.html

Create a static mount
See my pastebin. Not necessary on XBian, your first connected usb drive will always be /media/usb0 and /media/LABELOFYOURDRIVE.

Enjoy!
Any questions related to the guide and the whole setup, just ask!
Help or problems with flexget: http://flexget.com/report
Questions about quality settings: http://flexget.com/wiki/Plugins
Help or problems with XBMC: http://wiki.xbmc.org/
Help or problems with XBian: http://forum.xbian.org/
Last edited by zilexa on Mon Nov 25, 2013 8:14 pm, edited 84 times in total.
Posts: 43
Joined: Mon Apr 08, 2013 12:31 pm
by troyk » Mon Jun 17, 2013 10:51 am
Very interesting topic and well written.

I will delve into this later this week, will need to buy a new raspberry for this ;)
Posts: 13
Joined: Thu May 02, 2013 8:42 am
by zilexa » Mon Jun 17, 2013 1:13 pm
I will update this guide very soon with:
- new version of the config.yml for Flexget with full support for automating the movies. I already explained you should add them to your watchlist on Trakt (not a custom list) but with the current Flexget config, nothing will happen. I am still learning and figuring out Flexget. The new config is finished but I have to test it and I have 2 questions about it posted in the Flexget support section.

- The TV Show part is fully working XBMC library is not automatically updated after a download finished, the libraryupdater.sh script will be updated so it will work correctly.

It's #$*(&# amazing this is working as smooth and I am sure I will be able to get movies working just as smooth since there are people using it already for this.
Posts: 43
Joined: Mon Apr 08, 2013 12:31 pm
by troyk » Wed Jun 19, 2013 8:25 am
so, tell me about your progress so far.

I got some questions:
- How are the maximium download speeds? Pi isn't to happy when downloading (to USB HD) with higher speeds (4,5 MB / s and up)?
- With all the added software, can i still play 1080p fluidly?
- Torrents don't always include the necersary naming conventions, how does your software pick up the right episodes?
- Did you overlock your Pi for better performance?

Can you show a video of the system running?

Thanks.
Posts: 13
Joined: Thu May 02, 2013 8:42 am
by zilexa » Thu Jun 20, 2013 8:58 am
I just updated the flexget config, check the updated guide above. Now it will download movies you added to Trakt Watchlist if a bluray quality version of at least 720p is available (will prefer 1080p) and the size is at least 4GB (might need to change this to 2GB since a lot of older movies are simply not available in high quality, if you check the config, all the way down it says "max 20000 and min 4000" you can change this.
It will check the Trakt movie name with IMDB to gather extra data used to search for the correct torrent. It will only search for bluray, no cam or screener or whatever. If you do want lower quality, you can change this yourself easily. Check Flexget wiki: http://flexget.com/wiki/Plugins/quality

Make sure you run Flexget manually first time after you change/update your config.yml! So run this command via Putty or Mac os Terminal:
Test your config.yml for type errors (only if you changed anything to my file manually):
flexget -c /media/usb/Downloads/flexget/config.yml --check

Test, dont actually download anything:
flexget -c /media/usb/Downloads/flexget/config.yml --test

Run:
flexget -c /media/usb/Downloads/flexget/config.yml

After first manual run, you can be absolutely sure the scheduled runs will go fine.

troyk wrote:so, tell me about your progress so far.

I got some questions:
- How are the maximium download speeds? Pi isn't to happy when downloading (to USB HD) with higher speeds (4,5 MB / s and up)?
- With all the added software, can i still play 1080p fluidly?
- Torrents don't always include the necersary naming conventions, how does your software pick up the right episodes?
- Did you overlock your Pi for better performance?

Can you show a video of the system running?

Thanks.


you can still playback everything, nothing changes. Remember you are not installing software that will be running constantly. Flexget only runs every 3 hours at night, not during day. Transmission is a very, very light process when it doesn't download.

Recommended download speed if running XBMC simultaneously is 400KB/s but I have set mine to 800KB/s since I use the priority management setting (also in the guide). I don't need higher speeds since it downloads automatically.. by the time I want to watch something, most or all downloads are long finished. Therefore I really don't care about download speeds.
You could easily go to 2.2MB/s btw.. the priority management should handle it. This is not just CPU priority, also I/O priority (and thats more important in this case).

Naming conventions? Uhmm, this guide assumes you use XBian or similar. So that means: XBMC!
XBMC will scrape your content just fine. I have never ever renamed a file and everyone who does rename their files is crazy, seriously. I rarely check the actual files itself, I'm always in XBMC and it shows the pretty names with all the fancy fanart and background info.
Only for movies you sometimes need to manually force a 2nd scan and add the release year to the search. Happened to me once this year.

Renaming stuff is really a habit from very old days and is a complete waste of time in my opinion.

XBian has its own moderate overclock by default. I didn't change anything.
Posts: 43
Joined: Mon Apr 08, 2013 12:31 pm
by dairon » Thu Jun 20, 2013 10:23 pm
Hi there,

I don't know how but when i add a tv show folder where a bunch of episodes (not within extra folders) are within to xbmc and use tvdb as scraper it does not find any of the shows.... the format is standard torrent convention like name.S01E03.<anything else>

could you please tell me how you're doing it without file renaming because this is more work than i want to invest in a fully automated media center =)

thanks and cheers,
dai
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm
by zilexa » Fri Jun 21, 2013 7:40 am
I think that is more a XBMC question. For me, the layout of my drive is like this:

\TV Shows\How I Met Your Mother\S05\...
\TV Shows\Bones\S04\
\TV Shows\Falling Skies\S03\

Just an example. You don't even need a subfolder per season. And the folder TV Shows is added as "TV SHOW" source to XBMC. Never had issues. But I read about stuff going wrong when you have two dots at the end of the filename: bones.s04e14.hdtv-lol..mkv because it will not be scanned.

If you have issues with scraper not scanning or recognizing your tv shows you should really ask it in the XBMC fora because it is basic functionality and should work correctly, I don't modify anything in XBMC.
This guide is purely intended to automatically *GET* the content, be able to control what you want in a user-friendly way (trakt.tv) and trigger an XBMC update.
Posts: 43
Joined: Mon Apr 08, 2013 12:31 pm
by troyk » Fri Jun 21, 2013 7:50 am
dairon wrote:Hi there,

I don't know how but when i add a tv show folder where a bunch of episodes (not within extra folders) are within to xbmc and use tvdb as scraper it does not find any of the shows.... the format is standard torrent convention like name.S01E03.<anything else>

could you please tell me how you're doing it without file renaming because this is more work than i want to invest in a fully automated media center =)

thanks and cheers,
dai


Please note that you need to deselect 'Folder only contains one TV-show' for your main TV-series source. If that doesn't work you can choose to remove your Video database file. It's located (Win 7) here: %appdata%\XBMC\userdata\ . It's a DB file called MyVideoXX.db .
Posts: 13
Joined: Thu May 02, 2013 8:42 am
by dairon » Fri Jun 21, 2013 4:44 pm
hi guys, thanks for your answeres. i did uncheck the option 'Folder only contains one TV-show' from the beginning so thats not the issue.

do you move the files in their corresponding folders or how does this take place?
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm
by munificent » Sun Jun 23, 2013 10:03 pm
Hi there,

I have been following your guide closely, making only some minor changes to the directory structure since I am not using a USB drive but am going to connect via NFS shares to my FreeNAS box for the storage. So, with that in mind, I am having trouble with getting flexget to read the config file. I have copied it across using Cyberduck and made the correct edits in the correct places. But when I try to execute the test command I get these errors:

xbian@xbian ~ $ flexget -c /media/downloads/flexget/config.yml --test
2013-06-23 22:45 INFO manager Tried to read from: /media/downloads/flexget/config.yml
2013-06-23 22:45 CRITICAL main Failed to find configuration file /media/downloads/flexget/config.yml
2013-06-23 22:45 INFO manager Tried to read from: /media/downloads/flexget/config.yml
2013-06-23 22:45 CRITICAL main Failed to find configuration file /media/downloads/flexget/config.yml

Here is where it gets a bit weird. If I navigate to the folder line by line, there is the file:

xbian@xbian ~ $ ls
downloads incomplete media torrents
xbian@xbian ~ $ cd media
xbian@xbian ~/media $ ls
downloads movies tv
xbian@xbian ~/media $ cd downloads
xbian@xbian ~/media/downloads $ ls
flexget incomplete libraryupdater.sh torrents
xbian@xbian ~/media/downloads $ cd flexget
xbian@xbian ~/media/downloads/flexget $ ls
config.yml

But if I try and go straight there, it tells me it can't find it:

xbian@xbian ~ $ ls /media/downloads/flexget
ls: cannot access /media/downloads/flexget: No such file or directory
xbian@xbian ~ $

NB - At the moment, all these files are local to the Pi. I have not yet 'hooked in' the NFS shares. It just can't find them locally unless it goes step by step. Also, if I do go step by step to the flexget directory and then run the command locally, it *still* won't be able to find it, even though it can open it in nano!

I am at a loss as to what to do now :-/
Posts: 2
Joined: Sun Jun 23, 2013 9:49 pm
by kornic » Tue Jun 25, 2013 7:42 am
munificent wrote:Hi there,

I have been following your guide closely, making only some minor changes to the directory structure since I am not using a USB drive but am going to connect via NFS shares to my FreeNAS box for the storage. So, with that in mind, I am having trouble with getting flexget to read the config file. I have copied it across using Cyberduck and made the correct edits in the correct places. But when I try to execute the test command I get these errors:

xbian@xbian ~ $ flexget -c /media/downloads/flexget/config.yml --test
2013-06-23 22:45 INFO manager Tried to read from: /media/downloads/flexget/config.yml
2013-06-23 22:45 CRITICAL main Failed to find configuration file /media/downloads/flexget/config.yml
2013-06-23 22:45 INFO manager Tried to read from: /media/downloads/flexget/config.yml
2013-06-23 22:45 CRITICAL main Failed to find configuration file /media/downloads/flexget/config.yml

Here is where it gets a bit weird. If I navigate to the folder line by line, there is the file:

xbian@xbian ~ $ ls
downloads incomplete media torrents
xbian@xbian ~ $ cd media
xbian@xbian ~/media $ ls
downloads movies tv
xbian@xbian ~/media $ cd downloads
xbian@xbian ~/media/downloads $ ls
flexget incomplete libraryupdater.sh torrents
xbian@xbian ~/media/downloads $ cd flexget
xbian@xbian ~/media/downloads/flexget $ ls
config.yml

But if I try and go straight there, it tells me it can't find it:

xbian@xbian ~ $ ls /media/downloads/flexget
ls: cannot access /media/downloads/flexget: No such file or directory
xbian@xbian ~ $

NB - At the moment, all these files are local to the Pi. I have not yet 'hooked in' the NFS shares. It just can't find them locally unless it goes step by step. Also, if I do go step by step to the flexget directory and then run the command locally, it *still* won't be able to find it, even though it can open it in nano!

I am at a loss as to what to do now :-/


Hi, just a guess, you might have created the file directories in your home folder thus the "~"
try

ls ~/media/downloads/flexget

if it is, i suggest creating your directories in the ROOT directory as stated in the guide.
Posts: 2
Joined: Tue Jun 25, 2013 7:37 am
by zilexa » Tue Jun 25, 2013 12:49 pm
Just FYI: new version of XBian is released, it already sets up the priority management so this guide can be trimmed down and will be even easier! will update later.
Posts: 43
Joined: Mon Apr 08, 2013 12:31 pm
by munificent » Tue Jun 25, 2013 3:53 pm
Good call kornic, that was the problem. I was going through the guide logged in as a regular xbian user not root. I sorted root passwords, logged in as root, moved the folders and all was well.

Some advice to Windows users like myself. Get Notepad++ for the config file editing. Regular Notepad is not good enough and will not save in UTF8, which Xbian needs to read the files. I figured out that last little hiccup all on my own :-)

Since Xbian has been updated I am going to hold off on the priorities steps for now, so I have not yet seen if this will work, but I am positive about it! Looking forward to the results.
Posts: 2
Joined: Sun Jun 23, 2013 9:49 pm
by kornic » Wed Jun 26, 2013 8:33 am
Is there any suggested format for the USB harddrive?
Posts: 2
Joined: Tue Jun 25, 2013 7:37 am
by Chooch » Sun Jun 30, 2013 7:59 pm
Trying to use a Western Digital 1.0 TB USB hard drive but not seeing it as /media/usb... going to pickup a new hard drive as this one is also tasked with backing up data
The Flexget install is reporting a version but when I go to use Cyberduck and do the configurations as per the instructions, Flexget is no where to be found...
I love this concept but I have very little Linux experience and this is very frustrating. Hoping to cut the cord from my cable provider with this solution. I will be back once I get some patience.
Posts: 1
Joined: Sun Jun 30, 2013 7:53 pm
by pramod9964 » Wed Jul 03, 2013 8:36 am
Hi

am a noob both in linux and pi

STEP C. CREATE NECESSARY FOLDERS
I assume you just exited Xbian-Config and I assume you connected your USB harddrive already, if not, you can do it know and wait 30sec before continuing. Your USB harddrive will then be accessible via media/usb.

Run these commands one by one (I highly recommend copy/pasting them to Putty or Terminal, hit Enter after each one to execute it)
mkdir '/media/usb/TV Shows'
mkdir /media/usb/Movies
mkdir /media/usb/Downloads
mkdir /media/usb/Downloads/incomplete
mkdir /media/usb/Downloads/torrents
mkdir /media/usb/Downloads/flexget

This creates the necessary folders. You can also create folders for Pictures and Music if you like, for XBMC.

[*]2. Now run these commands (I highly recommend copy/pasting them to Putty or Terminal, hit Enter after each one to execute it)
rm /home/xbian/downloads
rm /home/xbian/incomplete
rm /home/xbian/torrents
ln -s /media/usb/Downloads /home/xbian/downloads
ln -s /media/usb/Downloads/incomplete /home/xbian/incomplete
ln -s /media/usb/Downloads/torrents /home/xbian/torrents[/list]


Here am facing an issue i have an WD 500 gb harddisk in NTFS file System
whenever i key in these commands i get an error message saying directory not found
what shud i Do
pls help!!
Posts: 11
Joined: Tue Jun 25, 2013 3:50 am
by djvdberg » Thu Jul 04, 2013 8:14 am
Hello,

AWESOME guide, will be trying this out tonight!

Just one questions, how does this handle older stuff? Let's say I add a show to my custom list that finished 2 month ago, will it download it or wait till new shows air?

Thanks!
Dion
Posts: 1
Joined: Thu Jul 04, 2013 8:05 am
by rbellamy » Fri Jul 12, 2013 3:42 am
This: "Your USB harddrive will then be accessible via media/usb."

Maybe should be: "Your USB harddrive will then be accessible via media/<LABEL-UUID>, where LABEL = the label of the drive, and UUID = is the UUID of the drive found with BLKID."
Posts: 2
Joined: Fri Jul 12, 2013 3:39 am
by rbellamy » Sat Jul 13, 2013 12:04 am
How do you prevent non-English downloads for English movies? For instance, a FRENCH copy of an ENGLISH movie?

I found the accept_languages of the flexget imdb plugin, but that would then prevent some of my favorite subbed Anime...
Posts: 2
Joined: Fri Jul 12, 2013 3:39 am
by zilexa » Mon Jul 15, 2013 8:25 am
Just FYI, I will update the first post this week with all your feedback and create a "shortened" version for who uses XBian and an extended version for people that do not (want to) use XBian.

@kornic: recommended is EXT4

@djvdberg: it depends on your rss feeds. Usually they contain only recent stuff. A solution would be to use the same sources as used for movies: the torrentz/kat/tpb plugins. If I have time I will look into this. Currently I just search for the entire season on the biggest metasearcher for torrentz (hint) and add it to Transmission. Just rightclick the added torrent > Set Location... and change the download location to reflect your folders: media/usb/TV Shows/showname/S01 in my case.

@bellamy: I don't know but it should be possible. Please create a Flexget ticket (use Search first) if you want to create your own Flexget config and/or have questions how to make big changes:
http://flexget.com/search
or check configs from A LOT of other users:
http://flexget.com/wiki/Cookbook
Or simply create a new ticket, there are people that can help you. I am not a Flexget config expert yet.
Posts: 43
Joined: Mon Apr 08, 2013 12:31 pm
by Vypr » Thu Jul 18, 2013 12:07 am
HI,
great guide.
After a bit of fiddling I managed to get it working on Raspbmc, only hitting a couple of snags on the way.
STEP B. INSTALL TOOLS
Once you are logged in, you will see a blue menu, the XBian-Config. Go to "Packages" and "net" and simply follow the flow to install both Transmission and Flexget one by one. Simply select and hit enter to install. Especially Flexget takes some time to install. When done, exit the Xbian-Config.
EDIT: I have not finished the Flexget package yet so you need to install it manually. Simply exit Xbian-Config and run these commands one by one. Always choose Yes when it asks to install something:
sudo apt-get install python-pip
sudo pip install flexget
sudo pip install transmissionrpc

Obviously Raspbmc doesn't have Xbian-Config so Transmission has to be added manually by the following commands in an SSH console:
Code: Select all
sudo apt-get install transmission
sudo apt-get install transmission-daemon

Now when I tried this I got an error that rcpbind had to be started first, so the following command may be needed:
Code: Select all
sudo update-rc.d rpcbind defaults
and then reboot and try installing transmission again

2. copy/paste and run this command: sudo nano /usr/local/etc/transmission/settings.json


The transmission configuration settings for transmission-daemon are found in /etc/transmission-daemon/settings.json

Your USB harddrive will then be accessible via media/usb.

On Raspbmc, my external drive was mounted under /media/External so when following any instructions that referenced /media/usb needed to be replaced with /media/external

When editing the config.yml file, I found that the karmorra RSS feee gave me a little trouble. Turned out I was putting my username in the URL instead of the User ID. Easiest way to get your ID (And the full URL) is to go to http://showrss.karmorra.info/, click the Feeds link at the top, then click the Generate button next to the section "Generate your feed address" and the URL you need is the one marked "Full feed with magnets". Just copy and paste that into the config.yml file

next problem in the config.yml file was that Kickass Torrents (kat.ph) is blocked in the UK, however http://kat.torrenticity.com//tv/?rss=1 works just fine instead.

unfortunately I couldn't manage the priorities of Transmission and XBMC as they don't have entries in init.d in Raspbmc
Posts: 55
Joined: Tue Apr 09, 2013 2:02 am
by Robbobin » Thu Jul 18, 2013 12:32 am
I've run into the same issue as pramod, any help on this?

Everytime I attempt any of the commands in section C I get an error, cannot move, no such file or directory.
Posts: 1
Joined: Thu Jul 18, 2013 12:28 am
by zilexa » Thu Jul 18, 2013 12:02 pm
I have just updated the guide!
I also hope it is more readable now, this forum has no options to create a good guide :(

important changes:
- removed the priority stuff, this is pretty complex and since XBian beta 1.1, you don't need to do this, XBian already does it.
- STEP C: Create folder structure --> this should solve all issues you have! (@robbobin & @pramod)
- STEP D: Transmission settings --> now I only show the settings I changed
- some minor changes

@robbobin, @pramod, check the rewritten step c (the first part).
If you cannot access your USB harddisk via:
cd /media/usb0
then something is wrong, ask in the XBian forum. I am used to accessing my drive via /media/usb/ so I added this to the guide.

@Vypr
Thanks for sharing your experience with RaspBMC!
For other trying RaspBMC: these are the things to do when using RaspBMC instead of XBian:
- install Transmission manually (check the post from Vypr)
- set priorities, see my guide for a link to a how to
- make sure your usb drive is mounted correctly and permissions are set
Posts: 43
Joined: Mon Apr 08, 2013 12:31 pm
by daveski3 » Sun Jul 21, 2013 2:37 pm
@Zilexa - thanks for this guide, this is exactly what I was looking to do. I've had some problems with xbian so I have switched to raspbmc and hope to get this working with it. Thanks to @Vypr for the update using raspbmc. I still have a few questions:

*regarding the folder structure, how would they be using raspbmc? The folder structures in the guide have 'xbian' in most of them.

*Do you have additional guidance on managing priority. The link takes me to the general Xbian forum and not a specific post. This is pretty new to me so I'm not experienced with this.

*Do you have any intentions on creating a guide specific to raspbmc?

Again, thanks again for the sharing this, I hope I can get it working.
Dave
Posts: 1
Joined: Sat Jul 20, 2013 7:48 pm
by Vypr » Sun Jul 21, 2013 8:36 pm
@Daveski3

Whn you see a reference to 'home/xbian' just replace it with 'home/pi'

Also, I did encounter a permissions problem with Transmission, possibly because my external drive is formatted with NTFS rather than ext3 or ext4
To get round this I had to change the Transmission user from 'debian-transmission' to 'Pi' to allow it to read and write to the external drive.
to do this, type
Code: Select all
sudo nano /etc/init.d/transmission-daemon


look for the line
Code: Select all
USER=debian-transmission

and change it to
Code: Select all
USER=pi

then CTRL-X to save it

then type the following lines to change the ownership on the transmission files so they can be read.
Code: Select all
sudo chown -R $USER /var/lib/transmission-daemon/info/
sudo chown -R $USER /etc/transmission-daemon/


This should sort out any problems.
You can check the state of the downloads by going to your browser and entering the following address:
http://<you-pi-ip address>:9091
your username and password are whatever you set in the settings.json file.

As a furher issue I found, cron jobs are disabled by default in Raspbmc, to re-enable them, in XBMC, go to programs>Raspbmc Settings>Server Settings and enable the cronjob scheduler.
After doing this I dound the following errors in the flexget log :
WARNING cron_env Your cron environment has different filesystem encoding (UTF-8) compared to your terminal environment

|To resolve this, you need to enter the following as the first line in crontab -e:
Code: Select all
LANG=en_US.utf8


I can't say yet if this all works so far, form the flexget log it has rejected a load of downloads for being too small (I reduced the minimum size from 4gb to 800Mb, it should still get decent quality stuff and still avoid the nasty CAM and TS copies)
Posts: 55
Joined: Tue Apr 09, 2013 2:02 am