These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

Web_PVR working spot on, but command line PVR acting up?

user-562

Hi there,

I've installed get_iplayer on my raspberry pi/Xbian box. It has a usb hard drive attached. The installation went fine, I successfully configured the web-pvr interface to be accessible within the home network, and directed the downloads toa folder on the local usb hard drive.

Everything works as long as it is done from the web-pvr interface, either locally or through another computer on the network. PVR searches are listed in the web interface, download and play fine.

BUT: when I run get_iplayer --pvr from the command line as the standard xbian user, it doesn't list any PVR searches entered through the web interface, and obviously doesn't download anything. Which means that I can't call on the PVR downloading service through CRON, which is annoying.

Could somebody give me pointers as to how to solve this -presumed- user/permission problem? I found two "options" files (one in /home/xbian/.get_iplayer, one in /etc/get_iplayer), I assume there are also two folders for the PVR searches...?

Thanks a lot,
fechter

user-562

...and I think I might have found the solution, which I can leave here for future reference.

I started the web_pvr server throuch rc.local, which obviously (in retrospect) runs the server as root. Which is silly, unsafe & not recommended, especially with the server listening on the local network.

Apart from that it causing the CLI PVR call-up to fail, since that was run as the standard xbian user, and therefor not accessing the PVR searches saved as root.

Problem solved by putting the following into rc.local: su xbian -c "/usr/bin/get_iplayer_web_pvr &"
...which runs the web server as xbian. The PVR command is then run as a cron job, as the xbian user.

Thanks for making me think this through, and a huge thanks for maintaining get_iplayer!
fechter

user-2

Just a confirmation that you did indeed spot the problem. If you're going to share pvr searches between CLI and Web PVR, the best thing is to create them with same user account in both. That's because the pvr searches are by default saved in $HOME/.get_iplayer/pvr for the current user. Technically, you could create a shared location (referenced via
Code:
--profile-dir
) accessible to both root and regular user, but that is a bit fragile. So, if you're launching the web pvr server at boot, you'll want to invoke it as a regular user as above. It generally is a good idea to run the service as a non-root user. As always, make sure the service isn't accessible outside your local network.

These forums are archived

See this post for further info