Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Idea: Pause download package when video is playing.
3rd Mar, 2013, 06:26 AM
Post: #18
Trinket Offline
Registered
Posts: 40
Joined: Jan 2013
Reputation: 9
RE: Pause download package when video is playing.
I will try to explain it the best I can!
Here is the folder with all the files needed in it https://www.dropbox.com/sh/jrxem38vzn8aybq/3-Ws7QcygB?m
the folder where you store those files should be named service.procmanager and must be storen in:
/home/xbian/.xbmc/addons/
Make sure all is set to be executable and that only root can write the files (especially the ones inside Resources).
In order for it to work you must start all the processes related to downloads as a group named "download" (you must create it) that's easily done if you modify the start-stop-daemon inside the init scripts of each process.
These are the steps involved:
You create a new group with:
Terminal
sudo addgroup --system download
Then add users to it with:
Terminal
sudo adduser "username" download
You must add each user that will start downloads to this group.
Then you must edit the init script of each process to run them in this group.
Go to the folder /etc/init.d and modify the init scripts (they are almost all named the same as the program, sickbeard, couchpotato...)
For example this is my start-stop-daemon line for couchpotato:
Code:
start-stop-daemon -N 10 -d $APP_PATH -c $RUN_AS:$GROUP --start --background --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS
The option that you'r searching for is "-c" or "--chuid".
EDIT:Add also GROUP=download where all the other variables are set (or anywhere on the file)

Once you do that, you must allow the files inside resources folder to be executed with privileges without password input.
You do that with the visudo command.
Terminal
sudo visudo
Once there, supossing xbian is the user that starts xbmc, you must add this lines to the end of the file:
Code:
xbian ALL=(ALL) NOPASSWD: /usr/bin/python /home/xbian/.xbmc/addons/service.procmanager/resources/startall.py
xbian ALL=(ALL) NOPASSWD: /usr/bin/python /home/xbian/.xbmc/addons/service.procmanager/resources/stopall.py
If you have any problem just tell me and I will try to be more detailed. Maybe you have problems with the init scripts not using the start-stop-daemon, if so just ask me and i can upload mine's.
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Messages In This Thread
Pause download package when video is playing. - Trinket - 31st Jan, 2013, 10:46 PM
RE: Pause download package when video is playing. - belese - 1st Feb, 2013, 06:31 PM
RE: Pause download package when video is playing. - Trinket - 2nd Feb, 2013, 01:12 AM
RE: Pause download package when video is playing. - belese - 2nd Feb, 2013, 02:07 AM
RE: Pause download package when video is playing. - Trinket - 2nd Feb, 2013, 11:47 AM
RE: Pause download package when video is playing. - Trinket - 3rd Feb, 2013, 10:40 AM
RE: Pause download package when video is playing. - belese - 3rd Feb, 2013, 07:44 PM
RE: Pause download package when video is playing. - BartOtten - 4th Feb, 2013, 04:31 AM
RE: Pause download package when video is playing. - Trinket - 4th Feb, 2013, 04:40 AM
RE: Pause download package when video is playing. - belese - 4th Feb, 2013, 06:31 AM
RE: Pause download package when video is playing. - Trinket - 4th Feb, 2013, 09:19 AM
RE: Pause download package when video is playing. - belese - 4th Feb, 2013, 09:46 PM
RE: Pause download package when video is playing. - BartOtten - 5th Feb, 2013, 11:28 AM
RE: Pause download package when video is playing. - belese - 5th Feb, 2013, 09:24 PM
RE: Pause download package when video is playing. - Trinket - 6th Feb, 2013, 05:48 AM
RE: Pause download package when video is playing. - SolGarlic - 3rd Mar, 2013, 12:52 AM
RE: Pause download package when video is playing. - adepssimius - 8th Feb, 2013, 02:26 AM
RE: Pause download package when video is playing. - Trinket - 3rd Mar, 2013 06:26 AM
RE: Pause download package when video is playing. - SolGarlic - 3rd Mar, 2013, 07:23 AM
RE: Pause download package when video is playing. - CurlyMo - 3rd Mar, 2013, 07:29 AM
RE: Pause download package when video is playing. - Trinket - 3rd Mar, 2013, 08:12 PM
RE: Pause download package when video is playing. - SolGarlic - 3rd Mar, 2013, 08:23 PM
RE: Pause download package when video is playing. - Trinket - 4th Mar, 2013, 04:43 AM
RE: Pause download package when video is playing. - SolGarlic - 4th Mar, 2013, 07:32 AM
RE: Pause download package when video is playing. - Trinket - 4th Mar, 2013, 07:51 AM
RE: Pause download package when video is playing. - SolGarlic - 4th Mar, 2013, 10:14 AM
RE: Pause download package when video is playing. - Trinket - 4th Mar, 2013, 10:23 AM
Re: Pause download package when video is playing. - min - 19th Mar, 2013, 04:09 AM
RE: Pause download package when video is playing. - Trinket - 20th Mar, 2013, 06:11 AM
Re: Pause download package when video is playing. - min - 21st Mar, 2013, 02:03 AM
RE: Pause download package when video is playing. - Trinket - 21st Mar, 2013, 08:59 AM
RE: Pause download package when video is playing. - gizag - 25th Mar, 2013, 07:58 PM
RE: Pause download package when video is playing. - CurlyMo - 25th Mar, 2013, 08:19 PM
RE: Pause download package when video is playing. - Trinket - 25th Mar, 2013, 10:22 PM
RE: Pause download package when video is playing. - gizag - 25th Mar, 2013, 10:43 PM
RE: Pause download package when video is playing. - zilexa - 26th Mar, 2013, 08:01 AM
RE: Pause download package when video is playing. - CurlyMo - 26th Mar, 2013, 08:10 AM
RE: Pause download package when video is playing. - cjvanzwol - 5th Oct, 2013, 08:35 PM
RE: Pause download package when video is playing. - Trinket - 5th Oct, 2013, 09:14 PM
RE: Pause download package when video is playing. - cjvanzwol - 6th Oct, 2013, 01:49 AM
RE: Pause download package when video is playing. - adepssimius - 6th Oct, 2013, 04:55 AM
RE: Pause download package when video is playing. - cjvanzwol - 7th Oct, 2013, 07:46 AM
RE: Pause download package when video is playing. - Trinket - 8th Oct, 2013, 09:27 PM

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 24th May, 2025, 07:59 PM Powered By MyBB, © 2002-2025 MyBB Group.