Forum

Full Version: [SOLVED] get iplayer download
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am having trouble geting the get_iplayer to d/l to my NAS - See my profile for set up details....

I have the nas mounted and can 'cd' and list it in xbian, so I know it's there.

Trouble is that when I initiate a d/l from iplayer it works to the SD card, but not when I add...

--output "/name/of/nas/mount/" - always returns an error for some reason.

I really want to reduce the R/W load on the SD card as much as possible and therefore would like the D'L direct to the NAS.....

Can anyone help?

Skywatch
@Skywatch

can you also try as xbian user
Code:
touch test.file
ls -lah test.file

in the respective target dir?

what is complete list of
Code:
get_iplayer --help

?
Thanks mk01 - it's always simple things that get me!

I tried that touch test.file and got a permission error. So I tried SUDO touch test.file and that worked. I went back a tried again prefixing get_iplayer with sudo and it works! - I have tried so many combinations over the weeks and that's all it was!

Now a question if I may. What is the 'correct' way to auto mount that NAS path at start up? I currently do it manually each time after a restart. I guess it's in the FStab file I need to add something? RC1 still uses this right?

here's the output of fstab...
#
#
#
/dev/mmcblk0p1 /boot xbian rw,nobootwait 0 1
/dev/root / xbian noatime,nobootwait 0 0
/dev/root /home xbian subvol=home/@,noatime,nobootwait 0 0
/dev/root /lib/modules xbian subvol=modules/@,noatime,nobootwait 0 0
none /run/lock tmpfs noauto 0 0
none /run/shm tmpfs noauto 0 0
none /run/user tmpfs noauto 0 0
------

And here is what I get from fdisk -l

--------
sudo fdisk -l
[sudo] password for xbian:

Disk /dev/mmcblk0: 7884 MB, 7884242944 bytes
4 heads, 16 sectors/track, 240608 cylinders, total 15398912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f06a6

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 71679 34816 c W95 FAT32 (LBA)
/dev/mmcblk0p2 71680 14897151 7412736 83 Linux
/dev/mmcblk0p3 14897152 15398911 250880 82 Linux swap / Solari s

But I am unsure how to proceed from here. Will look on the net and see what I can find in the meantime.

thanks a lot!

Skywatch
@Skywatch

you got me confused now as don't know which "issue" you want to follow up...
so let's deal with all.

if you can write to NFS export as root but not as user - then ownership on NAS is 0 and option is no_root_squash (or ownership is XX and option is just root_squash with anongid and anonuid to be XX). change to all_squash. to be able to write with XBian.
sudo can work and can be used for adhoc cases, but longterm will bring you nothing but troubles.

yes, /etc/fstab is still used (as it is still used by linux Smile ). just put a record like:
Code:
IP:/path/to/export                /where/to/mount                nfs               vers=X                        0 0

as you save and exit the folder should be mounted (immediately).
or specially for you, ... go into /net folder. it is empty. but from it open non-existing folder with name as the IP of your NAS - like this:
Code:
cd /net
ls -la
cd IP.OF.MY.NAS
ls -la

....


why you provided fdisk output ?
Hi MK01.

If you think you are confused you should have seen my face when I read that lot! Smile

Still, I realised it wasn't a Xbian issue and more about me not knowing enough linux stuff so I decided not to bother you any more about it except as a last resort.

As it happens, I have now sorted it mounting automatically using cifs, but still have to put 'sudo' in front of the get_iplayer commend or it fails to download. Any idea what might cause that?

Also, since the pi can already 'see' the directories I want to d/l to, why do I need a mount command at startup? Surely it's already there if XBMC can see it, no?

Thanks so much for the response though, it encourages me to look further and try harder...

Skywatch
(10th Apr, 2014 04:04 AM)Skywatch Wrote: [ -> ]1. I decided not to bother you any more about it except as a last resort.

2. As it happens, I have now sorted it mounting automatically using cifs, but still have to put 'sudo' in front of the get_iplayer commend or it fails to download.

3. Also, since the pi can already 'see' the directories I want to d/l to, why do I need a mount command at startup? Surely it's already there if XBMC can see it, no?

1. why ? where else will tell you for free ???

2. fails to save to disk or fails to download? try downloading to /tmp (which has everyone-anykind access allowed)

3. XBMC uses direct access (via libraries) to SMB and NFS. so it can access such shares regardless of system support.
Hi mk01!

Thanks for the reply!

In answer to your items......

1. It's not really a xbian issue and your time is limited and if I can learn another way it gives you more time to the project, I only came back here as a last resort when I couldn't figure it out myself.

2. It fails to download.....here is the message it gives....I have changed the show to 'program name' to make it clear.

INFO: Command exit code 1 (raw code = 256)
WARNING: Failed to stream file /tmp/server/TV Shows/PROGRAM NAME.partial.flv via RTMP
INFO: skipping flashlow2 mode
ERROR: Failed to record 'PROGRAM NAME (b03ynt67)'
xbian@Cinema ~ $

So if I use 'get_iplayer --get programname -o "/tmp/server/TV Shows."
It fails.
If I use 'sudo get_iplayer --get programname -o "/tmp/server/TV Shows/"
It works.

I thought it was a permissions issue on the server, but can't see any issues that might cause this. Xbian user has permission and ownership of the folders.

FYI the share is mounted with the following entry in FSTAB....

//192.168.1.222/Media /tmp/server/ cifs username=admin,password=**********,port=139,netbiosname='test' 0 0

The port and netbios name are required to keep the server happy (without that the web gui slows to a crawl)!

Does that help you to understand my problem and see a way out of this?

Thanks

Skywatch
can you remount the cifs mount with added "forceuid=xbian,forcegid=xbian" ?
And here I was thinking that you'd forgotten all about me! :-P

I am in Spain right now, but will be back in the UK tomorrow if all goes well and will try that then. Thanks for remembering the issue and trying to fix it! - I appreciate it!...

Skywatch
mk01,

Well I added that to fstab and remounted with it in the command manually and it still fails without a sudo prefix....

I am a little slow now after an accident in Spain, but can sit for a while with the PC as my body slowly repairs itself!

I just wish I understood more linux to be able to help more with this.

skywatch
ok, try

file_mode=0,dir_mode=0,nounix

mk

(if still nada, post
Code:
ls -la /tmp/server/TV\ Shows/
ls -la /tmp/server

best with the file,dir modes in fstab - of course share remounted with those params)
HI MK01,

It would not mount with those commands added.

I have a question. the stock xbian-config shows xbian@xbian in the SSH session. Mine is changed to xbian@cinema as I have more than one xbian pi running on the network. So when it mounts the NAS should I be using 'xbian' (the pi user) as the user or 'cinema' (the pi host name)???

I have played a lot with the NAS and the pi but still no luck without a sudo prefix.

Thanks.

skywatch
the forceXXX params are defining local UID so xbian, regardless of hostname ...

give me ssh access. I will look into it.
Hi Mk01,

Thanks for the offer of help, time is precious I know. But for now I will try some more things myself as that way I might learn more! - If I get to a point where I get really stuck I will holler for you to help.

Thank you.

Skywatc
Thanks to MK01 for pointing me in the right direction.

I have now got the situation working, but with a curious question.

I started out with what mk01 suggested and it wouldn't load at boot, so I turned to the web to try and learn more and now have the solution. It's so close to what was suggested, but just different enough to work.

Adding "forceuid=xbian,forcegid=xbian" to /etc/fstab would not work, but remove 'force' from that and "uid=xbian,gid=xbian" works well. As it happens I don't use group policy on the server as I am the only user, so simply adding "uid=xbian" in /etc/fstab was all it took in the end.

So we get.....

//192.168.1.222/Media /tmp/server/ cifs username=admin,password=****,uid=xbian,port=139,netbiosname='test' 0 0

And now the question bit. This addition forces a user id to be 'xbian', right? So how come I can add this to 2 pi's and they both mount correctly? Can you have two users on 2 pi's with the same UID mounted simultaneously? - seems so! - But how does that work?

Skywatch.
Reference URL's