Closed GoogleCodeExporter closed 9 years ago
Well, i tried to make this an "Enhancement", but where can i do that?
Original comment by widodh@gmail.com
on 5 Jan 2009 at 11:55
+1 for shutdown PC command - now if only Sony would let me WOL it!
Original comment by g.campb...@aip.org.au
on 6 Jan 2009 at 8:03
Issue 129 has been merged into this issue.
Original comment by ps3mediaserver@gmail.com
on 10 Jan 2009 at 12:29
Original comment by robinmul...@gmail.com
on 12 Jan 2009 at 11:16
u actually can WOL PS3 using remote play....
Original comment by kulikow...@gmail.com
on 17 Jan 2009 at 10:27
I've written about this on the mailing list:
Shutting down your pc is easy, but depends on your OS: for windows it's the
command
"shutdown /s"
If you do Start -> Run -> "shutdown /s" and press OK, your computer will
shutdown.
This is also easy to do in Java (the language PMS is written in):
Runtime.getRuntime().exec("shutdown /s /t 60");
I've added these lines in the "addVideoSettingssFolder()" function in the
PMS.java
file on my computer:
vf.addChild(new VirtualVideoAction("Remote Shutdown", true) {
public boolean enable() {
try {
Runtime.getRuntime().exec("shutdown /s");
} catch (IOException e) {
e.printStackTrace();
}
return true;
}
});
This adds another function in the "VideoSettings" folder, which shuts down the
pc.
(should logically be put somewhere else and needs a check for OS, linux has
'poweroff' for example, but usually needs SU, not sure about mac)
Possible improvements here are:
- Make it work on linux and mac too (check which OS, issue appropriate command)
- Maybe think about where this is best situated, VideoSettings might not be the
best
place.
Original comment by johannes...@gmail.com
on 19 Jan 2009 at 9:50
lol nice one johannes :) can u post compiled pms.class (with "shutdown /p") ??
:D:D:D
Original comment by kulikow...@gmail.com
on 19 Jan 2009 at 11:08
make it whole jar :P
Original comment by kulikow...@gmail.com
on 19 Jan 2009 at 11:37
Nvm. Thx Johannes. It works great :D
Original comment by kulikow...@gmail.com
on 21 Jan 2009 at 12:01
Sorry about being a newbie, but I would like to know were I can find that
PMS.java
file in my computer...
Thank you in advance!
Original comment by dvallin...@gmail.com
on 21 Jan 2009 at 10:37
This only works if you download the source, edit it and then compile and run
that.
(sorry!)
It's a bit tough explaining how to do that if you have never programmed before
and
providing .class or .jar files isn't polite in regards to the developer(s?)
here.
This is merely a suggestion for the developer of this software, maybe it will
show up
in the next version? Maybe post in the forum thread about this
(http://ps3mediaserver.org/forum/viewtopic.php?f=4&t=37) to get them to add it.
Original comment by johannes...@gmail.com
on 21 Jan 2009 at 10:45
Waou, I'm impressed by the speed of your reply!
Thanks but indeed I have ,ever programmed and I do not need that feature so
desperately to start now!
However I do believe it would be useful so I'll post in the thread you
mentioned!
Original comment by dvallin...@gmail.com
on 21 Jan 2009 at 10:49
dvallindas, u can also star this issue if u havent done this already :)
Original comment by kulikow...@gmail.com
on 21 Jan 2009 at 11:05
I have just been playing with the code...and I made my version of Custom
Commands :P lol
first I used the code form johannes and adjusted it a little:
vf.addChild(new VirtualVideoAction("Custom Command", true) {
public boolean enable() {
try {
Runtime.getRuntime().exec(PMS.getConfiguration().getCmd());
} catch (IOException e) {
e.printStackTrace();
}
return true;
}
});
Then I added a set and get function in PmsConfiguration.java like this:
public String getCmd() {
return getString(KEY_CMD, "cmd");
}
public void setCmd(String value) {
configuration.setProperty(KEY_CMD, value);
}
u must also define String KEY_CMD in PmsConfiguration ie like this:
private static final String KEY_CMD = "custom command";
finally I needed to add a text field to GUI so I adjusted FoldTab.java like
this:
private JTextField cmd;
and then in build() function...
cmd = new JTextField("" + configuration.getCmd());
cmd.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {}
public void keyTyped(KeyEvent e) {}
public void keyReleased(KeyEvent e) {
configuration.setCmd(cmd.getText());
}
});
builder.addLabel("Command Line:", cc.xyw(1, 16, 3));
builder.add(cmd, cc.xy(4, 16));
I hope we'll see something like that or better in the upcomming releases ;)
ps u can also add multiple commands in one line using cmd /c and &-sign for
example
if u want to open windows explorer and calculator u then type "cmd /c calc &
explorer"
Original comment by kulikow...@gmail.com
on 26 Jan 2009 at 1:43
I forgot to add what this gui code will do...it will add a text field in
Navigation/Share Settings under "Hide transcodeing engine names" called "Command
Line:" where u can enter any command(s) that will be executed when u select
Custom
Command option from Video Settings in XMB
Original comment by kulikow...@gmail.com
on 26 Jan 2009 at 1:49
New position for command line input field is:
builder.addLabel("Command Line:", cc.xyw(1, 22, 3));
builder.add(cmd, cc.xy(4, 22));
Original comment by kulikow...@gmail.com
on 26 Feb 2009 at 4:07
So I made a patch file that add this whole custom command code to revision 294
Original comment by kulikow...@gmail.com
on 26 Feb 2009 at 4:15
Attachments:
Hi johannes.bertens my English is very Bad and I a komplett dummy of Java
Programming because my dream is the shoutdown funktion of the Pc over the Ps3 ,
can
you Send me your Complett modifikation Programm ??? Please , I Know other way
Please Send to dmuch66@gmx.net or per MSN dmuch66@hotmail.com very
thanks
Original comment by SM...@gmx.de
on 9 Mar 2009 at 6:29
[deleted comment]
[deleted comment]
Use TortoiseSVN to patch the code.
Original comment by kulikow...@gmail.com
on 10 Mar 2009 at 5:57
thank you kulikowski
Original comment by i585...@gmail.com
on 10 Mar 2009 at 6:20
[deleted comment]
Please use forum for this kind of questions, not here;-)
Original comment by ExSportCZ@gmail.com
on 10 Mar 2009 at 8:05
[deleted comment]
patched
Original comment by ala...@gmail.com
on 12 Mar 2009 at 4:45
Attachments:
[deleted comment]
Post it to the forum, I think that more people will read your question than
here.
Also definetely this place is not for asking but posting bugs etc.
That's all what I wanted to say. Better chance is checking forum and asking
there.
For applying patch use TortoiseSVN...more in forum
Original comment by ExSportCZ@gmail.com
on 12 Mar 2009 at 8:38
[deleted comment]
[deleted comment]
Issue 598 has been merged into this issue.
Original comment by chocol...@cpan.org
on 24 May 2011 at 2:07
Issue 1110 has been merged into this issue.
Original comment by chocol...@cpan.org
on 2 Jul 2011 at 1:55
If someone is doing this.. it would be nice if you can set several custom
commands.
I'd like some that changes PMS configuration files.. and thereby be able to
switch between settings from the XMB (by restarting PMS with new config).
I'd might like to 4-5 different settings.. so mulitple commands +1
Original comment by jakobste...@gmail.com
on 2 Jul 2011 at 2:58
Issue 1132 has been merged into this issue.
Original comment by chocol...@cpan.org
on 13 Jul 2011 at 10:49
Closing as this won't be done in core and is easy to do with a new or existing
plugin:
http://www.ps3mediaserver.org/forum/viewtopic.php?f=12&t=13923&p=66920#p66920
http://www.ps3mediaserver.org/forum/viewtopic.php?f=12&t=12518
Original comment by chocol...@cpan.org
on 25 Mar 2012 at 5:59
Original issue reported on code.google.com by
widodh@gmail.com
on 5 Jan 2009 at 11:53