pictures of renders

If you have a suggestion for a feature, post it here

pictures of renders

Postby pixelfougb » Sat Dec 04, 2010 2:51 pm

Hi,

Firstly, thank you very much for this great bit of software. However I have
a minor issue.

in the final distrib ,you have a folder for renders configurations , but not a folder for pictures renders.it's very nice no do compil the projet for add nev picture of renders. just put in the folder for pictures.
pixelfougb
 
Posts: 32
Joined: Fri Dec 03, 2010 7:08 pm
Location: France

Re: pictures of renders

Postby SharkHunter » Sun Dec 05, 2010 9:44 am

A quick fix for this problem. If the icon is not found in the built in resources it assumes that the configured RenderIcon value is a ABSOLUTE FULL PATH to the icon.
For example : C:\\Program Files (x86)\\PS3 Media Server\\renderers\\sharkmote_droid.png

Code: Select all
--- old/StatusTab.java   2010-12-05 09:40:24.884725900 +0100
+++ new/StatusTab.java   2010-12-05 09:39:08.393350900 +0100
@@ -20,6 +20,8 @@
 
 import java.awt.Font;
 import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
@@ -29,6 +31,7 @@
 import javax.swing.JProgressBar;
 
 import net.pms.Messages;
+import net.pms.PMS;
 
 import com.jgoodies.forms.builder.PanelBuilder;
 import com.jgoodies.forms.layout.CellConstraints;
@@ -141,6 +144,8 @@
             InputStream is = LooksFrame.class.getResourceAsStream("/resources/images/clients/" + icon);
             if (is == null)
                is = LooksFrame.class.getResourceAsStream("/renderers/" + icon);
+            if(is==null) // assume full path
+               is=new FileInputStream(new File(icon));
             if (is != null)
                bi = ImageIO.read(is); //$NON-NLS-1$
          } catch (IOException e) {
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: pictures of renders

Postby pixelfougb » Tue Dec 07, 2010 8:15 pm

i try your patch . it doesn't work. You use double slash in the line of your image ?
pixelfougb
 
Posts: 32
Joined: Fri Dec 03, 2010 7:08 pm
Location: France

Re: pictures of renders

Postby SharkHunter » Tue Dec 07, 2010 9:03 pm

Yes yo must do that i your conf file
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: pictures of renders

Postby pixelfougb » Wed Dec 08, 2010 9:28 am

hello , when i compil your patch , it didn't work . i have that:


insert.add.libs:
[copy] Copying 4 files to H:\PMS_Builder\build\ps3mediaserver_patched

fix.crlf:

apply.patches:
[echo] Appying patch file H:\PMS_Builder\pms.patches\innot\7.images_renders
.patch
[patch] (Patch is indented 4 spaces.)
[patch] patch: **** malformed patch at line 5: import java.awt.Font;
[patch] can't find file to patch at input line 3
[patch]
[patch] Perhaps you used the wrong -p or --strip option?
[patch] The text leading up to this was:
[patch] --------------------------
[patch] | --- old/StatusTab.java 2010-12-05 09:40:24.884725900 +0100
[patch] | +++ new/StatusTab.java 2010-12-05 09:39:08.393350900 +0100
[patch] --------------------------
[patch] File to patch:
[patch] Skip this patch? [y]
[patch] Skipping patch.
[patch] 'patch' failed with exit code 2
pixelfougb
 
Posts: 32
Joined: Fri Dec 03, 2010 7:08 pm
Location: France

Re: pictures of renders

Postby SharkHunter » Wed Dec 08, 2010 11:16 am

Hmm, there is something fishy here. I'll look into it...
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: pictures of renders

Postby pixelfougb » Wed Dec 08, 2010 12:03 pm

i find it but i don't know how make a patch with the patch.exe ?

the fix:
the first two lignes are:
--- net/pms/newgui/StatusTab.java
+++ net/pms/newgui/StatusTab.java

you must add :
import java.io.File;
import java.io.FileInputStream;
import net.pms.PMS;


in the section :
InputStream is = LooksFrame.class.getResourceAsStream("/resources/images/clients/" + icon);
if (is == null)
is = LooksFrame.class.getResourceAsStream("/renderers/" + icon);
you add
if(is==null) // assume full path
is=new FileInputStream(new File(icon));

and it's ok . I edit directely StausTab.java

i don't know java but i know vb6 ;)
pixelfougb
 
Posts: 32
Joined: Fri Dec 03, 2010 7:08 pm
Location: France

Re: pictures of renders

Postby pixelfougb » Thu Dec 09, 2010 1:42 pm

YES !!! I find how to make file patch . i put the patch with you have the choice of the image of new renderers (ex:C:\\Program Files\\PS3 Media Server\\renderers\\freebox.png for windows)
my first file patch
image_renders.zip
(604 Bytes) Downloaded 126 times


the ideal size of image are h:166 w:200 (format png 24 bits)

thanks SharkHunter for the script
pixelfougb
 
Posts: 32
Joined: Fri Dec 03, 2010 7:08 pm
Location: France

Re: pictures of renders

Postby pixelfougb » Fri Dec 24, 2010 10:45 am

hello , i would like submit the patch fro the next revision of the ps3 media serveur . how i can do it ! :!:

thank for the answer .
pixelfougb
 
Posts: 32
Joined: Fri Dec 03, 2010 7:08 pm
Location: France

Re: pictures of renders

Postby WorldOfHurt » Wed Dec 29, 2010 9:41 pm

I would submit an "issue" on the official source code site with as much details as you can, indicating that it is feature enhancement, NOT a bug.

Make sure your patch works with the latest version from the SVN repo there.

Attach your patch to the ticket so people reading it can try it and vote you up, and at some point the committers might include it!

Good luck ;)
User avatar
WorldOfHurt
 
Posts: 252
Joined: Thu Mar 19, 2009 10:49 pm
Location: Winchester, UK

Next

Return to Feature Suggestions

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests