Hi,
Can someone tell me why queue finish actions on my Mac are limited to just shutting down SABNZBD? I saw a screenshot tonight (http://sabnzbd.wikidot.com/gui-queue) where shutdown PC and hibernate PC are also options. I like these as well, aspecially shutdown PC. (PPC G5, OSX 10.4.11, Safari 3.2.1)
Thanks, Stephan
Queue finish actions on a Mac
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: Queue finish actions on a Mac
Hi,
I've never use this function, but yes you're right, actions availalbe on queue finish are Shutdown SABnzbd and execute script (if defined).
I can try to see if we can add sleep, hibernate and shutdown PC if you're interested...
I've never use this function, but yes you're right, actions availalbe on queue finish are Shutdown SABnzbd and execute script (if defined).
I can try to see if we can add sleep, hibernate and shutdown PC if you're interested...
Re: Queue finish actions on a Mac
I've found a simple way to shutdown or sleep on queue finish :
I've made 2 scripts one for shutdown and and to sleep.
Mac-Sleep
Mac-Shutdown
Scripts are attached to this post (rename to zip).
Copy these scripts in a folder for exemple Scripts (in your home folder)
Go to SABnzbd Folders config page and write "Scripts" in the "User Folders / Folder Containing the User Scripts" field and save config.
Now you should be able to select actions.
If you edit files by yourself don't forget to make these 2 files executables :
Hope it helps.
PS : I've not tested theses scripts on 10.4 but it should work.
I've made 2 scripts one for shutdown and and to sleep.
Mac-Sleep
Code: Select all
#!/usr/bin/python
import subprocess
subprocess.call(['osascript', '-e','tell app "System Events" to sleep'])
Code: Select all
#!/usr/bin/python
import subprocess
subprocess.call(['osascript', '-e','tell app "System Events" to shut down'])
Copy these scripts in a folder for exemple Scripts (in your home folder)
Go to SABnzbd Folders config page and write "Scripts" in the "User Folders / Folder Containing the User Scripts" field and save config.
Now you should be able to select actions.
If you edit files by yourself don't forget to make these 2 files executables :
Code: Select all
chmod +x ~/Scripts/Mac-Sleep
chmod +x ~/Scripts/Mac-Shutdown
PS : I've not tested theses scripts on 10.4 but it should work.
Re: Queue finish actions on a Mac
(first of all, im sorry for my very bad english...it's not my native language)
hey rAf,
thanks so far. But i've gt some problems doin this:
I've downloaded the scripts (by the way, what part do i have to rename to zip?) - a folder with the name "script" was created including two files (Mac-Sleep & Mac-Shutdown)...without renaming anything?!
I entered the folder name in the config page and i was able to select the two files in my "on qeue finish" dropdown menue.
So far so good
But, it doesn't work...the queue was empty, all the post-processing was done, but the Mac didn't shutdown. Don't know why?!
What about the part, making the files executable? How and where do i have to do this?
Thanks in advance
janes
btw: using Mac OSX 10.5 an SAB 0.4.6...
hey rAf,
thanks so far. But i've gt some problems doin this:
I've downloaded the scripts (by the way, what part do i have to rename to zip?) - a folder with the name "script" was created including two files (Mac-Sleep & Mac-Shutdown)...without renaming anything?!
I entered the folder name in the config page and i was able to select the two files in my "on qeue finish" dropdown menue.
So far so good
But, it doesn't work...the queue was empty, all the post-processing was done, but the Mac didn't shutdown. Don't know why?!
What about the part, making the files executable? How and where do i have to do this?
Thanks in advance
janes
btw: using Mac OSX 10.5 an SAB 0.4.6...
Re: Queue finish actions on a Mac
rAf, cannot you just implement it in SABnzbd itself?
Else, tell me which system calls to use and I'll implement it.
Else, tell me which system calls to use and I'll implement it.
Re: Queue finish actions on a Mac
shypike,
To implement sleep the system call is :
to shutdown :
I've look at interfaces, there are some tweaks to do in interfaces also.
It seems that systems call are in __init__.py.
Sorry no time to test further, if you implement it, I can test.
To implement sleep the system call is :
Code: Select all
subprocess.call(['osascript', '-e','tell app "System Events" to sleep'])
Code: Select all
subprocess.call(['osascript', '-e','tell app "System Events" to shut down'])
It seems that systems call are in __init__.py.
Sorry no time to test further, if you implement it, I can test.
Re: Queue finish actions on a Mac
I appreciate the effort, but like other people who tried the scripts don't work on my Mac. I'm very much in favour if this can be included in a future release. Thanks!
Re: Queue finish actions on a Mac
It will be in the coming 0.4.7 release.
Re: Queue finish actions on a Mac
Just check 0.4.7 release. Works great, thanks!
Re: Queue finish actions on a Mac
Shypike,
Can you also give an option for putting SABnzbd to sleep after the current download is done?
Thanks,
b1scu1t
Can you also give an option for putting SABnzbd to sleep after the current download is done?
Thanks,
b1scu1t
Re: Queue finish actions on a Mac
We support shutdown and standby.
I'm not aware of a "sleep" on OSX.
I'm not aware of a "sleep" on OSX.
Re: Queue finish actions on a Mac
I stand corrected, I want my SABnzbd to go standby/pause once it is done with its existing queue of downloads.
Re: Queue finish actions on a Mac
Hello rAf! I tried your script, but there was no effect after the queue finished. (I made them available in the script folder and changed the rights to executable).
Since the post is a long time ago, are there any new developments in this direction?
shypike stressed the efford in this thred, that it will be available in the 0.4.x release, but obviously there were no changes implemented for the mac.
I am now using the beta 0.5.0b6 version and osx 10.6.2.
Please help - Jaffar
Since the post is a long time ago, are there any new developments in this direction?
shypike stressed the efford in this thred, that it will be available in the 0.4.x release, but obviously there were no changes implemented for the mac.
I am now using the beta 0.5.0b6 version and osx 10.6.2.
Please help - Jaffar