From: <kro...@us...> - 2011-01-25 20:18:16
|
Revision: 4080 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4080&view=rev Author: kroko_koenig Date: 2011-01-25 20:18:10 +0000 (Tue, 25 Jan 2011) Log Message: ----------- small change to correct special chars Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java 2011-01-25 20:18:10 UTC (rev 4080) @@ -32,16 +32,16 @@ Boolean currentElement = false; String currentValue = null; - public ArrayList<DirItems> DirList = new ArrayList<DirItems>(); + public ArrayList<DirItems> DirList = new ArrayList<DirItems>(); - public static class DirItems - { - public boolean isFolder = false; - public String File= ""; - public Bitmap Picture = null; + public static class DirItems { + public boolean isFolder = false; + public String File = ""; + public Bitmap Picture = null; } + private DirItems currentdirItem; - + /** * Called when tag starts ( example:- <name>AndroidPeople</name> -- <name> ) */ @@ -51,13 +51,20 @@ currentElement = true; currentValue = ""; - if (localName == "Directory") {DirList = new ArrayList<DirItems>(); } - if (localName == "Folder") {currentdirItem = new DirItems(); } - if (localName == "File") {currentdirItem = new DirItems(); } + if (localName == "Directory") { + DirList = new ArrayList<DirItems>(); + } + if (localName == "Folder") { + currentdirItem = new DirItems(); + } + if (localName == "File") { + currentdirItem = new DirItems(); + } } /** - * Called when tag closing ( example:- <name>AndroidPeople</name> -- </name> ) + * Called when tag closing ( example:- <name>AndroidPeople</name> -- </name> + * ) */ @Override public void endElement(String uri, String localName, String qName) @@ -79,15 +86,15 @@ } /** - * Called to get tag characters ( example:- <name>AndroidPeople</name> -- to get - * AndroidPeople Character ) + * Called to get tag characters ( example:- <name>AndroidPeople</name> -- to + * get AndroidPeople Character ) */ @Override public void characters(char[] ch, int start, int length) throws SAXException { if (currentElement) { - currentValue = new String(ch, start, length); - currentElement = false; + String actual = new String(ch, start, length); + currentValue += actual; } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-25 20:18:10 UTC (rev 4080) @@ -59,7 +59,7 @@ } report += "-------------------------------\n\n"; - report += "Remote Version : 24.01 / 21:00\n\n"; + report += "Remote Version : 25.01 / 21:00\n\n"; report += "-------------------------------\n\n"; report += "--------- Device ---------\n\n"; report += "Brand: " + Build.BRAND + "\n"; Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 =================================================================== --- trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-25 20:18:10 UTC (rev 4080) @@ -160,14 +160,14 @@ <Version> <Major>0</Major> <Minor>2</Minor> - <Build>1</Build> + <Build>2</Build> <Revision>0</Revision> </Version> <ExtensionDescription>Control your MediaPortal with yout Android. It can be used as a remote control or doing many other things like music, pictures and video control. Gfx has been done by oddfella and some additional coding is from rolls1400. Have fun.</ExtensionDescription> - <VersionDescription>uses video exentions, tweaked vlc settings</VersionDescription> + <VersionDescription>fixes special chars in links, encoding problem</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation /> <ReleaseDate>2010-12-09T16:17:18.1693243+01:00</ReleaseDate> Modified: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-25 20:18:10 UTC (rev 4080) @@ -31,6 +31,7 @@ using System.IO; using System.Net.Sockets; using System.Web; +using System.Runtime.InteropServices; using MediaPortal.GUI.Library; using MediaPortal.Utils; @@ -49,6 +50,12 @@ [DllImport("USER32.DLL")] public static extern bool SetForegroundWindow(IntPtr hWnd); + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + public static extern int GetShortPathName( + [MarshalAs(UnmanagedType.LPTStr)] string path, + [MarshalAs(UnmanagedType.LPTStr)] StringBuilder shortPath, + int shortPathLength); + private delegate void DoActionHandler(Action action); private delegate void DoFullscreenHandler(); private delegate void DoStartFileHandler(string file); @@ -578,7 +585,10 @@ AndroidServer.logDebug("StreamFile play: " + local); - AndroidServer.vlc.Open(local); + StringBuilder shortPath = new StringBuilder(255); + GetShortPathName(local, shortPath, shortPath.Capacity); + + AndroidServer.vlc.Open(shortPath.ToString()); AndroidServer.vlc.Play(); } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs 2011-01-25 20:18:10 UTC (rev 4080) @@ -37,7 +37,7 @@ try { int bytes = s.Receive(ByteArray, 1024, 0); - string messagefromclient = Encoding.ASCII.GetString(ByteArray); + string messagefromclient = Encoding.UTF7.GetString(ByteArray); clientmessage = (String)messagefromclient; return bytes; } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |