You can subscribe to this list here.
2007 |
Jan
(36) |
Feb
(79) |
Mar
(123) |
Apr
(95) |
May
(119) |
Jun
(172) |
Jul
(124) |
Aug
(100) |
Sep
(83) |
Oct
(52) |
Nov
(97) |
Dec
(87) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(131) |
Feb
(80) |
Mar
(163) |
Apr
(178) |
May
(73) |
Jun
(54) |
Jul
(106) |
Aug
(118) |
Sep
(50) |
Oct
(125) |
Nov
(100) |
Dec
(99) |
2009 |
Jan
(104) |
Feb
(99) |
Mar
(68) |
Apr
(81) |
May
(52) |
Jun
(87) |
Jul
(67) |
Aug
(33) |
Sep
(27) |
Oct
(37) |
Nov
(60) |
Dec
(116) |
2010 |
Jan
(82) |
Feb
(79) |
Mar
(38) |
Apr
(50) |
May
(45) |
Jun
(53) |
Jul
(23) |
Aug
(86) |
Sep
(22) |
Oct
(96) |
Nov
(97) |
Dec
(73) |
2011 |
Jan
(24) |
Feb
(45) |
Mar
(28) |
Apr
(31) |
May
(42) |
Jun
(25) |
Jul
|
Aug
(12) |
Sep
(28) |
Oct
(13) |
Nov
(43) |
Dec
(13) |
2012 |
Jan
(62) |
Feb
(28) |
Mar
(6) |
Apr
(16) |
May
(7) |
Jun
|
Jul
(16) |
Aug
(2) |
Sep
(1) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
2013 |
Jan
(5) |
Feb
|
Mar
(34) |
Apr
(9) |
May
(6) |
Jun
(10) |
Jul
(32) |
Aug
(8) |
Sep
(11) |
Oct
(35) |
Nov
(24) |
Dec
(22) |
2014 |
Jan
(44) |
Feb
(9) |
Mar
(9) |
Apr
(15) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(11) |
Sep
(7) |
Oct
(6) |
Nov
(1) |
Dec
(12) |
2015 |
Jan
(33) |
Feb
(19) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
From: <mca...@us...> - 2010-12-31 11:01:48
|
Revision: 4057 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4057&view=rev Author: mcarter2006 Date: 2010-12-31 11:01:42 +0000 (Fri, 31 Dec 2010) Log Message: ----------- Added logos Sky Atlantic HD.png Sky Atlantic.png Sky Sports HD 4.png Modified Paths: -------------- trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD 1.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD 2.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD 3.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD1.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD2.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD3.png Modified: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD 1.png =================================================================== (Binary files differ) Modified: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD 2.png =================================================================== (Binary files differ) Modified: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD 3.png =================================================================== (Binary files differ) Modified: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD1.png =================================================================== (Binary files differ) Modified: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD2.png =================================================================== (Binary files differ) Modified: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Sports HD3.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mca...@us...> - 2010-12-31 10:13:57
|
Revision: 4056 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4056&view=rev Author: mcarter2006 Date: 2010-12-31 10:13:50 +0000 (Fri, 31 Dec 2010) Log Message: ----------- Added Paths: ----------- trunk/plugins/UKTVThumb/Normal/logos/tv/ARY Digital.png trunk/plugins/UKTVThumb/Normal/logos/tv/Africa Channel.png trunk/plugins/UKTVThumb/Normal/logos/tv/BBC 2 Wales.png trunk/plugins/UKTVThumb/Normal/logos/tv/CCTV.png trunk/plugins/UKTVThumb/Normal/logos/tv/COLORS.png trunk/plugins/UKTVThumb/Normal/logos/tv/Challenge+1.png trunk/plugins/UKTVThumb/Normal/logos/tv/ChatGirl TV2.png trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 1.png trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 2.png trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 3.png trunk/plugins/UKTVThumb/Normal/logos/tv/ComedyCtralX - Copy.png trunk/plugins/UKTVThumb/Normal/logos/tv/ComedyCtrl+1.png trunk/plugins/UKTVThumb/Normal/logos/tv/Cream.png trunk/plugins/UKTVThumb/Normal/logos/tv/Crime+1.png trunk/plugins/UKTVThumb/Normal/logos/tv/Daystar.png trunk/plugins/UKTVThumb/Normal/logos/tv/Dirty Talk.png trunk/plugins/UKTVThumb/Normal/logos/tv/Disha.png trunk/plugins/UKTVThumb/Normal/logos/tv/Diva TV +1.png trunk/plugins/UKTVThumb/Normal/logos/tv/ESPN Classic.png trunk/plugins/UKTVThumb/Normal/logos/tv/Eurosport2 UK.png trunk/plugins/UKTVThumb/Normal/logos/tv/Filth.png trunk/plugins/UKTVThumb/Normal/logos/tv/GEO News.png trunk/plugins/UKTVThumb/Normal/logos/tv/Gay TV.png trunk/plugins/UKTVThumb/Normal/logos/tv/GemCollector.png trunk/plugins/UKTVThumb/Normal/logos/tv/High Street TV.png trunk/plugins/UKTVThumb/Normal/logos/tv/Ideal & More.png trunk/plugins/UKTVThumb/Normal/logos/tv/Jackpot Games.png trunk/plugins/UKTVThumb/Normal/logos/tv/LiverpoolFCTV.png trunk/plugins/UKTVThumb/Normal/logos/tv/MAX.png trunk/plugins/UKTVThumb/Normal/logos/tv/MTV Shows.png trunk/plugins/UKTVThumb/Normal/logos/tv/MTV Trax.png trunk/plugins/UKTVThumb/Normal/logos/tv/MUTV.png trunk/plugins/UKTVThumb/Normal/logos/tv/Madani Chnl.png trunk/plugins/UKTVThumb/Normal/logos/tv/Men and Movies.png trunk/plugins/UKTVThumb/Normal/logos/tv/NDTV 24x7.png trunk/plugins/UKTVThumb/Normal/logos/tv/Nollywood.png trunk/plugins/UKTVThumb/Normal/logos/tv/OceanFinance.png trunk/plugins/UKTVThumb/Normal/logos/tv/Premier Sports.png trunk/plugins/UKTVThumb/Normal/logos/tv/Primetime.png trunk/plugins/UKTVThumb/Normal/logos/tv/Renault TV.png trunk/plugins/UKTVThumb/Normal/logos/tv/Rocks & Co 1.png trunk/plugins/UKTVThumb/Normal/logos/tv/Rocks TV.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sangat.png trunk/plugins/UKTVThumb/Normal/logos/tv/Showcase 2.png trunk/plugins/UKTVThumb/Normal/logos/tv/Showcase.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sikh Channel.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sikh TV.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro (1).png trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro Active.png trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro.png trunk/plugins/UKTVThumb/Normal/logos/tv/jazeerachildren.png trunk/plugins/UKTVThumb/Normal/logos/tv/redhot 40+.png trunk/plugins/UKTVThumb/Normal/logos/tv/redhot TV.png trunk/plugins/UKTVThumb/Normal/logos/tv/redhot amateur.png trunk/plugins/UKTVThumb/Normal/logos/tv/redhot fetish.png trunk/plugins/UKTVThumb/Normal/logos/tv/redhot mums.png Added: trunk/plugins/UKTVThumb/Normal/logos/tv/ARY Digital.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/ARY Digital.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Africa Channel.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Africa Channel.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/BBC 2 Wales.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/BBC 2 Wales.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/CCTV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/CCTV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/COLORS.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/COLORS.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Challenge+1.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Challenge+1.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/ChatGirl TV2.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/ChatGirl TV2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 1.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 1.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 2.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 3.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Climax3 - 3.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/ComedyCtralX - Copy.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/ComedyCtralX - Copy.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/ComedyCtrl+1.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/ComedyCtrl+1.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Cream.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Cream.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Crime+1.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Crime+1.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Daystar.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Daystar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Dirty Talk.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Dirty Talk.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Disha.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Disha.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Diva TV +1.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Diva TV +1.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/ESPN Classic.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/ESPN Classic.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Eurosport2 UK.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Eurosport2 UK.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Filth.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Filth.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/GEO News.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/GEO News.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Gay TV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Gay TV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/GemCollector.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/GemCollector.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/High Street TV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/High Street TV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Ideal & More.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Ideal & More.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Jackpot Games.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Jackpot Games.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/LiverpoolFCTV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/LiverpoolFCTV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/MAX.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/MAX.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/MTV Shows.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/MTV Shows.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/MTV Trax.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/MTV Trax.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/MUTV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/MUTV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Madani Chnl.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Madani Chnl.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Men and Movies.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Men and Movies.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/NDTV 24x7.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/NDTV 24x7.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Nollywood.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Nollywood.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/OceanFinance.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/OceanFinance.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Premier Sports.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Premier Sports.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Primetime.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Primetime.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Renault TV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Renault TV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Rocks & Co 1.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Rocks & Co 1.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Rocks TV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Rocks TV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Sangat.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Sangat.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Showcase 2.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Showcase 2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Showcase.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Showcase.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Sikh Channel.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Sikh Channel.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Sikh TV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Sikh TV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro (1).png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro (1).png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro Active.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro Active.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/Sky Intro.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/jazeerachildren.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/jazeerachildren.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot 40+.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot 40+.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot TV.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot TV.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot amateur.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot amateur.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot fetish.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot fetish.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot mums.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/UKTVThumb/Normal/logos/tv/redhot mums.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2010-12-29 09:01:08
|
Revision: 4055 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4055&view=rev Author: chemelli_sf Date: 2010-12-29 09:00:59 +0000 (Wed, 29 Dec 2010) Log Message: ----------- Updated references for TV3 Blaster plugin Modified Paths: -------------- trunk/plugins/IR Server Suite/MediaPortal Plugins/MediaPortal plugins.sln trunk/plugins/IR Server Suite/MediaPortal Plugins/TVServer plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MediaPortal plugins.sln =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MediaPortal plugins.sln 2010-12-23 16:49:51 UTC (rev 4054) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MediaPortal plugins.sln 2010-12-29 09:00:59 UTC (rev 4055) @@ -47,6 +47,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaPortal.Support", "..\..\..\..\..\mediaportal\trunk\mediaportal\MediaPortal.Support\MediaPortal.Support.csproj", "{BD4A3413-C9F9-4299-BB52-ED45027EE7CC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginBase", "..\..\..\..\..\mediaportal\trunk\TvEngine3\TVLibrary\Plugins\PluginBase\PluginBase.csproj", "{5EE20DC0-B22B-4BDB-828B-8DC5723A1873}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SetupControls", "..\..\..\..\..\mediaportal\trunk\TvEngine3\TVLibrary\SetupControls\SetupControls.csproj", "{A2792D3C-04C1-4A92-9383-A33D59C54D8D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -129,6 +133,14 @@ {BD4A3413-C9F9-4299-BB52-ED45027EE7CC}.Debug|x86.Build.0 = Debug|x86 {BD4A3413-C9F9-4299-BB52-ED45027EE7CC}.Release|x86.ActiveCfg = Release|x86 {BD4A3413-C9F9-4299-BB52-ED45027EE7CC}.Release|x86.Build.0 = Release|x86 + {5EE20DC0-B22B-4BDB-828B-8DC5723A1873}.Debug|x86.ActiveCfg = Debug|x86 + {5EE20DC0-B22B-4BDB-828B-8DC5723A1873}.Debug|x86.Build.0 = Debug|x86 + {5EE20DC0-B22B-4BDB-828B-8DC5723A1873}.Release|x86.ActiveCfg = Release|x86 + {5EE20DC0-B22B-4BDB-828B-8DC5723A1873}.Release|x86.Build.0 = Release|x86 + {A2792D3C-04C1-4A92-9383-A33D59C54D8D}.Debug|x86.ActiveCfg = Debug|x86 + {A2792D3C-04C1-4A92-9383-A33D59C54D8D}.Debug|x86.Build.0 = Debug|x86 + {A2792D3C-04C1-4A92-9383-A33D59C54D8D}.Release|x86.ActiveCfg = Release|x86 + {A2792D3C-04C1-4A92-9383-A33D59C54D8D}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -153,5 +165,7 @@ {106A69D2-670C-4DE5-A81C-A3CD5D3F21EB} = {1F14A9F2-92B5-4126-AA0D-AAB2B9C491CD} {21E04B17-D850-43E7-AAD3-876C0E062BDB} = {1F14A9F2-92B5-4126-AA0D-AAB2B9C491CD} {BD4A3413-C9F9-4299-BB52-ED45027EE7CC} = {1F14A9F2-92B5-4126-AA0D-AAB2B9C491CD} + {5EE20DC0-B22B-4BDB-828B-8DC5723A1873} = {1F14A9F2-92B5-4126-AA0D-AAB2B9C491CD} + {A2792D3C-04C1-4A92-9383-A33D59C54D8D} = {1F14A9F2-92B5-4126-AA0D-AAB2B9C491CD} EndGlobalSection EndGlobal Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TVServer plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TVServer plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj 2010-12-23 16:49:51 UTC (rev 4054) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TVServer plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj 2010-12-29 09:00:59 UTC (rev 4055) @@ -101,16 +101,6 @@ <HintPath>..\..\..\..\..\..\..\mediaportal\trunk\TvEngine3\TVLibrary\TVDatabase\references\Gentle.Framework.dll</HintPath> <Private>False</Private> </Reference> - <Reference Include="PluginBase, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\..\..\mediaportal\trunk\TvEngine3\TVLibrary\Plugins\PluginBase\bin\Release\PluginBase.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="SetupControls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\..\..\mediaportal\trunk\TvEngine3\TVLibrary\SetupControls\bin\Release\SetupControls.dll</HintPath> - <Private>False</Private> - </Reference> <Reference Include="System"> <Name>System</Name> </Reference> @@ -177,6 +167,14 @@ </EmbeddedResource> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\..\..\..\..\..\mediaportal\trunk\TvEngine3\TVLibrary\Plugins\PluginBase\PluginBase.csproj"> + <Project>{5EE20DC0-B22B-4BDB-828B-8DC5723A1873}</Project> + <Name>PluginBase</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\..\..\..\..\mediaportal\trunk\TvEngine3\TVLibrary\SetupControls\SetupControls.csproj"> + <Project>{A2792D3C-04C1-4A92-9383-A33D59C54D8D}</Project> + <Name>SetupControls</Name> + </ProjectReference> <ProjectReference Include="..\..\..\..\..\..\..\mediaportal\trunk\TvEngine3\TVLibrary\TvControl\TvControl.csproj"> <Project>{0DB878C6-1B68-4DC5-B6EF-564B7C08486F}</Project> <Name>TvControl</Name> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-23 16:49:57
|
Revision: 4054 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4054&view=rev Author: kroko_koenig Date: 2010-12-23 16:49:51 +0000 (Thu, 23 Dec 2010) Log Message: ----------- small fix Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-23 14:49:39 UTC (rev 4053) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-23 16:49:51 UTC (rev 4054) @@ -151,9 +151,9 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; xml += "<command>ADD_MUSIC</command>"; - xml += "<filename>" + Item.Filename + "</filename>"; - xml += "<artist>" + Item.Artist + "</artist>"; - xml += "<title>" + Item.Title + "</title>"; + xml += "<filename>" + Entity.AddEntity(Item.Filename) + "</filename>"; + xml += "<artist>" + Entity.AddEntity(Item.Artist) + "</artist>"; + xml += "<title>" + Entity.AddEntity(Item.Title) + "</title>"; xml += "<duration>" + Item.Duration + "</duration>"; xml += "</message>"; Modified: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-23 14:49:47
|
Revision: 4053 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4053&view=rev Author: kroko_koenig Date: 2010-12-23 14:49:39 +0000 (Thu, 23 Dec 2010) Log Message: ----------- some more functions and first bug fixes Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/values/strings.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java trunk/plugins/AndroidRemote/Release/MediaPortalRemote.001 Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -36,4 +36,7 @@ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission> <uses-permission android:name="android.permission.VIBRATE"></uses-permission> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> + <uses-permission android:name="android.permission.DISABLE_KEYGUARD"></uses-permission> + <uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission> + </manifest> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -8,6 +8,9 @@ package mediaportal.remote; public final class R { + public static final class array { + public static final int shutdown=0x7f050000; + } public static final class attr { } public static final class drawable { @@ -79,141 +82,142 @@ public static final int wake_on_lan=0x7f020041; } public static final class id { - public static final int GridView01=0x7f060017; - public static final int ImageView01=0x7f060019; - public static final int LinearLayout00=0x7f06004a; - public static final int LinearLayout01=0x7f06001a; - public static final int LinearLayout02=0x7f060055; - public static final int LinearLayout03=0x7f06005f; - public static final int LinearLayout04=0x7f060069; - public static final int LinearLayout05=0x7f06006f; - public static final int ListView01=0x7f060028; - public static final int TableLayout01=0x7f060005; - public static final int TableRow01=0x7f060006; - public static final int TextView01=0x7f060003; - public static final int TextView02=0x7f060004; - public static final int btnBack=0x7f06003e; - public static final int btnChannelDown=0x7f060043; - public static final int btnChannelUp=0x7f060040; - public static final int btnDown=0x7f06003d; - public static final int btnExit=0x7f060044; - public static final int btnFBack=0x7f06002b; - public static final int btnFForw=0x7f06002d; - public static final int btnHibernate=0x7f060046; - public static final int btnHome=0x7f060034; - public static final int btnInfo=0x7f060036; - public static final int btnLeft=0x7f060038; - public static final int btnMenu=0x7f06003c; - public static final int btnOk=0x7f060039; - public static final int btnPause=0x7f060031; - public static final int btnPlay=0x7f06002c; - public static final int btnRestart=0x7f060047; - public static final int btnRight=0x7f06003a; - public static final int btnShutOff=0x7f060048; - public static final int btnSkipBack=0x7f06002f; - public static final int btnSkipForw=0x7f060032; - public static final int btnStop=0x7f060030; - public static final int btnSuspend=0x7f060045; - public static final int btnUp=0x7f060035; - public static final int btnVolumeDown=0x7f060042; - public static final int btnVolumeMute=0x7f060041; - public static final int btnVolumeUp=0x7f06003f; - public static final int btnWakeOnLan=0x7f060049; - public static final int btn_main_music=0x7f060008; - public static final int btn_main_now_playing=0x7f06000b; - public static final int btn_main_pictures=0x7f060007; - public static final int btn_main_play=0x7f06000f; - public static final int btn_main_remote=0x7f06000a; - public static final int btn_main_settings=0x7f06000c; - public static final int btn_main_skp_back=0x7f06000e; - public static final int btn_main_skp_forw=0x7f060010; - public static final int btn_main_video=0x7f060009; - public static final int btnkey01=0x7f06004b; - public static final int btnkey02=0x7f06004c; - public static final int btnkey03=0x7f06004d; - public static final int btnkey04=0x7f06004e; - public static final int btnkey05=0x7f06004f; - public static final int btnkey06=0x7f060050; - public static final int btnkey07=0x7f060051; - public static final int btnkey08=0x7f060052; - public static final int btnkey09=0x7f060053; - public static final int btnkey10=0x7f060054; - public static final int btnkey11=0x7f060056; - public static final int btnkey12=0x7f060057; - public static final int btnkey13=0x7f060058; - public static final int btnkey14=0x7f060059; - public static final int btnkey15=0x7f06005a; - public static final int btnkey16=0x7f06005b; - public static final int btnkey17=0x7f06005c; - public static final int btnkey18=0x7f06005d; - public static final int btnkey19=0x7f06005e; - public static final int btnkey20=0x7f060060; - public static final int btnkey21=0x7f060061; - public static final int btnkey22=0x7f060062; - public static final int btnkey23=0x7f060063; - public static final int btnkey24=0x7f060064; - public static final int btnkey25=0x7f060065; - public static final int btnkey26=0x7f060066; - public static final int btnkey27=0x7f060067; - public static final int btnkey28=0x7f060068; - public static final int btnkey29=0x7f06006a; - public static final int btnkey30=0x7f06006b; - public static final int btnkey31=0x7f06006c; - public static final int btnkey32=0x7f06006d; - public static final int btnkey33=0x7f06006e; - public static final int btnkey41=0x7f060070; - public static final int btnkey42=0x7f060071; - public static final int btnkey43=0x7f060072; - public static final int btnkey44=0x7f060073; - public static final int btnkey45=0x7f060074; - public static final int btnkey46=0x7f060075; - public static final int btnkey47=0x7f060076; - public static final int btnkey48=0x7f060077; - public static final int btnkey49=0x7f060078; - public static final int btnkey50=0x7f060079; - public static final int clearplaylist=0x7f060080; - public static final int full_text=0x7f060018; - public static final int icon_image=0x7f060001; - public static final int icon_text=0x7f060002; - public static final int list_album=0x7f060013; - public static final int list_artist=0x7f060014; - public static final int list_result=0x7f060015; - public static final int list_song=0x7f060016; - public static final int main_now_playing=0x7f06000d; - public static final int music_grid=0x7f060012; - public static final int naviRemote_text=0x7f060029; - public static final int now_album=0x7f06001c; - public static final int now_artist=0x7f060022; - public static final int now_cd=0x7f06001d; - public static final int now_list=0x7f060027; - public static final int now_next=0x7f060026; - public static final int now_play=0x7f060025; - public static final int now_playing=0x7f06001b; - public static final int now_playing_right=0x7f060020; - public static final int now_playing_t_left=0x7f06001f; - public static final int now_prev=0x7f060023; - public static final int now_progress=0x7f06001e; - public static final int now_stop=0x7f060024; - public static final int now_title=0x7f060021; - public static final int open=0x7f060083; - public static final int playlist=0x7f06007f; - public static final int rslide=0x7f060086; - public static final int save=0x7f060082; - public static final int sdcard=0x7f060081; - public static final int send=0x7f060084; - public static final int server_ip=0x7f06007a; - public static final int server_macid=0x7f06007c; - public static final int server_port=0x7f06007b; - public static final int slide=0x7f060085; - public static final int title=0x7f06007e; - public static final int vibration=0x7f06007d; - public static final int widget0=0x7f060011; - public static final int widget00=0x7f06002a; - public static final int widget01=0x7f06002e; - public static final int widget02=0x7f060033; - public static final int widget03=0x7f060037; - public static final int widget04=0x7f06003b; - public static final int widget44=0x7f060000; + public static final int GridView01=0x7f070017; + public static final int ImageView01=0x7f070019; + public static final int LinearLayout00=0x7f07004a; + public static final int LinearLayout01=0x7f07001a; + public static final int LinearLayout02=0x7f070055; + public static final int LinearLayout03=0x7f07005f; + public static final int LinearLayout04=0x7f070069; + public static final int LinearLayout05=0x7f07006f; + public static final int ListView01=0x7f070028; + public static final int Spinner01=0x7f07007d; + public static final int TableLayout01=0x7f070005; + public static final int TableRow01=0x7f070006; + public static final int TextView01=0x7f070003; + public static final int TextView02=0x7f070004; + public static final int btnBack=0x7f07003e; + public static final int btnChannelDown=0x7f070043; + public static final int btnChannelUp=0x7f070040; + public static final int btnDown=0x7f07003d; + public static final int btnExit=0x7f070044; + public static final int btnFBack=0x7f07002b; + public static final int btnFForw=0x7f07002d; + public static final int btnHibernate=0x7f070046; + public static final int btnHome=0x7f070034; + public static final int btnInfo=0x7f070036; + public static final int btnLeft=0x7f070038; + public static final int btnMenu=0x7f07003c; + public static final int btnOk=0x7f070039; + public static final int btnPause=0x7f070031; + public static final int btnPlay=0x7f07002c; + public static final int btnRestart=0x7f070047; + public static final int btnRight=0x7f07003a; + public static final int btnShutOff=0x7f070048; + public static final int btnSkipBack=0x7f07002f; + public static final int btnSkipForw=0x7f070032; + public static final int btnStop=0x7f070030; + public static final int btnSuspend=0x7f070045; + public static final int btnUp=0x7f070035; + public static final int btnVolumeDown=0x7f070042; + public static final int btnVolumeMute=0x7f070041; + public static final int btnVolumeUp=0x7f07003f; + public static final int btnWakeOnLan=0x7f070049; + public static final int btn_main_music=0x7f070008; + public static final int btn_main_now_playing=0x7f07000b; + public static final int btn_main_pictures=0x7f070007; + public static final int btn_main_play=0x7f07000f; + public static final int btn_main_remote=0x7f07000a; + public static final int btn_main_settings=0x7f07000c; + public static final int btn_main_skp_back=0x7f07000e; + public static final int btn_main_skp_forw=0x7f070010; + public static final int btn_main_video=0x7f070009; + public static final int btnkey01=0x7f07004b; + public static final int btnkey02=0x7f07004c; + public static final int btnkey03=0x7f07004d; + public static final int btnkey04=0x7f07004e; + public static final int btnkey05=0x7f07004f; + public static final int btnkey06=0x7f070050; + public static final int btnkey07=0x7f070051; + public static final int btnkey08=0x7f070052; + public static final int btnkey09=0x7f070053; + public static final int btnkey10=0x7f070054; + public static final int btnkey11=0x7f070056; + public static final int btnkey12=0x7f070057; + public static final int btnkey13=0x7f070058; + public static final int btnkey14=0x7f070059; + public static final int btnkey15=0x7f07005a; + public static final int btnkey16=0x7f07005b; + public static final int btnkey17=0x7f07005c; + public static final int btnkey18=0x7f07005d; + public static final int btnkey19=0x7f07005e; + public static final int btnkey20=0x7f070060; + public static final int btnkey21=0x7f070061; + public static final int btnkey22=0x7f070062; + public static final int btnkey23=0x7f070063; + public static final int btnkey24=0x7f070064; + public static final int btnkey25=0x7f070065; + public static final int btnkey26=0x7f070066; + public static final int btnkey27=0x7f070067; + public static final int btnkey28=0x7f070068; + public static final int btnkey29=0x7f07006a; + public static final int btnkey30=0x7f07006b; + public static final int btnkey31=0x7f07006c; + public static final int btnkey32=0x7f07006d; + public static final int btnkey33=0x7f07006e; + public static final int btnkey41=0x7f070070; + public static final int btnkey42=0x7f070071; + public static final int btnkey43=0x7f070072; + public static final int btnkey44=0x7f070073; + public static final int btnkey45=0x7f070074; + public static final int btnkey46=0x7f070075; + public static final int btnkey47=0x7f070076; + public static final int btnkey48=0x7f070077; + public static final int btnkey49=0x7f070078; + public static final int btnkey50=0x7f070079; + public static final int clearplaylist=0x7f070081; + public static final int full_text=0x7f070018; + public static final int icon_image=0x7f070001; + public static final int icon_text=0x7f070002; + public static final int list_album=0x7f070013; + public static final int list_artist=0x7f070014; + public static final int list_result=0x7f070015; + public static final int list_song=0x7f070016; + public static final int main_now_playing=0x7f07000d; + public static final int music_grid=0x7f070012; + public static final int naviRemote_text=0x7f070029; + public static final int now_album=0x7f07001c; + public static final int now_artist=0x7f070022; + public static final int now_cd=0x7f07001d; + public static final int now_list=0x7f070027; + public static final int now_next=0x7f070026; + public static final int now_play=0x7f070025; + public static final int now_playing=0x7f07001b; + public static final int now_playing_right=0x7f070020; + public static final int now_playing_t_left=0x7f07001f; + public static final int now_prev=0x7f070023; + public static final int now_progress=0x7f07001e; + public static final int now_stop=0x7f070024; + public static final int now_title=0x7f070021; + public static final int open=0x7f070084; + public static final int playlist=0x7f070080; + public static final int rslide=0x7f070087; + public static final int save=0x7f070083; + public static final int sdcard=0x7f070082; + public static final int send=0x7f070085; + public static final int server_ip=0x7f07007a; + public static final int server_macid=0x7f07007c; + public static final int server_port=0x7f07007b; + public static final int slide=0x7f070086; + public static final int title=0x7f07007f; + public static final int vibration=0x7f07007e; + public static final int widget0=0x7f070011; + public static final int widget00=0x7f07002a; + public static final int widget01=0x7f07002e; + public static final int widget02=0x7f070033; + public static final int widget03=0x7f070037; + public static final int widget04=0x7f07003b; + public static final int widget44=0x7f070000; } public static final class layout { public static final int icon=0x7f030000; @@ -237,8 +241,8 @@ public static final int title=0x7f030012; } public static final class menu { - public static final int music_menu=0x7f050000; - public static final int picturefullscreenmenu=0x7f050001; + public static final int music_menu=0x7f060000; + public static final int picturefullscreenmenu=0x7f060001; } public static final class string { public static final int app_name=0x7f040000; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-23 14:49:39 UTC (rev 4053) @@ -8,6 +8,8 @@ slide show random slide show +threaded caching + Music section ------------- browse folders (MP shares) @@ -18,6 +20,8 @@ clear playlist save files from db to phone +fast scroll + Video section ------------- nothing yet @@ -27,7 +31,7 @@ show actual title show actual time show actual cover -clear playlist +clear play list delete one item Remote @@ -37,11 +41,9 @@ Main issues ------------ -Vibration feedback (not completed) switch WIFI on (just msg now) save files from Android to MP if the MP has no focus the remote doesnt work (normal) -save huge files can cause out of memory, better save stream -playlist select on file (switch to file x) progress task for downloads + Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -4,6 +4,6 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_album" android:layout_height="wrap_content" - android:layout_width="fill_parent"> + android:layout_width="fill_parent" android:fastScrollEnabled="true"> </ListView> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -4,6 +4,6 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_result" android:layout_height="wrap_content" - android:layout_width="fill_parent"> + android:layout_width="fill_parent" android:fastScrollEnabled="true"> </ListView> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -4,6 +4,6 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_song" android:layout_height="wrap_content" - android:layout_width="fill_parent"> + android:layout_width="fill_parent" android:fastScrollEnabled="true"> </ListView> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -6,19 +6,30 @@ <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="MediaPortal IP" android:textColor="#FF000000" android:textSize="18dip"> - - </TextView> + + </TextView> <EditText android:id="@+id/server_ip" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="numberDecimal"></EditText> + android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="text"></EditText> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="MediaPortal Port" android:textColor="#FF000000" android:textSize="18dip"></TextView> <EditText android:id="@+id/server_port" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="8200" android:inputType="phone"></EditText> - <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:textColor="#FF000000" android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> + android:layout_height="wrap_content" android:text="8200" + android:inputType="phone"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="12-34-56-78-90-12" android:inputType="text"></EditText> - -<CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox> + android:layout_height="wrap_content" android:text="12-34-56-78-90-12" + android:inputType="text"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="Power Mode"></TextView> + <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" + android:layout_height="wrap_content"></Spinner> + + <CheckBox android:layout_width="wrap_content" + android:layout_height="wrap_content" android:textColor="#000" + android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox> + </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:layout_height="fill_parent" + android:orientation="vertical" android:padding="15dip" + android:background="@drawable/brush"> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="MediaPortal IP" + android:textColor="#FF000000" android:textSize="18dip"> + + </TextView> + <EditText android:id="@+id/server_ip" android:layout_width="fill_parent" android:text="192.168.0.30" + android:inputType="numberDecimal" android:layout_height="50dip"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="MediaPortal Port" + android:textColor="#FF000000" android:textSize="18dip"></TextView> + <EditText android:id="@+id/server_port" android:layout_width="fill_parent" + android:text="8200" + android:inputType="phone" android:layout_height="50dip"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> + <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" + android:text="12-34-56-78-90-12" + android:inputType="text" android:layout_height="50dip"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="Power Mode"></TextView> + <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" android:layout_height="50dip"></Spinner> + + <CheckBox android:layout_width="wrap_content" + android:textColor="#000" + android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback" android:layout_height="50dip"></CheckBox> + +</LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/values/strings.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/values/strings.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/values/strings.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -1,4 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">MediaPortal Remote</string> + + <string-array name="shutdown"> + <item>Exit</item> + <item>Suspend</item> + <item>Hibernate</item> + <item>Restart</item> + <item>Shut Off</item> + </string-array> + </resources> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -40,6 +40,8 @@ import org.apache.http.params.HttpProtocolParams; import org.apache.http.protocol.HTTP; +import android.util.Log; + public class PostWebserver { public String httpServer = ""; @@ -77,6 +79,7 @@ String line; while ((line = rd.readLine()) != null) { + Log.d("MediaPortal", "Response POST : " + line); // Process line... } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -21,29 +21,18 @@ package mediaportal.remote; -import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.StringReader; -import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; -import java.net.URLDecoder; -import java.net.URLEncoder; - import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; - import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; -import android.text.Html; -import android.util.Log; - public class ReceiveHandler { private org.xml.sax.ContentHandler _handler; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -30,6 +30,7 @@ import android.content.res.AssetManager; import android.os.Bundle; import android.os.Vibrator; +import android.util.Log; import android.view.GestureDetector; import android.view.KeyEvent; import android.view.MotionEvent; @@ -40,8 +41,6 @@ public class Remote_01 extends Activity implements OnGestureListener { - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - private GestureDetector gestureScanner; private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; @@ -55,6 +54,10 @@ gestureScanner = new GestureDetector(this); + // / + // / buttons + // / + Button can = (Button) findViewById(R.id.btnBack); can.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -166,40 +169,40 @@ PostCommand("rewind"); } }); - - Toast.makeText(this, - "swipe to left for more", Toast.LENGTH_LONG) + + Toast.makeText(this, "swipe to left for more", Toast.LENGTH_SHORT) .show(); } - public boolean onKeyDown(int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_MENU) - { - Intent myIntent = new Intent(this, Remote_03.class); + // / + // / hardware keys + // / + + @Override public boolean onKeyDown(int keyCode, KeyEvent event) { + + switch (keyCode) { + case KeyEvent.KEYCODE_MENU: { + Intent myIntent = new Intent(this, Remote_03.class); startActivityForResult(myIntent, 0); - - return true; - } - else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) - { - PostCommand("volumeUp"); - return true; - } - else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) - { - PostCommand("volumeDown"); - return true; - } - else - { - return false; - } + return true; + } + case KeyEvent.KEYCODE_VOLUME_UP: { + PostCommand("volumeUp"); + return true; + } + case KeyEvent.KEYCODE_VOLUME_DOWN: { + PostCommand("volumeDown"); + return true; + } + } + + return super.onKeyDown(keyCode, event); } - + public void PostCommand(String button) { DoVibrate(); - + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); AssetManager assetManager = getAssets(); @@ -224,7 +227,8 @@ @Override public boolean onTouchEvent(MotionEvent me) { return gestureScanner.onTouchEvent(me); - } + } + public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { try { @@ -235,32 +239,36 @@ && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { Intent myIntent = new Intent(this, Remote_02.class); startActivityForResult(myIntent, 0); - + } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { - + } } catch (Exception e) { // nothing } return false; } - + public boolean onDown(MotionEvent arg0) { return true; } + public void onLongPress(MotionEvent arg0) { } + public boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2, float arg3) { return false; } + public void onShowPress(MotionEvent arg0) { } + public boolean onSingleTapUp(MotionEvent arg0) { return false; } - + public void DoVibrate() { if (Settings.Vibrate) { // Get instance of Vibrator from current Context Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -122,6 +122,8 @@ public void onClick(View view) { Toast.makeText(Remote_02.this, "not implemneted yet. Sorry", Toast.LENGTH_SHORT).show(); + //Wol w = new Wol(); + //w.sendMagicPacket(macStr, 9); } }); } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -27,4 +27,5 @@ public static String Port = "8200"; public static String MacId = "11-22-33-44-55-66"; public static Boolean Vibrate= true; + public static int PowerMode = 0; } Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -0,0 +1,56 @@ +package mediaportal.remote; + +import java.net.DatagramPacket; +import java.net.DatagramSocket; +import java.net.InetAddress; + +public class Wol { + + public Boolean sendMagicPacket(String macStr, String ipStr, int PORT) { + try { + byte[] mac = getMacId(macStr); + + // WOL packet contains a 6-bytes trailer and 16 times a 6-bytes + // sequence containing the MAC address. + byte[] data = new byte[17 * 6]; + + // Trailer of 6 times 0xFF. + for (int i = 0; i < 6; i++) + data[i] = (byte) 0xff; + + // Body of magic packet contains 16 times the MAC address. + for (int i = 1; i <= 16; i++) + for (int j = 0; j < 6; j++) + data[i * 6 + j] = mac[j]; + + InetAddress address = InetAddress.getByName(ipStr); + DatagramPacket packet = new DatagramPacket(data, data.length, + address, PORT); + DatagramSocket socket = new DatagramSocket(); + socket.send(packet); + socket.close(); + + return true; + } catch (Exception e) { + return false; + } + } + public Boolean sendMagicPacket(String macStr, int PORT) { + return sendMagicPacket(macStr, "255.255.255.255", PORT); + } + + private static byte[] getMacId(String macStr) { + + String[] val = macStr.split("-"); + if (val.length == 6) { + byte[] erg = new byte[6]; + for (int i = 0; i < 6; i++) { + erg[i] = (byte) Integer.parseInt(val[i], 16); + } + return erg; + } + + return null; + } + +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -22,6 +22,7 @@ package mediaportal.remote; import java.io.BufferedReader; +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; @@ -29,6 +30,8 @@ import mediaportal.remote.R; import android.app.Activity; import android.app.AlertDialog; +import android.app.KeyguardManager; +import android.app.KeyguardManager.KeyguardLock; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -37,17 +40,19 @@ import android.net.ConnectivityManager; import android.os.AsyncTask; import android.os.Bundle; +import android.os.Environment; import android.os.Handler; +import android.os.PowerManager; import android.os.Vibrator; -import android.view.KeyEvent; import android.view.View; import android.widget.*; public class main extends Activity { private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - + private Handler mHandler = new Handler(); + private static String display = "nothing playing"; private static String state = ""; private static boolean doUpdate; @@ -57,6 +62,29 @@ super.onCreate(savedInstanceState); setContentView(R.layout.main); + // + // init mp folder + // + try { + File fPath = new File(Environment.getExternalStorageDirectory(), + "\\MP"); + if (!fPath.exists()) + fPath.mkdir(); + } catch (Exception e) { + } + + // / + // / disable keyboard lock + // / + + KeyguardManager keyguardManager = (KeyguardManager) getSystemService(Activity.KEYGUARD_SERVICE); + KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE); + lock.disableKeyguard(); + + // / + // / Report section + // / + if (reportExist()) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Do you want to send a crash report ?") @@ -81,14 +109,10 @@ Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); chkStatus(); - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + // / + // / Navigation Buttons + // / - Settings.Server = settings.getString("Server", "192.168.0.30"); - Settings.Port = settings.getString("Port", "8200"); - Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); - Settings.Vibrate = settings.getBoolean("Vibrate", true); - Button btnPictures = (Button) findViewById(R.id.btn_main_pictures); btnPictures.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -146,6 +170,10 @@ } }); + // / + // / Player Buttons + // / + Button skipForw = (Button) findViewById(R.id.btn_main_skp_forw); skipForw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -170,7 +198,7 @@ } }); } - + private boolean reportExist() { try { @SuppressWarnings("unused") @@ -178,7 +206,6 @@ this.openFileInput("stack.trace"))); return true; } catch (FileNotFoundException e) { - // TODO Auto-generated catch block e.printStackTrace(); } return false; @@ -211,10 +238,8 @@ this.deleteFile("stack.trace"); } catch (FileNotFoundException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } @@ -280,9 +305,18 @@ public void onStart() { super.onStart(); + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, + MODE_PRIVATE); + + Settings.Server = settings.getString("Server", "192.168.0.30"); + Settings.Port = settings.getString("Port", "8200"); + Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); + Settings.Vibrate = settings.getBoolean("Vibrate", true); + Settings.PowerMode = settings.getInt("PowerMode", 0); + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 1000); - + doUpdate = true; } @@ -307,7 +341,7 @@ // automatically done on worker thread (separate from UI thread) protected Void doInBackground(final String... args) { - + String HttpServer = Settings.Server; String HttpPort = Settings.Port; @@ -322,9 +356,7 @@ + nowplayinghandler.Title + " (" + nowplayinghandler.Actual + ")"; state = nowplayinghandler.PlayerState; - } - else - { + } else { display = "nothing playing"; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -22,6 +22,12 @@ package mediaportal.remote; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; + +import mediaportal.remote.ReceiveDbXmlHandler.DbItems; + import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; @@ -39,6 +45,7 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; +import android.widget.SectionIndexer; import android.widget.TextView; import android.widget.Toast; @@ -49,34 +56,37 @@ private static ArrayList<ReceiveDbXmlHandler.DbItems> albumList; + private static HashMap<String, Integer> alphaIndexer; + private static String[] sections; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_album); mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); - + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - + ListView l1 = (ListView) findViewById(R.id.list_album); - l1.setOnItemClickListener(new AdapterView.OnItemClickListener() - { + l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, - long arg3) { + long arg3) { ReceiveDbXmlHandler.DbItems item = albumList.get(arg2); - + musicResults.Select = item.Album + "&" + item.Artist; musicResults.Mode = musicResults.SelectMode.Album; - + musicAlbum.DoVibrate(); - - Intent myIntent = new Intent(arg1.getContext(), musicResults.class); - startActivityForResult(myIntent, 0); + + Intent myIntent = new Intent(arg1.getContext(), + musicResults.class); + startActivityForResult(myIntent, 0); } }); - + ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); l1.setDivider(divcolor); l1.setDividerHeight(2); @@ -89,7 +99,8 @@ }; private class update extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(musicAlbum.this); + private final ProgressDialog dialog = new ProgressDialog( + musicAlbum.this); // can use UI thread here protected void onPreExecute() { @@ -113,10 +124,36 @@ this.dialog.dismiss(); } - if (albumList.size() == 0) { + if (albumList == null) { Toast.makeText(musicAlbum.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + + if(albumList.size() == 0) + Toast.makeText(musicAlbum.this, "No data received", + Toast.LENGTH_SHORT).show(); + + // build hash map + alphaIndexer = new HashMap<String, Integer>(); + int size = albumList.size(); + + for (int x = 0; x < size; x++) { + DbItems s = albumList.get(x); + String ch = s.Album.substring(0, 1); + ch = ch.toUpperCase(); + if (!alphaIndexer.containsKey(ch)) + alphaIndexer.put(ch, x); + } + Set<String> sectionLetters = alphaIndexer.keySet(); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>( + sectionLetters); + Collections.sort(sectionList); + sections = new String[sectionList.size()]; + sectionList.toArray(sections); + + // update list ListView listview = (ListView) findViewById(R.id.list_album); listview.setAdapter(new EfficientAdapter(musicAlbum.this)); } @@ -129,9 +166,10 @@ vibrate.vibrate(100); } } - - private static class EfficientAdapter extends BaseAdapter { + private static class EfficientAdapter extends BaseAdapter implements + SectionIndexer { + private LayoutInflater mInflater; public EfficientAdapter(Context context) { @@ -184,6 +222,22 @@ TextView text; TextView text2; } + + // + // implement SectionIndexer + // + + public int getPositionForSection(int section) { + return alphaIndexer.get(sections[section]); + } + + public int getSectionForPosition(int position) { + return 1; + } + + public Object[] getSections() { + return sections; + } } } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -58,7 +58,7 @@ private static HashMap<String, Integer> alphaIndexer; private static String[] sections; - + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_artist); @@ -128,6 +128,11 @@ Toast.makeText(musicArtist.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + + if(artistList.size() == 0) + Toast.makeText(musicArtist.this, "No data received", + Toast.LENGTH_SHORT).show(); + // build hash map alphaIndexer = new HashMap<String, Integer>(); int size = artistList.size(); @@ -136,12 +141,14 @@ DbItems s = artistList.get(x); String ch = s.Artist.substring(0, 1); ch = ch.toUpperCase(); - alphaIndexer.put(ch, x); + if (!alphaIndexer.containsKey(ch)) + alphaIndexer.put(ch, x); } Set<String> sectionLetters = alphaIndexer.keySet(); - - // sort results - ArrayList<String> sectionList = new ArrayList<String>(sectionLetters); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>( + sectionLetters); Collections.sort(sectionList); sections = new String[sectionList.size()]; sectionList.toArray(sections); @@ -159,8 +166,9 @@ } } - private static class EfficientAdapter extends BaseAdapter implements SectionIndexer { - + private static class EfficientAdapter extends BaseAdapter implements + SectionIndexer { + private LayoutInflater mInflater; public EfficientAdapter(Context context) { @@ -214,16 +222,18 @@ TextView text2; } - /// - /// implement SectionIndexer - /// - + // + // implement SectionIndexer + // + public int getPositionForSection(int section) { return alphaIndexer.get(sections[section]); } + public int getSectionForPosition(int position) { return 1; } + public Object[] getSections() { return sections; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -22,6 +22,12 @@ package mediaportal.remote; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; + +import mediaportal.remote.ReceiveDbXmlHandler.DbItems; + import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; @@ -41,6 +47,7 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; +import android.widget.SectionIndexer; import android.widget.TextView; import android.widget.Toast; @@ -57,6 +64,9 @@ private static Vibrator vibrate; private static ArrayList<ReceiveDbXmlHandler.DbItems> itemList; + + private static HashMap<String, Integer> alphaIndexer; + private static String[] sections; public static String Select = ""; public static SelectMode Mode; @@ -191,10 +201,36 @@ this.dialog.dismiss(); } - if (itemList.size() == 0) { + if (itemList == null) { Toast.makeText(musicResults.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + + if(itemList.size() == 0) + Toast.makeText(musicResults.this, "No data received", + Toast.LENGTH_SHORT).show(); + + // build hash map + alphaIndexer = new HashMap<String, Integer>(); + int size = itemList.size(); + + for (int x = 0; x < size; x++) { + DbItems s = itemList.get(x); + String ch = s.Artist.substring(0, 1); + ch = ch.toUpperCase(); + if (!alphaIndexer.containsKey(ch)) + alphaIndexer.put(ch, x); + } + Set<String> sectionLetters = alphaIndexer.keySet(); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>( + sectionLetters); + Collections.sort(sectionList); + sections = new String[sectionList.size()]; + sectionList.toArray(sections); + + // update list ListView listview = (ListView) findViewById(R.id.list_result); listview.setAdapter(new EfficientAdapter(musicResults.this)); } @@ -242,7 +278,8 @@ } } - private static class EfficientAdapter extends BaseAdapter { + private static class EfficientAdapter extends BaseAdapter implements + SectionIndexer { private LayoutInflater mInflater; @@ -296,6 +333,22 @@ TextView text; TextView text2; } + + // + // implement SectionIndexer + // + + public int getPositionForSection(int section) { + return alphaIndexer.get(sections[section]); + } + + public int getSectionForPosition(int position) { + return 1; + } + + public Object[] getSections() { + return sections; + } } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -22,6 +22,12 @@ package mediaportal.remote; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; + +import mediaportal.remote.ReceiveDbXmlHandler.DbItems; + import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; @@ -41,6 +47,7 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; +import android.widget.SectionIndexer; import android.widget.TextView; import android.widget.Toast; @@ -51,6 +58,9 @@ private static ArrayList<ReceiveDbXmlHandler.DbItems> songList; + private static HashMap<String, Integer> alphaIndexer; + private static String[] sections; + public static String Select = ""; ReceiveDbXmlHandler.DbItems selectedItem = null; @@ -144,10 +154,36 @@ this.dialog.dismiss(); } - if (songList.size() == 0) { + if (songList == null) { Toast.makeText(musicSong.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + + if(songList.size() == 0) + Toast.makeText(musicSong.this, "No data received", + Toast.LENGTH_SHORT).show(); + + // build hash map + alphaIndexer = new HashMap<String, Integer>(); + int size = songList.size(); + + for (int x = 0; x < size; x++) { + DbItems s = songList.get(x); + String ch = s.Title.substring(0, 1); + ch = ch.toUpperCase(); + if (!alphaIndexer.containsKey(ch)) + alphaIndexer.put(ch, x); + } + Set<String> sectionLetters = alphaIndexer.keySet(); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>( + sectionLetters); + Collections.sort(sectionList); + sections = new String[sectionList.size()]; + sectionList.toArray(sections); + + // update list ListView listview = (ListView) findViewById(R.id.list_song); listview.setAdapter(new EfficientAdapter(musicSong.this)); } @@ -183,7 +219,7 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; xml += "<command>ADD_MUSIC</command>"; - xml += "<filename>" + Entity.AddEntity(Item.Filename) + "</filename>"; + xml += "<filename>" + Entity.AddEntity(Item.Filename) + "</filename>"; xml += "<artist>" + Entity.AddEntity(Item.Artist) + "</artist>"; xml += "<title>" + Entity.AddEntity(Item.Title) + "</title>"; xml += "<duration>" + Item.Duration + "</duration>"; @@ -201,13 +237,14 @@ h.DownloadFileByID(filename, id); String sd = Environment.getExternalStorageDirectory().toString(); - + @SuppressWarnings("unused") MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); } - private static class EfficientAdapter extends BaseAdapter { + private static class EfficientAdapter extends BaseAdapter implements + SectionIndexer { private LayoutInflater mInflater; @@ -261,6 +298,18 @@ TextView text; TextView text2; } + + public int getPositionForSection(int section) { + return alphaIndexer.get(sections[section]); + } + + public int getSectionForPosition(int position) { + return 1; + } + + public Object[] getSections() { + return sections; + } } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -75,7 +75,7 @@ //holder.text2.setText(country[position]); convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE - : Color.LTGRAY); + : 0xFFEEEEEE); return convertView; } @@ -174,7 +174,7 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; xml += "<command>DELETE_MUSIC</command>"; - xml += "<filename>" + Filename + "</filename>"; + xml += "<filename>" + Entity.AddEntity(Filename) + "</filename>"; xml += "</message>"; post.Post(xml); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -28,6 +28,7 @@ import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; +import android.graphics.Bitmap; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -31,6 +31,7 @@ import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; +import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; @@ -39,6 +40,7 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; +import android.os.PowerManager; import android.util.Log; import android.view.GestureDetector; import android.view.MotionEvent; @@ -129,6 +131,22 @@ private Runnable mUpdateTimeTask = new Runnable() { public void run() { + /// + /// keep screen on in slideshow + /// + if((slideShow)||(randomShow)) + { + PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE); + PowerManager.WakeLock wl = pm.newWakeLock( + PowerManager.FULL_WAKE_LOCK + | PowerManager.ON_AFTER_RELEASE, + "MediaPortal"); + + wl.acquire(); + wl.release(); + } + + if (slideShow) { int max = pictures.pictureList.size(); @@ -231,16 +249,62 @@ } } + private void SavetoCache() { + try { + DirItems item = pictures.pictureList.get(pictures.selectedPicture); + Bitmap bMap = item.Picture; + File fPath = Environment.getExternalStorageDirectory(); + OutputStream outStream = null; + try { + outStream = new FileOutputStream(fPath + "/" + + item.File.toString()); + + } catch (FileNotFoundException e) { + e.printStackTrace(); + Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + + " |||| " + e.getLocalizedMessage().toString()); + } + bMap.compress(Bitmap.CompressFormat.JPEG, 100, outStream); + try { + outStream.flush(); + } catch (IOException e) { + e.printStackTrace(); + Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + + " |||| " + e.getLocalizedMessage().toString()); + } + try { + outStream.close(); + + Toast.makeText(picturesful... [truncated message content] |
From: <kro...@us...> - 2010-12-22 11:04:09
|
Revision: 4052 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4052&view=rev Author: kroko_koenig Date: 2010-12-22 11:04:02 +0000 (Wed, 22 Dec 2010) Log Message: ----------- start work on fastscroll (artist) and some bugs fixed plus utf8 Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylistXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml 2010-12-22 11:04:02 UTC (rev 4052) @@ -4,6 +4,6 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_artist" android:layout_height="wrap_content" - android:layout_width="fill_parent"> + android:layout_width="fill_parent" android:fastScrollEnabled="true"> </ListView> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-22 11:04:02 UTC (rev 4052) @@ -9,21 +9,16 @@ </TextView> <EditText android:id="@+id/server_ip" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:text="192.168.0.30" - android:inputType="text" - ></EditText> + android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="numberDecimal"></EditText> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="MediaPortal Port" android:textColor="#FF000000" android:textSize="18dip"></TextView> <EditText android:id="@+id/server_port" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="8200" - android:inputType="number|numberSigned"></EditText> + android:layout_height="wrap_content" android:text="8200" android:inputType="phone"></EditText> <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="MediaPortal MAC Adress" - android:textColor="#FF000000" android:textSize="18dip"></TextView> + android:layout_height="wrap_content" android:textColor="#FF000000" android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="12-34-56-78-90-12" - android:inputType="number|numberSigned"></EditText> + android:layout_height="wrap_content" android:text="12-34-56-78-90-12" android:inputType="text"></EditText> <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox> </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -0,0 +1,32 @@ +package mediaportal.remote; + +public class Entity { + + public static String AddEntity(String raw) { + if (raw == null) + return null; + char[] chars = raw.toCharArray(); + StringBuffer encoded = new StringBuffer(); + for (int i = 0; i < chars.length; i++) { + char c = chars[i]; + if (c == '&') + encoded.append("&"); + else if (c == '<') + encoded.append("<"); + else if (c == '>') + encoded.append(">"); + else if (c == '\'') + encoded.append("'"); + else if (c == '"') + encoded.append("""); + else if (c < 128) + encoded.append(c); + else { + encoded.append("&#"); + encoded.append((int) c); + encoded.append(";"); + } + } + return encoded.toString(); + } +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -64,7 +64,7 @@ socket.getOutputStream(), "UTF8")); wr.write("POST " + path + " HTTP/1.0\r\n"); wr.write("Content-Length: " + data.length() + "\r\n"); - wr.write("Content-Type: application/xml\r\n"); + wr.write("Content-Type: application/xml; charset=utf-8\r\n"); wr.write("\r\n"); // Send data Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -73,7 +73,7 @@ if (localName == "Artist") {currentDbItem.Artist =currentValue;} if (localName == "Title") {currentDbItem.Title =currentValue;} if (localName == "Album") {currentDbItem.Album =currentValue;} - if (localName == "AlbumArtist") {currentDbItem.AlbumArtist =currentValue;} + if (localName == "AlbumArtist") {currentDbItem.AlbumArtist =currentValue;} if (localName == "Track") {currentDbItem.Track =currentValue;} if (localName == "Rating") {currentDbItem.Rating =currentValue;} if (localName == "Filename") {currentDbItem.Filename =currentValue;} @@ -81,6 +81,8 @@ if (localName == "ID") {currentDbItem.ID =currentValue;} if (localName == "Item")DbList.add(currentDbItem); + + currentValue = null; } /** @@ -91,8 +93,8 @@ 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/ReceiveHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -21,11 +21,18 @@ package mediaportal.remote; +import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; +import java.net.URLDecoder; +import java.net.URLEncoder; + import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; @@ -34,6 +41,9 @@ import org.xml.sax.SAXException; import org.xml.sax.XMLReader; +import android.text.Html; +import android.util.Log; + public class ReceiveHandler { private org.xml.sax.ContentHandler _handler; @@ -104,5 +114,4 @@ } } - } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -31,6 +31,7 @@ import android.os.Bundle; import android.os.Vibrator; import android.view.GestureDetector; +import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.GestureDetector.OnGestureListener; @@ -171,6 +172,30 @@ .show(); } + public boolean onKeyDown(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_MENU) + { + Intent myIntent = new Intent(this, Remote_03.class); + startActivityForResult(myIntent, 0); + + return true; + } + else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) + { + PostCommand("volumeUp"); + return true; + } + else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) + { + PostCommand("volumeDown"); + return true; + } + else + { + return false; + } + } + public void PostCommand(String button) { DoVibrate(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -60,7 +60,7 @@ public Bitmap DownloadImage(String urlStr) { - final String url = urlStr; + final String url = urlStr.replaceAll(" ","%20"); Bitmap bitmap = null; InputStream in = null; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -39,6 +39,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Vibrator; +import android.view.KeyEvent; import android.view.View; import android.widget.*; @@ -86,7 +87,8 @@ Settings.Server = settings.getString("Server", "192.168.0.30"); Settings.Port = settings.getString("Port", "8200"); Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); - + Settings.Vibrate = settings.getBoolean("Vibrate", true); + Button btnPictures = (Button) findViewById(R.id.btn_main_pictures); btnPictures.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -168,7 +170,7 @@ } }); } - + private boolean reportExist() { try { @SuppressWarnings("unused") Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -175,7 +175,7 @@ holder.text2.setText(item.Album + " - " + item.Artist); convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE - : Color.LTGRAY); + : 0xFFEEEEEE); return convertView; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -22,6 +22,12 @@ package mediaportal.remote; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; + +import mediaportal.remote.ReceiveDbXmlHandler.DbItems; + import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; @@ -39,6 +45,7 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; +import android.widget.SectionIndexer; import android.widget.TextView; import android.widget.Toast; @@ -46,18 +53,21 @@ private Handler mHandler = new Handler(); private static Vibrator vibrate; - + private static ArrayList<ReceiveDbXmlHandler.DbItems> artistList; + private static HashMap<String, Integer> alphaIndexer; + private static String[] sections; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_artist); mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); - + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - + ListView l1 = (ListView) findViewById(R.id.list_artist); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -68,9 +78,9 @@ musicResults.Select = item.Artist; musicResults.Mode = musicResults.SelectMode.Artist; - + musicArtist.DoVibrate(); - + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); startActivityForResult(myIntent, 0); @@ -87,9 +97,10 @@ new update().execute(); } }; - + private class update extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(musicArtist.this); + private final ProgressDialog dialog = new ProgressDialog( + musicArtist.this); // can use UI thread here protected void onPreExecute() { @@ -113,16 +124,33 @@ this.dialog.dismiss(); } - if (artistList.size() == 0) { + if (artistList == null) { Toast.makeText(musicArtist.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + // build hash map + alphaIndexer = new HashMap<String, Integer>(); + int size = artistList.size(); + + for (int x = 0; x < size; x++) { + DbItems s = artistList.get(x); + String ch = s.Artist.substring(0, 1); + ch = ch.toUpperCase(); + alphaIndexer.put(ch, x); + } + Set<String> sectionLetters = alphaIndexer.keySet(); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>(sectionLetters); + Collections.sort(sectionList); + sections = new String[sectionList.size()]; + sectionList.toArray(sections); + + // update list ListView listview = (ListView) findViewById(R.id.list_artist); listview.setAdapter(new EfficientAdapter(musicArtist.this)); } } - - } private static void DoVibrate() { @@ -130,9 +158,9 @@ vibrate.vibrate(100); } } + + private static class EfficientAdapter extends BaseAdapter implements SectionIndexer { - private static class EfficientAdapter extends BaseAdapter { - private LayoutInflater mInflater; public EfficientAdapter(Context context) { @@ -176,7 +204,7 @@ holder.text2.setText(item.Artist); convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE - : Color.LTGRAY); + : 0xFFEEEEEE); return convertView; } @@ -185,6 +213,20 @@ TextView text; TextView text2; } + + /// + /// implement SectionIndexer + /// + + public int getPositionForSection(int section) { + return alphaIndexer.get(sections[section]); + } + public int getSectionForPosition(int position) { + return 1; + } + public Object[] getSections() { + return sections; + } } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -48,7 +48,7 @@ private Handler mHandler = new Handler(); private static Vibrator vibrate; - + private static ArrayList<ReceiveDbXmlHandler.DbItems> songList; public static String Select = ""; @@ -63,9 +63,9 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); - + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - + ListView l1 = (ListView) findViewById(R.id.list_song); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -73,7 +73,7 @@ long arg3) { selectedItem = songList.get(arg2); - + DoVibrate(); AlertDialog.Builder builder = new AlertDialog.Builder(arg0 @@ -85,16 +85,20 @@ case 0: PostAddItem(selectedItem); Toast.makeText(musicSong.this, - selectedItem.Title + " has been added", Toast.LENGTH_SHORT).show(); + selectedItem.Title + " has been added", + Toast.LENGTH_SHORT).show(); break; case 1: PostClear(); - Toast.makeText(musicSong.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); + Toast.makeText(musicSong.this, + "Playlist has been cleared", + Toast.LENGTH_SHORT).show(); break; case 2: SavetoSDCard(selectedItem); Toast.makeText(musicSong.this, - selectedItem.Title + " has been transferd", Toast.LENGTH_SHORT).show(); + selectedItem.Title + " has been transferd", + Toast.LENGTH_SHORT).show(); break; } } @@ -103,7 +107,7 @@ alert.show(); } }); - + ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); l1.setDivider(divcolor); l1.setDividerHeight(2); @@ -155,7 +159,7 @@ vibrate.vibrate(100); } } - + public void PostClear() { PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); @@ -169,6 +173,7 @@ post.Post(xml); } + public void PostAddItem(ReceiveDbXmlHandler.DbItems Item) { PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); @@ -178,24 +183,28 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; xml += "<command>ADD_MUSIC</command>"; - xml += "<filename>" + Item.Filename + "</filename>"; - xml += "<artist>" + Item.Artist + "</artist>"; - xml += "<title>" + Item.Title + "</title>"; + xml += "<filename>" + Entity.AddEntity(Item.Filename) + "</filename>"; + xml += "<artist>" + Entity.AddEntity(Item.Artist) + "</artist>"; + xml += "<title>" + Entity.AddEntity(Item.Title) + "</title>"; xml += "<duration>" + Item.Duration + "</duration>"; xml += "</message>"; post.Post(xml); } + private void SavetoSDCard(ReceiveDbXmlHandler.DbItems Item) { - + String filename = Item.Artist + " - " + Item.Title + ".mp3"; - String id = Item.ID; - - httpHandler h = new httpHandler(); - h.DownloadFileByID(filename,id); - - String sd = Environment.getExternalStorageDirectory().toString(); - MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); + String id = Item.ID; + + httpHandler h = new httpHandler(); + h.DownloadFileByID(filename, id); + + String sd = Environment.getExternalStorageDirectory().toString(); + + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + + filename, "audio/mpeg"); } private static class EfficientAdapter extends BaseAdapter { @@ -243,7 +252,7 @@ holder.text2.setText(item.Title + " - " + item.Artist); convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE - : Color.LTGRAY); + : 0xFFEEEEEE); return convertView; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -6,7 +6,7 @@ public class nowplayingXmlHandler extends DefaultHandler { Boolean currentElement = false; - String currentValue = null; + String currentValue = ""; /** * Called when tag starts ( example:- <name>AndroidPeople</name> -- <name> ) @@ -15,7 +15,7 @@ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { currentElement = true; - currentValue = "..."; + currentValue = ""; } /** @@ -35,7 +35,7 @@ if (localName == "TotalTime") {nowplayinghandler.Total =currentValue;} if (localName == "ActualTime") {nowplayinghandler.Actual =currentValue;} if (localName == "Cover") {nowplayinghandler.Cover =currentValue;} - if (localName == "PlayerState") {nowplayinghandler.PlayerState =currentValue;} + if (localName == "PlayerState") {nowplayinghandler.PlayerState =currentValue;} } /** @@ -46,8 +46,8 @@ 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/nowplaylistXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylistXmlHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylistXmlHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -6,7 +6,7 @@ public class nowplaylistXmlHandler extends DefaultHandler { Boolean currentElement = false; - String currentValue = null; + String currentValue = ""; nowplaylisthandler.PlayListItem item = null; /** @@ -16,7 +16,7 @@ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { currentElement = true; - currentValue = "..."; + currentValue = ""; if (localName == "Item") item = new nowplaylisthandler.PlayListItem(); @@ -62,8 +62,8 @@ 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/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -102,7 +102,6 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 0); } - } }); } @@ -216,8 +215,7 @@ String file = "http://" + Settings.Server + ":" + Settings.Port + "/pictures/"; file += actualDir + item.File + ".thb"; - item.Picture = http.DownloadImage(file.replaceAll(" ", - "%20")); + item.Picture = http.DownloadImage(file); iv.setImageBitmap(item.Picture); if (item.Picture == null) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -52,10 +52,12 @@ public class picturesfullscreen extends Activity implements OnGestureListener { private Handler mHandler = new Handler(); + private GestureDetector gestureScanner; private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; private static final int SWIPE_THRESHOLD_VELOCITY = 200; + private boolean slideShow; private boolean randomShow; public static boolean SlideshowPaused = false; @@ -95,7 +97,7 @@ String file = "http://" + Settings.Server + ":" + Settings.Port + "/pictures/"; file += pictures.actualDir + item.File; - item.Picture = http.DownloadImage(file.replaceAll(" ", "%20")); + item.Picture = http.DownloadImage(file); } return null; @@ -233,10 +235,13 @@ private void SendPicture() { try { DirItems item = pictures.pictureList.get(pictures.selectedPicture); + Intent picMessageIntent = new Intent( android.content.Intent.ACTION_SEND); + picMessageIntent.setType("image/jpeg"); picMessageIntent.putExtra(Intent.EXTRA_STREAM, item.Picture); + startActivity(Intent.createChooser(picMessageIntent, "Send picture using:")); } catch (Exception e) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -72,6 +72,7 @@ txt1.setText(Settings.Server); txt2.setText(Settings.Port); txt3.setText(Settings.MacId); + chk.setChecked(Settings.Vibrate); } 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. |
From: <kro...@us...> - 2010-12-21 13:27:00
|
Revision: 4051 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4051&view=rev Author: kroko_koenig Date: 2010-12-21 13:26:53 +0000 (Tue, 21 Dec 2010) Log Message: ----------- UTF8 encoding on the server Modified Paths: -------------- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-21 11:02:44 UTC (rev 4050) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-21 13:26:53 UTC (rev 4051) @@ -730,9 +730,6 @@ } } - - - } #endregion @@ -802,7 +799,7 @@ // folder foreach (string key in directoryList.Keys) { - msg += "<Folder>" + HttpUtility.HtmlEncode(key) + "</Folder>\r\n"; + msg += "<Folder>" + EncodeString(key) + "</Folder>\r\n"; } msg += "</Directory>\r\n"; @@ -832,7 +829,7 @@ string[] dirs = Directory.GetDirectories(dir, "*.*", SearchOption.TopDirectoryOnly); foreach (string f in dirs) { - msg += "<Folder>" + HttpUtility.HtmlEncode(Path.GetFileName(f)) + "</Folder>\r\n"; + msg += "<Folder>" + EncodeString(Path.GetFileName(f)) + "</Folder>\r\n"; } //files @@ -841,7 +838,7 @@ { string fName = Path.GetFileName(f); if ((fName.ToLower() != "folder.jpg") && (fName.ToLower() != "folder.png")) - msg += "<File>" + HttpUtility.HtmlEncode(fName) + "</File>\r\n"; + msg += "<File>" + EncodeString(fName) + "</File>\r\n"; } msg += "</Directory>\r\n"; // send @@ -1204,7 +1201,7 @@ // folder foreach (string key in directoryList.Keys) { - msg += "<Folder>" + HttpUtility.HtmlEncode(key) + "</Folder>\r\n"; + msg += "<Folder>" + EncodeString(key) + "</Folder>\r\n"; } msg += "</Directory>\r\n"; @@ -1234,7 +1231,7 @@ string[] dirs = Directory.GetDirectories(dir, "*.*", SearchOption.TopDirectoryOnly); foreach (string f in dirs) { - msg += "<Folder>" + HttpUtility.HtmlEncode(Path.GetFileName(f)) + "</Folder>\r\n"; + msg += "<Folder>" + EncodeString(Path.GetFileName(f)) + "</Folder>\r\n"; } //files @@ -1242,7 +1239,7 @@ foreach (string f in files) { string fName = Path.GetFileName(f); - msg += "<File>" + HttpUtility.HtmlEncode(fName) + "</File>\r\n"; + msg += "<File>" + EncodeString(fName) + "</File>\r\n"; } msg += "</Directory>\r\n"; // send @@ -1313,7 +1310,7 @@ msg += "Proxy-Connection: close" + "\r\n"; msg += "\r\n"; // content - msg += "<?xml version=\"1.0\"?>\r\n"; + msg += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"; msg += "<Database>\r\n"; MediaPortal.Music.Database.MusicDatabase db = MediaPortal.Music.Database.MusicDatabase.Instance; @@ -1326,7 +1323,7 @@ if (artist != string.Empty) { msg += "<Item>\r\n"; - msg += "<Artist>" + HttpUtility.HtmlEncode(artist) + "</Artist>\r\n"; + msg += "<Artist>" + EncodeString(artist) + "</Artist>\r\n"; msg += "</Item>\r\n"; } } @@ -1361,11 +1358,11 @@ { msg += "<Item>\r\n"; - msg += "<Album>" + HttpUtility.HtmlEncode(album.Album.Replace("|", "").Trim()) + "</Album>\r\n"; - msg += "<AlbumArtist>" + HttpUtility.HtmlEncode(album.AlbumArtist.Replace("|", "").Trim()) + "</AlbumArtist>\r\n"; - msg += "<Artist>" + HttpUtility.HtmlEncode(album.Artist.Replace("|", "").Trim()) + "</Artist>\r\n"; - msg += "<Genre>" + HttpUtility.HtmlEncode(album.Genre.Replace("|", "").Trim()) + "</Genre>\r\n"; - msg += "<Rating>" + HttpUtility.HtmlEncode(album.Rating.ToString()) + "</Rating>\r\n"; + msg += "<Album>" + EncodeString(album.Album.Replace("|", "").Trim()) + "</Album>\r\n"; + msg += "<AlbumArtist>" + EncodeString(album.AlbumArtist.Replace("|", "").Trim()) + "</AlbumArtist>\r\n"; + msg += "<Artist>" + EncodeString(album.Artist.Replace("|", "").Trim()) + "</Artist>\r\n"; + msg += "<Genre>" + EncodeString(album.Genre.Replace("|", "").Trim()) + "</Genre>\r\n"; + msg += "<Rating>" + EncodeString(album.Rating.ToString()) + "</Rating>\r\n"; msg += "</Item>\r\n"; } @@ -1427,14 +1424,14 @@ msg += "<Item>\r\n"; msg += "<ID>" + HttpUtility.HtmlEncode(song.Id.ToString()) + "</ID>\r\n"; - msg += "<Title>" + HttpUtility.HtmlEncode(song.Title) + "</Title>\r\n"; - msg += "<Artist>" + HttpUtility.HtmlEncode(song.Artist) + "</Artist>\r\n"; - msg += "<Album>" + HttpUtility.HtmlEncode(song.Artist) + "</Album>\r\n"; + msg += "<Title>" + EncodeString(song.Title) + "</Title>\r\n"; + msg += "<Artist>" + EncodeString(song.Artist) + "</Artist>\r\n"; + msg += "<Album>" + EncodeString(song.Artist) + "</Album>\r\n"; msg += "<Genre>" + HttpUtility.HtmlEncode(song.Genre) + "</Genre>\r\n"; msg += "<Track>" + HttpUtility.HtmlEncode(song.Track.ToString()) + "</Track>\r\n"; msg += "<Duration>" + HttpUtility.HtmlEncode(song.Duration.ToString()) + "</Duration>\r\n"; msg += "<Rating>" + HttpUtility.HtmlEncode(song.Rating.ToString()) + "</Rating>\r\n"; - msg += "<Filename>" + HttpUtility.HtmlEncode(song.FileName) + "</Filename>\r\n"; + msg += "<Filename>" + EncodeString(song.FileName) + "</Filename>\r\n"; msg += "</Item>\r\n"; } @@ -1517,10 +1514,6 @@ total = string.Empty; } - artist = HttpUtility.HtmlEncode(artist); - album = HttpUtility.HtmlEncode(album); - title = HttpUtility.HtmlEncode(title); - string msg = string.Empty; // header msg += "HTTP/1.0 200 Ok\r\n"; @@ -1533,9 +1526,9 @@ msg += "<PlayerState>" + state + "</PlayerState>\r\n"; - msg += "<Title>" + title + "</Title>\r\n"; - msg += "<Artist>" + artist + "</Artist>\r\n"; - msg += "<Album>" + album + "</Album>\r\n"; + msg += "<Title>" + EncodeString(title) + "</Title>\r\n"; + msg += "<Artist>" + EncodeString(artist) + "</Artist>\r\n"; + msg += "<Album>" + EncodeString(album) + "</Album>\r\n"; msg += "<Track>" + track + "</Track>\r\n"; if (actualCover != null) msg += "<Cover>True</Cover>\r\n"; @@ -1578,7 +1571,7 @@ bool played = item.Played; string typ = item.Type.ToString(); - desc = HttpUtility.HtmlEncode(desc); + desc = EncodeString(desc); msg += "<Item>\r\n"; @@ -2052,5 +2045,15 @@ } return string.Empty; } + + private string EncodeString(string Data) + { + byte[] str = Encoding.UTF8.GetBytes(Data); + + System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); + string conv = enc.GetString(str); + + return HttpUtility.HtmlEncode(conv); + } } } 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. |
From: <do...@us...> - 2010-12-21 11:02:51
|
Revision: 4050 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4050&view=rev Author: dot-i Date: 2010-12-21 11:02:44 +0000 (Tue, 21 Dec 2010) Log Message: ----------- Updated plugins for latest MP1.2 SVN. Modified Paths: -------------- trunk/plugins/ForTheRecord/ForTheRecord.MPPlugins.sln trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/MediaPortalRecorderTunerService.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Properties/Resources.Designer.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/TvServerPlugin.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Utility.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ForTheRecord.UI.MediaPortal.csproj trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/GuideSearchBase.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/RecordedBase.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/ForTheRecord.UI.Process.csproj trunk/plugins/ForTheRecord/ReferencedAssemblies/Core.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Databases.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Dialogs.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/PluginBase.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/SetupControls.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TVDatabase.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvBusinessLayer.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvControl.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvLibrary.Interfaces.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Utils.dll Modified: trunk/plugins/ForTheRecord/ForTheRecord.MPPlugins.sln =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.MPPlugins.sln 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.MPPlugins.sln 2010-12-21 11:02:44 UTC (rev 4050) @@ -1,16 +1,10 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RecorderTuner Server Plugin", "RecorderTuner Server Plugin", "{84E6B02A-0674-4406-911E-88CAB7CE17E6}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GUI Client Plugin", "GUI Client Plugin", "{2A217BB8-A9FF-4013-ACAC-B1D1EBB39349}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForTheRecord.RecorderTuners.MediaPortalTvServer", "ForTheRecord.RecorderTuners.MediaPortalTvServer\ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj", "{6CF22F4E-FFFD-448D-A1A8-2156CB0133ED}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForTheRecord.UI.Process", "ForTheRecord.UI.Process\ForTheRecord.UI.Process.csproj", "{A35F0ED7-98ED-4EE2-99C6-EA2AF880F8CD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForTheRecord.UI.MediaPortal", "ForTheRecord.UI.MediaPortal\ForTheRecord.UI.MediaPortal.csproj", "{1526A789-1DE2-4A8B-AA4B-5382A617C4F8}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReferencedAssemblies", "ReferencedAssemblies", "{FD6B1904-69BA-4054-B218-C616D64BF43A}" ProjectSection(SolutionItems) = preProject ReferencedAssemblies\Core.dll = ReferencedAssemblies\Core.dll @@ -32,6 +26,12 @@ ReferencedAssemblies\Utils.dll = ReferencedAssemblies\Utils.dll EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForTheRecord.RecorderTuners.MediaPortalTvServer", "ForTheRecord.RecorderTuners.MediaPortalTvServer\ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj", "{6CF22F4E-FFFD-448D-A1A8-2156CB0133ED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForTheRecord.UI.Process", "ForTheRecord.UI.Process\ForTheRecord.UI.Process.csproj", "{A35F0ED7-98ED-4EE2-99C6-EA2AF880F8CD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForTheRecord.UI.MediaPortal", "ForTheRecord.UI.MediaPortal\ForTheRecord.UI.MediaPortal.csproj", "{1526A789-1DE2-4A8B-AA4B-5382A617C4F8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Modified: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj 2010-12-21 11:02:44 UTC (rev 4050) @@ -1,4 +1,5 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -15,10 +16,25 @@ <SccProvider>SubversionScc</SccProvider> <FileUpgradeFlags> </FileUpgradeFlags> - <OldToolsVersion>2.0</OldToolsVersion> + <OldToolsVersion>3.5</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -28,6 +44,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -36,6 +53,7 @@ <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="ForTheRecord.Entities, Version=1.4.0.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> @@ -201,6 +219,23 @@ <ItemGroup> <None Include="Resources\WizardHeader.bmp" /> </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> + <Install>false</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> + <Visible>False</Visible> + <ProductName>Windows Installer 3.1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Modified: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/MediaPortalRecorderTunerService.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/MediaPortalRecorderTunerService.cs 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/MediaPortalRecorderTunerService.cs 2010-12-21 11:02:44 UTC (rev 4050) @@ -53,7 +53,7 @@ private object _liveStreamsLock = new object(); private Dictionary<string, LiveStream> _liveStreams = new Dictionary<string, LiveStream>(); - private Dictionary<string, User> _liveStreamUsers = new Dictionary<string, User>(); + private Dictionary<string, IUser> _liveStreamUsers = new Dictionary<string, IUser>(); protected override string Name { @@ -226,7 +226,7 @@ if (liveStream != null && _liveStreamUsers.ContainsKey(liveStream.RtspUrl)) { - User tve3User = _liveStreamUsers[liveStream.RtspUrl]; + IUser tve3User = _liveStreamUsers[liveStream.RtspUrl]; foreach (TvDatabase.Card card in availableCards) { if (card.IdCard == tve3User.CardId) @@ -266,7 +266,7 @@ { string userName = String.Format(CultureInfo.InvariantCulture, "{0}{1}", _ftrLiveUserName, Guid.NewGuid()); - User tve3User = new User(userName, true, card.IdCard); + IUser tve3User = new User(userName, true, card.IdCard); tve3User.IdChannel = mpChannel.IdChannel; tve3User.SubChannel = -1; @@ -293,7 +293,7 @@ } private LiveStreamResult StartTimeShifting(Channel channel, TvDatabase.Card card, TvDatabase.Channel mpChannel, - ref User tve3User, ref LiveStream liveStream) + ref IUser tve3User, ref LiveStream liveStream) { IChannel tuningChannel = Utility.FindTuningChannelOnCard(mpChannel, card.IdCard); if (tuningChannel != null) @@ -361,7 +361,7 @@ { if (_liveStreams.ContainsKey(liveStream.RtspUrl)) { - User tve3User = _liveStreamUsers[liveStream.RtspUrl]; + IUser tve3User = _liveStreamUsers[liveStream.RtspUrl]; if (TvServerPlugin.TvController_IsTimeShifting(ref tve3User)) { if (!TvServerPlugin.TvController_StopTimeShifting(ref tve3User)) @@ -410,17 +410,17 @@ cards.Sort(delegate(TvDatabase.Card c1, TvDatabase.Card c2) { return c1.Priority.CompareTo(c2.Priority); }); // Get the list of live streams from TV Server - Dictionary<string, User> mpStreamUsers = new Dictionary<string, User>(); + Dictionary<string, IUser> mpStreamUsers = new Dictionary<string, IUser>(); foreach (TvDatabase.Card card in cards) { - User[] cardUsers = TvServerPlugin.TvController_GetUsersForCard(card.IdCard); + IUser[] cardUsers = TvServerPlugin.TvController_GetUsersForCard(card.IdCard); if (cardUsers != null) { - foreach (User user in cardUsers) + foreach (IUser user in cardUsers) { if (user.Name.StartsWith(_ftrLiveUserName)) { - User tve3User = user; + IUser tve3User = user; if (TvServerPlugin.TvController_IsTimeShifting(ref tve3User)) { mpStreamUsers.Add(TvServerPlugin.TvController_GetStreamingUrl(tve3User), tve3User); @@ -458,7 +458,7 @@ { if (!_liveStreams.ContainsKey(rtspUrl)) { - User tve3User = mpStreamUsers[rtspUrl]; + IUser tve3User = mpStreamUsers[rtspUrl]; TvServerPlugin.TvController_StopTimeShifting(ref tve3User, TvStoppedReason.KickedByAdmin); } } @@ -478,7 +478,7 @@ if (_liveStreams.ContainsKey(liveStream.RtspUrl)) { _liveStreams[liveStream.RtspUrl].StreamLastAliveTime = liveStream.StreamLastAliveTime; - User tve3User = _liveStreamUsers[liveStream.RtspUrl]; + IUser tve3User = _liveStreamUsers[liveStream.RtspUrl]; if (TvServerPlugin.TvController_IsTimeShifting(ref tve3User)) { TvServerPlugin.TvController_HeartBeat(tve3User); @@ -498,7 +498,7 @@ { List<ChannelLiveState> liveStates = new List<ChannelLiveState>(); - User tve3User = null; + IUser tve3User = null; if (liveStream != null && _liveStreamUsers.ContainsKey(liveStream.RtspUrl)) { @@ -557,7 +557,7 @@ { if (_liveStreams.ContainsKey(liveStream.RtspUrl)) { - User tve3User = _liveStreamUsers[liveStream.RtspUrl]; + IUser tve3User = _liveStreamUsers[liveStream.RtspUrl]; return TvServerPlugin.TvController_HasTeletext(tve3User); } } @@ -577,7 +577,7 @@ { if (_liveStreams.ContainsKey(liveStream.RtspUrl)) { - User tve3User = _liveStreamUsers[liveStream.RtspUrl]; + IUser tve3User = _liveStreamUsers[liveStream.RtspUrl]; TvServerPlugin.TvController_StartGrabbingTeletext(tve3User); } } @@ -596,7 +596,7 @@ { if (_liveStreams.ContainsKey(liveStream.RtspUrl)) { - User tve3User = _liveStreamUsers[liveStream.RtspUrl]; + IUser tve3User = _liveStreamUsers[liveStream.RtspUrl]; TvServerPlugin.TvController_StopGrabbingTeletext(tve3User); } } @@ -615,7 +615,7 @@ { if (_liveStreams.ContainsKey(liveStream.RtspUrl)) { - User tve3User = _liveStreamUsers[liveStream.RtspUrl]; + IUser tve3User = _liveStreamUsers[liveStream.RtspUrl]; return TvServerPlugin.TvController_IsGrabbingTeletext(tve3User); } } @@ -636,7 +636,7 @@ { if (_liveStreams.ContainsKey(liveStream.RtspUrl)) { - User tve3User = _liveStreamUsers[liveStream.RtspUrl]; + IUser tve3User = _liveStreamUsers[liveStream.RtspUrl]; byte[] result = TvServerPlugin.TvController_GetTeletextPage(tve3User, pageNumber, subPageNumber); if (result != null) { @@ -669,7 +669,7 @@ #region Private Methods - private static string GetTsBufferFile(User tve3User) + private static string GetTsBufferFile(IUser tve3User) { string tsBufferFile = TvServerPlugin.TvController_TimeShiftFileName(ref tve3User); string uncTimeshiftFolder = Common.ShareExplorer.GetUncPathForLocalPath(Path.GetDirectoryName(tsBufferFile)); Modified: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Properties/Resources.Designer.cs 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Properties/Resources.Designer.cs 2010-12-21 11:02:44 UTC (rev 4050) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -19,7 +19,7 @@ // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { Modified: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs 2010-12-21 11:02:44 UTC (rev 4050) @@ -68,7 +68,7 @@ } } - private User _tve3User; + private IUser _tve3User; private string _tve3RecordingFileName; protected override void OnThreadEnding() @@ -203,7 +203,7 @@ private bool EnsureCardFree(bool allowOtherFtrUser, ref string errorMessage, out bool ftrIsRecordingOnCard) { ftrIsRecordingOnCard = false; - User[] cardUsers = TvServerPlugin.TvController_GetUsersForCard(_recordOnCard.IdCard); + IUser[] cardUsers = TvServerPlugin.TvController_GetUsersForCard(_recordOnCard.IdCard); if (cardUsers != null) { TvDatabase.TuningDetail tuning = Utility.FindTuningDetailOnCard(_channel, _recordOnCard.IdCard); @@ -226,7 +226,7 @@ } else { - User tmpUser = cardUser; + IUser tmpUser = cardUser; if (TvServerPlugin.TvController_IsRecording(ref tmpUser)) { if (!TvServerPlugin.TvController_StopRecording(ref tmpUser)) @@ -281,7 +281,7 @@ catch { } } - private static bool StopMediaPortalRecording(User tve3User) + private static bool StopMediaPortalRecording(IUser tve3User) { for (int count = 0; count < 60; count++) { Modified: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/TvServerPlugin.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/TvServerPlugin.cs 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/TvServerPlugin.cs 2010-12-21 11:02:44 UTC (rev 4050) @@ -574,7 +574,7 @@ private static object _tvControllerLock = new object(); - public static TvResult TvController_Tune(ref User user, IChannel channel, int idChannel) + public static TvResult TvController_Tune(ref IUser user, IChannel channel, int idChannel) { lock (_tvControllerLock) { @@ -606,7 +606,7 @@ } } - public static User[] TvController_GetUsersForCard(int cardId) + public static IUser[] TvController_GetUsersForCard(int cardId) { lock (_tvControllerLock) { @@ -614,7 +614,7 @@ } } - public static TvResult TvController_StartRecording(ref User user, ref string fileName, bool contentRecording, long startTime) + public static TvResult TvController_StartRecording(ref IUser user, ref string fileName, bool contentRecording, long startTime) { lock (_tvControllerLock) { @@ -622,7 +622,7 @@ } } - public static bool TvController_IsRecording(ref User user) + public static bool TvController_IsRecording(ref IUser user) { lock (_tvControllerLock) { @@ -630,7 +630,7 @@ } } - public static bool TvController_StopRecording(ref User user) + public static bool TvController_StopRecording(ref IUser user) { lock (_tvControllerLock) { @@ -638,7 +638,7 @@ } } - public static TvResult TvController_StartTimeShifting(ref User user, ref string fileName) + public static TvResult TvController_StartTimeShifting(ref IUser user, ref string fileName) { lock (_tvControllerLock) { @@ -646,7 +646,7 @@ } } - public static bool TvController_IsTimeShifting(ref User user) + public static bool TvController_IsTimeShifting(ref IUser user) { lock (_tvControllerLock) { @@ -654,7 +654,7 @@ } } - public static bool TvController_StopTimeShifting(ref User user) + public static bool TvController_StopTimeShifting(ref IUser user) { lock (_tvControllerLock) { @@ -662,7 +662,7 @@ } } - public static bool TvController_StopTimeShifting(ref User user, TvStoppedReason reason) + public static bool TvController_StopTimeShifting(ref IUser user, TvStoppedReason reason) { lock (_tvControllerLock) { @@ -670,7 +670,7 @@ } } - public static string TvController_TimeShiftFileName(ref User user) + public static string TvController_TimeShiftFileName(ref IUser user) { lock (_tvControllerLock) { @@ -678,7 +678,7 @@ } } - public static string TvController_GetStreamingUrl(User user) + public static string TvController_GetStreamingUrl(IUser user) { lock (_tvControllerLock) { @@ -686,7 +686,7 @@ } } - public static void TvController_HeartBeat(User user) + public static void TvController_HeartBeat(IUser user) { lock (_tvControllerLock) { @@ -702,7 +702,7 @@ } } - public static bool TvController_HasTeletext(User user) + public static bool TvController_HasTeletext(IUser user) { lock (_tvControllerLock) { @@ -710,7 +710,7 @@ } } - public static void TvController_StartGrabbingTeletext(User user) + public static void TvController_StartGrabbingTeletext(IUser user) { lock (_tvControllerLock) { @@ -718,7 +718,7 @@ } } - public static void TvController_StopGrabbingTeletext(User user) + public static void TvController_StopGrabbingTeletext(IUser user) { lock (_tvControllerLock) { @@ -726,7 +726,7 @@ } } - public static bool TvController_IsGrabbingTeletext(User user) + public static bool TvController_IsGrabbingTeletext(IUser user) { lock (_tvControllerLock) { @@ -734,7 +734,7 @@ } } - public static byte[] TvController_GetTeletextPage(User user, int pageNumber, int subPageNumber) + public static byte[] TvController_GetTeletextPage(IUser user, int pageNumber, int subPageNumber) { lock (_tvControllerLock) { @@ -742,7 +742,7 @@ } } - public static int TvController_SubPageCount(User user, int pageNumber) + public static int TvController_SubPageCount(IUser user, int pageNumber) { lock (_tvControllerLock) { Modified: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Utility.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Utility.cs 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Utility.cs 2010-12-21 11:02:44 UTC (rev 4050) @@ -225,13 +225,13 @@ return CardFreeOrUsingSameTransponder(cardId, channel, null); } - public static bool CardFreeOrUsingSameTransponder(int cardId, TvDatabase.Channel channel, User userToIgnore) + public static bool CardFreeOrUsingSameTransponder(int cardId, TvDatabase.Channel channel, IUser userToIgnore) { - User[] cardUsers = TvServerPlugin.TvController_GetUsersForCard(cardId); + IUser[] cardUsers = TvServerPlugin.TvController_GetUsersForCard(cardId); if (cardUsers != null) { TvDatabase.TuningDetail tuning = Utility.FindTuningDetailOnCard(channel, cardId); - foreach (User cardUser in cardUsers) + foreach (IUser cardUser in cardUsers) { if (userToIgnore == null || cardUser.Name != userToIgnore.Name) Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ForTheRecord.UI.MediaPortal.csproj =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ForTheRecord.UI.MediaPortal.csproj 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ForTheRecord.UI.MediaPortal.csproj 2010-12-21 11:02:44 UTC (rev 4050) @@ -1,4 +1,5 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -15,9 +16,11 @@ <SccProvider>SubversionScc</SccProvider> <FileUpgradeFlags> </FileUpgradeFlags> - <OldToolsVersion>2.0</OldToolsVersion> + <OldToolsVersion>3.5</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> + <IsWebBootstrapper>false</IsWebBootstrapper> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <PublishUrl>publish\</PublishUrl> <Install>true</Install> <InstallFrom>Disk</InstallFrom> @@ -30,9 +33,9 @@ <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>0</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> - <IsWebBootstrapper>false</IsWebBootstrapper> <UseApplicationTrust>false</UseApplicationTrust> <BootstrapperEnabled>true</BootstrapperEnabled> + <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -42,6 +45,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -51,10 +55,10 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <PlatformTarget>x86</PlatformTarget> + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.3.28694, Culture=neutral, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> + <Reference Include="Core"> <HintPath>..\ReferencedAssemblies\Core.dll</HintPath> </Reference> <Reference Include="Databases, Version=1.0.3.28696, Culture=neutral, processorArchitecture=x86"> @@ -314,6 +318,11 @@ </ProjectReference> </ItemGroup> <ItemGroup> + <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> + <Install>false</Install> + </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.2.0"> <Visible>False</Visible> <ProductName>.NET Framework 2.0 %28x86%29</ProductName> @@ -329,6 +338,11 @@ <ProductName>.NET Framework 3.5</ProductName> <Install>false</Install> </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>false</Install> + </BootstrapperPackage> </ItemGroup> <ItemGroup> <EmbeddedResource Include="SetupForm.resx"> Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/GuideSearchBase.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/GuideSearchBase.cs 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/GuideSearchBase.cs 2010-12-21 11:02:44 UTC (rev 4050) @@ -295,10 +295,12 @@ VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); if (keyboard != null) { + keyboard.IsSearchKeyboard = false; + keyboard.Text = searchText ?? String.Empty; keyboard.Reset(); - keyboard.Text = searchText ?? String.Empty; keyboard.TextChanged += new VirtualKeyboard.TextChangedEventHandler(keyboard_TextChanged); keyboard.DoModal(GetID); + keyboard_TextChanged(0, keyboard.Text); if (_model.Titles.Length == 0 && !String.IsNullOrEmpty(_model.SearchText)) { @@ -311,7 +313,8 @@ } } - void keyboard_TextChanged(int kindOfSearch, string searchText) + + private void keyboard_TextChanged(int kindOfSearch, string searchText) { using (TvSchedulerServiceAgent tvSchedulerAgent = new TvSchedulerServiceAgent()) { Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/RecordedBase.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/RecordedBase.cs 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/RecordedBase.cs 2010-12-21 11:02:44 UTC (rev 4050) @@ -86,7 +86,7 @@ private RecordingsModel _model; private RecordingsController _controller; - private GUIFacadeControl.ViewMode _currentViewMethod = GUIFacadeControl.ViewMode.List; + private GUIFacadeControl.Layout _currentViewMethod = GUIFacadeControl.Layout.List; private RecordingGroupMode _currentGroupByMode = RecordingGroupMode.GroupByProgramTitle; private SortMethod _currentSortMethod = SortMethod.Date; private bool _sortAscending = true; @@ -320,26 +320,26 @@ strTmp = xmlreader.GetValueAsString(this.SettingsSection, "view", "list"); if (strTmp == "List") { - _currentViewMethod = GUIFacadeControl.ViewMode.List; + _currentViewMethod = GUIFacadeControl.Layout.List; } else if (strTmp == "AlbumView") { - _currentViewMethod = GUIFacadeControl.ViewMode.AlbumView; + _currentViewMethod = GUIFacadeControl.Layout.AlbumView; } else if (strTmp == "SmallIcons") { - _currentViewMethod = GUIFacadeControl.ViewMode.SmallIcons; + _currentViewMethod = GUIFacadeControl.Layout.SmallIcons; } else if (strTmp == "LargeIcons") { - _currentViewMethod = GUIFacadeControl.ViewMode.LargeIcons; + _currentViewMethod = GUIFacadeControl.Layout.LargeIcons; } else if (strTmp == "Filmstrip") { - _currentViewMethod = GUIFacadeControl.ViewMode.Filmstrip; + _currentViewMethod = GUIFacadeControl.Layout.Filmstrip; } - _facadeView.View = _currentViewMethod; + _facadeView.CurrentLayout = _currentViewMethod; _facadeView.Focus = true; } } @@ -377,22 +377,22 @@ } switch (_currentViewMethod) { - case GUIFacadeControl.ViewMode.AlbumView: + case GUIFacadeControl.Layout.AlbumView: xmlwriter.SetValue(this.SettingsSection, "view", "AlbumView"); break; - case GUIFacadeControl.ViewMode.Filmstrip: + case GUIFacadeControl.Layout.Filmstrip: xmlwriter.SetValue(this.SettingsSection, "view", "Filmstrip"); break; - case GUIFacadeControl.ViewMode.LargeIcons: + case GUIFacadeControl.Layout.LargeIcons: xmlwriter.SetValue(this.SettingsSection, "view", "LargeIcons"); break; - case GUIFacadeControl.ViewMode.List: + case GUIFacadeControl.Layout.List: xmlwriter.SetValue(this.SettingsSection, "view", "List"); break; - case GUIFacadeControl.ViewMode.Playlist: + case GUIFacadeControl.Layout.Playlist: xmlwriter.SetValue(this.SettingsSection, "view", "Playlist"); break; - case GUIFacadeControl.ViewMode.SmallIcons: + case GUIFacadeControl.Layout.SmallIcons: xmlwriter.SetValue(this.SettingsSection, "view", "SmallIcons"); break; default: @@ -517,44 +517,44 @@ shouldContinue = false; switch (_currentViewMethod) { - case GUIFacadeControl.ViewMode.List: - _currentViewMethod = GUIFacadeControl.ViewMode.Playlist; - if (!AllowView(_currentViewMethod) || _facadeView.PlayListView == null) + case GUIFacadeControl.Layout.List: + _currentViewMethod = GUIFacadeControl.Layout.Playlist; + if (!AllowView(_currentViewMethod) || _facadeView.PlayListLayout == null) { shouldContinue = true; } break; - case GUIFacadeControl.ViewMode.Playlist: - _currentViewMethod = GUIFacadeControl.ViewMode.SmallIcons; - if (!AllowView(_currentViewMethod) || _facadeView.ThumbnailView == null) + case GUIFacadeControl.Layout.Playlist: + _currentViewMethod = GUIFacadeControl.Layout.SmallIcons; + if (!AllowView(_currentViewMethod) || _facadeView.ThumbnailLayout == null) { shouldContinue = true; } break; - case GUIFacadeControl.ViewMode.SmallIcons: - _currentViewMethod = GUIFacadeControl.ViewMode.LargeIcons; - if (!AllowView(_currentViewMethod) || _facadeView.ThumbnailView == null) + case GUIFacadeControl.Layout.SmallIcons: + _currentViewMethod = GUIFacadeControl.Layout.LargeIcons; + if (!AllowView(_currentViewMethod) || _facadeView.ThumbnailLayout == null) { shouldContinue = true; } break; - case GUIFacadeControl.ViewMode.LargeIcons: - _currentViewMethod = GUIFacadeControl.ViewMode.AlbumView; - if (!AllowView(_currentViewMethod) || _facadeView.AlbumListView == null) + case GUIFacadeControl.Layout.LargeIcons: + _currentViewMethod = GUIFacadeControl.Layout.AlbumView; + if (!AllowView(_currentViewMethod) || _facadeView.AlbumListLayout == null) { shouldContinue = true; } break; - case GUIFacadeControl.ViewMode.AlbumView: - _currentViewMethod = GUIFacadeControl.ViewMode.Filmstrip; - if (!AllowView(_currentViewMethod) || _facadeView.FilmstripView == null) + case GUIFacadeControl.Layout.AlbumView: + _currentViewMethod = GUIFacadeControl.Layout.Filmstrip; + if (!AllowView(_currentViewMethod) || _facadeView.FilmstripLayout == null) { shouldContinue = true; } break; - case GUIFacadeControl.ViewMode.Filmstrip: - _currentViewMethod = GUIFacadeControl.ViewMode.List; - if (!AllowView(_currentViewMethod) || _facadeView.ListView == null) + case GUIFacadeControl.Layout.Filmstrip: + _currentViewMethod = GUIFacadeControl.Layout.List; + if (!AllowView(_currentViewMethod) || _facadeView.ListLayout == null) { shouldContinue = true; } @@ -562,7 +562,7 @@ } } while (shouldContinue); - _facadeView.View = _currentViewMethod; + _facadeView.CurrentLayout = _currentViewMethod; LoadDirectory(true); } @@ -621,10 +621,10 @@ } } - private bool AllowView(GUIFacadeControl.ViewMode view) + private bool AllowView(GUIFacadeControl.Layout view) { // Disable playlist for now as it makes no sense to move recording entries - if (view == GUIFacadeControl.ViewMode.Playlist) + if (view == GUIFacadeControl.Layout.Playlist) { return false; } @@ -878,21 +878,21 @@ switch (_currentViewMethod) { - case GUIFacadeControl.ViewMode.AlbumView: + case GUIFacadeControl.Layout.AlbumView: text = GUILocalizeStrings.Get(529); break; - case GUIFacadeControl.ViewMode.Filmstrip: + case GUIFacadeControl.Layout.Filmstrip: text = GUILocalizeStrings.Get(733); break; - case GUIFacadeControl.ViewMode.LargeIcons: + case GUIFacadeControl.Layout.LargeIcons: text = GUILocalizeStrings.Get(417); break; - case GUIFacadeControl.ViewMode.List: + case GUIFacadeControl.Layout.List: text = GUILocalizeStrings.Get(101); break; //case GUIFacadeControl.ViewMode.Playlist: // break; - case GUIFacadeControl.ViewMode.SmallIcons: + case GUIFacadeControl.Layout.SmallIcons: text = GUILocalizeStrings.Get(100); break; default: @@ -932,7 +932,7 @@ rec.RecordingStartTime.ToShortTimeString(), ts.TotalSeconds > 0 ? Utils.SecondsToHMString((int)ts.TotalSeconds) : Utility.GetLocalizedText(TextId.RecordingInProgress)); item1.Label2 = strTime; - if (_currentViewMethod == GUIFacadeControl.ViewMode.List) + if (_currentViewMethod == GUIFacadeControl.Layout.List) { if (_currentSortMethod == SortMethod.Channel) { Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/ForTheRecord.UI.Process.csproj =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/ForTheRecord.UI.Process.csproj 2010-12-20 10:10:41 UTC (rev 4049) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/ForTheRecord.UI.Process.csproj 2010-12-21 11:02:44 UTC (rev 4050) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -19,6 +19,25 @@ <SignAssembly>false</SignAssembly> <AssemblyOriginatorKeyFile> </AssemblyOriginatorKeyFile> + <FileUpgradeFlags> + </FileUpgradeFlags> + <OldToolsVersion>3.5</OldToolsVersion> + <UpgradeBackupLocation /> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -28,6 +47,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -36,6 +56,7 @@ <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="ForTheRecord.Entities, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> @@ -83,6 +104,23 @@ <Compile Include="UpcomingOrActiveProgramsList.cs" /> <Compile Include="UpcomingOrActiveProgramView.cs" /> </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> + <Install>false</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> + <Visible>False</Visible> + <ProductName>Windows Installer 3.1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/Core.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/Databases.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/Dialogs.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/PluginBase.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/SetupControls.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/TVDatabase.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/TvBusinessLayer.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/TvControl.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/TvLibrary.Interfaces.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/Utils.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-20 10:10:47
|
Revision: 4049 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4049&view=rev Author: kroko_koenig Date: 2010-12-20 10:10:41 +0000 (Mon, 20 Dec 2010) Log Message: ----------- add install howto and zip install file Added Paths: ----------- trunk/plugins/AndroidRemote/Release/Install Android Remote.docx trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip Added: trunk/plugins/AndroidRemote/Release/Install Android Remote.docx =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/Install Android Remote.docx ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-19 21:16:13
|
Revision: 4048 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4048&view=rev Author: kroko_koenig Date: 2010-12-19 21:16:06 +0000 (Sun, 19 Dec 2010) Log Message: ----------- so far for this week Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -85,6 +85,8 @@ public static final int LinearLayout01=0x7f06001a; public static final int LinearLayout02=0x7f060055; public static final int LinearLayout03=0x7f06005f; + public static final int LinearLayout04=0x7f060069; + public static final int LinearLayout05=0x7f06006f; public static final int ListView01=0x7f060028; public static final int TableLayout01=0x7f060005; public static final int TableRow01=0x7f060006; @@ -154,12 +156,22 @@ public static final int btnkey26=0x7f060066; public static final int btnkey27=0x7f060067; public static final int btnkey28=0x7f060068; - public static final int btnkey29=0x7f060069; - public static final int btnkey30=0x7f06006a; - public static final int btnkey31=0x7f06006b; - public static final int btnkey32=0x7f06006c; - public static final int btnkey33=0x7f06006d; - public static final int clearplaylist=0x7f060074; + public static final int btnkey29=0x7f06006a; + public static final int btnkey30=0x7f06006b; + public static final int btnkey31=0x7f06006c; + public static final int btnkey32=0x7f06006d; + public static final int btnkey33=0x7f06006e; + public static final int btnkey41=0x7f060070; + public static final int btnkey42=0x7f060071; + public static final int btnkey43=0x7f060072; + public static final int btnkey44=0x7f060073; + public static final int btnkey45=0x7f060074; + public static final int btnkey46=0x7f060075; + public static final int btnkey47=0x7f060076; + public static final int btnkey48=0x7f060077; + public static final int btnkey49=0x7f060078; + public static final int btnkey50=0x7f060079; + public static final int clearplaylist=0x7f060080; public static final int full_text=0x7f060018; public static final int icon_image=0x7f060001; public static final int icon_text=0x7f060002; @@ -183,18 +195,18 @@ public static final int now_progress=0x7f06001e; public static final int now_stop=0x7f060024; public static final int now_title=0x7f060021; - public static final int open=0x7f060077; - public static final int playlist=0x7f060073; - public static final int rslide=0x7f06007a; - public static final int save=0x7f060076; - public static final int sdcard=0x7f060075; - public static final int send=0x7f060078; - public static final int server_ip=0x7f06006e; - public static final int server_macid=0x7f060070; - public static final int server_port=0x7f06006f; - public static final int slide=0x7f060079; - public static final int title=0x7f060072; - public static final int vibration=0x7f060071; + public static final int open=0x7f060083; + public static final int playlist=0x7f06007f; + public static final int rslide=0x7f060086; + public static final int save=0x7f060082; + public static final int sdcard=0x7f060081; + public static final int send=0x7f060084; + public static final int server_ip=0x7f06007a; + public static final int server_macid=0x7f06007c; + public static final int server_port=0x7f06007b; + public static final int slide=0x7f060085; + public static final int title=0x7f06007e; + public static final int vibration=0x7f06007d; public static final int widget0=0x7f060011; public static final int widget00=0x7f06002a; public static final int widget01=0x7f06002e; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml 2010-12-19 21:16:06 UTC (rev 4048) @@ -2,7 +2,7 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/full_text" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="name" + android:layout_height="wrap_content" android:text="Loading..." android:gravity="center_horizontal" android:background="#FFFFFFFF" android:textSize="20dip" android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF"> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml 2010-12-19 21:16:06 UTC (rev 4048) @@ -119,15 +119,14 @@ </Button> </LinearLayout> - <LinearLayout android:id="@+id/LinearLayout03" - android:layout_height="wrap_content" + <LinearLayout android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_gravity="center_horizontal" android:layout_width="wrap_content" - android:paddingBottom="5dip"> + android:paddingBottom="5dip" android:id="@+id/LinearLayout04"> <Button android:id="@+id/btnkey29" android:padding="0dip" - android:text=".?123" android:layout_width="64dip" android:layout_height="48dip"> + android:layout_width="64dip" android:layout_height="48dip" android:text="ENTER"> </Button> <Button android:id="@+id/btnkey30" android:padding="0dip" android:layout_height="48dip" android:layout_width="32dip" android:text="/"> @@ -143,5 +142,41 @@ </Button> </LinearLayout> + + <LinearLayout android:layout_height="wrap_content" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:paddingBottom="5dip" android:paddingTop="5dip" android:layout_marginTop="20dip" android:id="@+id/LinearLayout05"> + + <Button android:id="@+id/btnkey41" android:padding="0dip" + android:text="1" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey42" android:padding="0dip" + android:text="2" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey43" android:padding="0dip" + android:text="3" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey44" android:padding="0dip" + android:text="4" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey45" android:padding="0dip" + android:text="5" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey46" android:padding="0dip" + android:text="6" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey47" android:padding="0dip" + android:text="7" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey48" android:padding="0dip" + android:text="8" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey49" android:padding="0dip" + android:text="9" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey50" android:padding="0dip" + android:text="0" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + </LinearLayout> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -217,7 +217,7 @@ this.dialog.dismiss(); } - if (musicList.size() == 0) { + if (musicList == null) { Toast.makeText(musicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -74,6 +74,7 @@ // Get response BufferedReader rd = new BufferedReader(new InputStreamReader( socket.getInputStream())); + String line; while ((line = rd.readLine()) != null) { // Process line... Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -35,6 +35,7 @@ import android.view.View; import android.view.GestureDetector.OnGestureListener; import android.widget.Button; +import android.widget.Toast; public class Remote_02 extends Activity implements OnGestureListener { @@ -119,7 +120,8 @@ Button btnWakeOnLan = (Button) findViewById(R.id.btnWakeOnLan); btnWakeOnLan.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - PostCommand("wakeonlan"); + Toast.makeText(Remote_02.this, "not implemneted yet. Sorry", + Toast.LENGTH_SHORT).show(); } }); } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -123,6 +123,22 @@ Button btn27 = (Button) findViewById(R.id.btnkey27); btn27.setOnClickListener(mClickListener); + // del + Button btn28 = (Button) findViewById(R.id.btnkey28); + btn28.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + PostKey("{BKSP}"); + } + }); + + // enter + Button btn29 = (Button) findViewById(R.id.btnkey29); + btn29.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + PostKey("{ENTER}"); + } + }); + Button btn30 = (Button) findViewById(R.id.btnkey30); btn30.setOnClickListener(mClickListener); @@ -130,7 +146,7 @@ Button btn31 = (Button) findViewById(R.id.btnkey31); btn31.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - PostKey(" "); + PostKey("{ }"); } }); @@ -138,6 +154,27 @@ btn32.setOnClickListener(mClickListener); Button btn33 = (Button) findViewById(R.id.btnkey33); btn33.setOnClickListener(mClickListener); + + Button btn41 = (Button) findViewById(R.id.btnkey41); + btn41.setOnClickListener(mClickListener); + Button btn42 = (Button) findViewById(R.id.btnkey42); + btn42.setOnClickListener(mClickListener); + Button btn43 = (Button) findViewById(R.id.btnkey43); + btn43.setOnClickListener(mClickListener); + Button btn44 = (Button) findViewById(R.id.btnkey44); + btn44.setOnClickListener(mClickListener); + Button btn45 = (Button) findViewById(R.id.btnkey45); + btn45.setOnClickListener(mClickListener); + Button btn46 = (Button) findViewById(R.id.btnkey46); + btn46.setOnClickListener(mClickListener); + Button btn47 = (Button) findViewById(R.id.btnkey47); + btn47.setOnClickListener(mClickListener); + Button btn48 = (Button) findViewById(R.id.btnkey48); + btn48.setOnClickListener(mClickListener); + Button btn49 = (Button) findViewById(R.id.btnkey49); + btn49.setOnClickListener(mClickListener); + Button btn50 = (Button) findViewById(R.id.btnkey50); + btn50.setOnClickListener(mClickListener); } private void PostKey(String Key) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -45,9 +45,11 @@ public class main extends Activity { private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; + private Handler mHandler = new Handler(); private static String display = "nothing playing"; private static String state = ""; + private static boolean doUpdate; @Override public void onCreate(Bundle savedInstanceState) { @@ -75,7 +77,7 @@ } - Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); + Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); chkStatus(); SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, @@ -226,8 +228,8 @@ final android.net.NetworkInfo wifi = connMgr .getNetworkInfo(ConnectivityManager.TYPE_WIFI); - //final android.net.NetworkInfo mobile = connMgr - // .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); + // final android.net.NetworkInfo mobile = connMgr + // .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (!wifi.isAvailable()) { Toast.makeText(this, "Warning : Wifi is not available !", @@ -278,12 +280,15 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 1000); + + doUpdate = true; } - + @Override public void onPause() { super.onPause(); + doUpdate = false; mHandler.removeCallbacks(mUpdateTimeTask); } @@ -300,12 +305,10 @@ // automatically done on worker thread (separate from UI thread) protected Void doInBackground(final String... args) { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); - nowplayinghandler handler = nowplayinghandler.getinstance(); handler.setconnection(HttpServer, HttpPort); handler.fetchdata(); @@ -314,10 +317,14 @@ && (!nowplayinghandler.PlayerState .equals("no player active"))) { display = nowplayinghandler.Artist + " - " - + nowplayinghandler.Title + - " (" + nowplayinghandler.Actual + ")"; + + nowplayinghandler.Title + " (" + + nowplayinghandler.Actual + ")"; state = nowplayinghandler.PlayerState; } + else + { + display = "nothing playing"; + } return null; } @@ -327,20 +334,18 @@ TextView txt0 = (TextView) findViewById(R.id.main_now_playing); txt0.setText(display); - + ImageButton play = (ImageButton) findViewById(R.id.btn_main_play); - if(state.equals("playing")) - { - play.setImageDrawable(getResources() - .getDrawable(R.drawable.pause)); + if (state.equals("playing")) { + play.setImageDrawable(getResources().getDrawable( + R.drawable.pause)); + } else { + play.setImageDrawable(getResources().getDrawable( + R.drawable.right)); } - else - { - play.setImageDrawable(getResources() - .getDrawable(R.drawable.right)); - } - - mHandler.postDelayed(mUpdateTimeTask, 1000); + + if (doUpdate) + mHandler.postDelayed(mUpdateTimeTask, 1000); } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -13,7 +13,6 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.os.Bundle; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -89,8 +89,9 @@ private Handler mHandler = new Handler(); private static Vibrator vibrate; - final CharSequence[] items = { "Delete item", "Clear playlist", "Cancel" }; + final CharSequence[] items = { "Play item", "Delete item", "Clear playlist", "Cancel" }; private nowplaylisthandler.PlayListItem selectedItem; + private int selectedNo; /** Called when the activity is first created. */ @Override @@ -109,20 +110,27 @@ long arg3) { selectedItem = nowplaylisthandler.PlayList.get(arg2); - + selectedNo = arg2; + AlertDialog.Builder builder = new AlertDialog.Builder(arg0 .getContext()); builder.setTitle(selectedItem.Title); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { switch (item) { - case 0: + case 0: + PostSelectItem(selectedNo); + mHandler.postDelayed(mUpdateTimeTask, 100); + Toast.makeText(nowplaylist.this, + selectedItem.Title + " has been selected", Toast.LENGTH_SHORT).show(); + break; + case 1: PostDeleteItem(selectedItem.Filename); mHandler.postDelayed(mUpdateTimeTask, 100); Toast.makeText(nowplaylist.this, selectedItem.Title + " has been deleted", Toast.LENGTH_SHORT).show(); break; - case 1: + case 2: PostClear(); mHandler.postDelayed(mUpdateTimeTask, 100); Toast.makeText(nowplaylist.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); @@ -171,7 +179,22 @@ post.Post(xml); } + + public void PostSelectItem(int Number) { + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); + + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>SELECT_ITEM</command>"; + xml += "<itemNo>" + Number + "</itemNo>"; + xml += "</message>"; + + post.Post(xml); + } + @Override public void onStart() { super.onStart(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -58,14 +58,13 @@ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pictures); - + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); GridView gridview = (GridView) findViewById(R.id.GridView01); - gridview.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, long id) { @@ -139,7 +138,7 @@ this.dialog.dismiss(); } - if (pictureList.size() == 0) { + if (pictureList == null) { Toast.makeText(pictures.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -59,7 +59,7 @@ private boolean slideShow; private boolean randomShow; public static boolean SlideshowPaused = false; - private static long SlideInterval = 6000; + private static long SlideInterval = 5000; /** Called when the activity is first created. */ @Override @@ -73,7 +73,6 @@ gestureScanner = new GestureDetector(picturesfullscreen.this); new setPicture().execute(); - } private class setPicture extends AsyncTask<String, Void, Void> { Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-19 21:16:06 UTC (rev 4048) @@ -123,11 +123,12 @@ // GET int index1 = clientmessage.IndexOf(' '); int index2 = clientmessage.IndexOf(' ', index1 + 1); - string req = clientmessage.Substring(index1 + 1, index2 - index1).Trim().ToLower(); + string req = clientmessage.Substring(index1 + 1, index2 - index1).Trim(); req = HttpUtility.UrlDecode(req); AndroidServer.logDebug("receive HTTP GET : " + req); + System.Diagnostics.Debug.WriteLine("receive HTTP GET : " + req); if (req.StartsWith("/info")) { @@ -148,14 +149,14 @@ } else { - req = req.Replace("/", "\\"); - - if (req.EndsWith(".jpg")) + if (req.ToLower().EndsWith(".jpg")) { + req = req.Replace("/", "\\"); ReplyPictureFile(req); } - else if (req.EndsWith(".thb")) + else if (req.ToLower().EndsWith(".thb")) { + req = req.Replace("/", "\\"); ReplyPictureThumbFile(req); } else @@ -247,10 +248,9 @@ } else { - req = req.Replace("/", "\\"); - - if (req.EndsWith(".mp3")) + if (req.ToLower().EndsWith(".mp3")) { + req = req.Replace("/", "\\"); ReplyMusicFile(req, msgTyp); } else @@ -369,7 +369,7 @@ private void ExceuteCommand(string Message) { AndroidServer.logDebug("execute command"); - System.Diagnostics.Debug.WriteLine(Message); + //System.Diagnostics.Debug.WriteLine(Message); int x = Message.IndexOf("\r\n\r\n"); if ((x > 0) && (x < Message.Length)) @@ -683,7 +683,7 @@ } #endregion - #region clear playlist + #region playlist if (data["command"] == ("REMOVE_PLAYLIST")) { AndroidServer.logDebug("remove from playlist : " + data["filename"]); @@ -710,6 +710,30 @@ playList.Clear(); } + + if (data["command"] == ("SELECT_ITEM")) + { + AndroidServer.logDebug("select playlist : " + data["itemNo"]); + // parameter = itemNo + + PlayListPlayer playlistPlayer = PlayListPlayer.SingletonPlayer; + if (playlistPlayer.CurrentPlaylistType == PlayListType.PLAYLIST_MUSIC) + { + if (playlistPlayer.g_Player.Playing) + { + int sel = Convert.ToInt32(data["itemNo"]); + + PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); + if (sel < playList.Count) + playlistPlayer.Play(sel); + + } + } + + + + + } #endregion #endregion @@ -720,7 +744,12 @@ IntPtr handle = GUIGraphicsContext.form.Handle; SetForegroundWindow(handle); - SendKeys.SendWait(data["key"]); + if (data["key"] != "{ }") + SendKeys.SendWait(data["key"]); + else + SendKeys.SendWait(" "); + + } #endregion } @@ -822,7 +851,22 @@ else { // dir does not exist - SendErrorURL(Request); + //SendErrorURL(Request); + + string msg = string.Empty; + // header + msg += "HTTP/1.0 200 Ok\r\n"; + msg += "Content-Type: application/xml; charset=utf-8; filename=info.xml" + "\r\n"; + msg += "Proxy-Connection: close" + "\r\n"; + msg += "\r\n"; + // content + msg += "<?xml version=\"1.0\"?>\r\n"; + msg += "<Directory>\r\n"; + msg += "</Directory>\r\n"; + // send + sendMessage(socket, msg); + AndroidServer.logDebug("Reply empty picture dir"); + } #endregion @@ -1208,7 +1252,22 @@ else { // dir does not exist - SendErrorURL(Request); + //SendErrorURL(Request); + + string msg = string.Empty; + // header + msg += "HTTP/1.0 200 Ok\r\n"; + msg += "Content-Type: application/xml; charset=utf-8; filename=info.xml" + "\r\n"; + msg += "Proxy-Connection: close" + "\r\n"; + msg += "\r\n"; + // content + msg += "<?xml version=\"1.0\"?>\r\n"; + msg += "<Directory>\r\n"; + msg += "</Directory>\r\n"; + // send + sendMessage(socket, msg); + AndroidServer.logDebug("Reply empty music dir"); + } #endregion @@ -1964,6 +2023,7 @@ { if (!share.IsFtpShare) { + share.Name = share.Name.Replace("/", "_"); list.Add(share.Name, share.Path); } } @@ -1980,26 +2040,13 @@ } private string GetLocalDir(string Request, Dictionary<string, string> List) { - string folder = string.Empty; - string baseFolder = string.Empty; + string dir = string.Empty; - int x = Request.IndexOf("\\"); - if (x == -1) - { - baseFolder = Request; - } - else - { - baseFolder = Request.Substring(0, x); - folder = Request.Substring(x); - } - - string dir = string.Empty; foreach (KeyValuePair<string, string> pair in List) { - if (pair.Key.ToLower() == (baseFolder.ToLower())) + if (Request.StartsWith(pair.Key)) { - dir = pair.Value + folder; + dir = Request.Replace(pair.Key, pair.Value); return dir; } } 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. |
From: <kro...@us...> - 2010-12-19 16:43:53
|
Revision: 4047 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4047&view=rev Author: kroko_koenig Date: 2010-12-19 16:43:47 +0000 (Sun, 19 Dec 2010) Log Message: ----------- add threads for sd download Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-19 16:43:47 UTC (rev 4047) @@ -20,7 +20,7 @@ <activity android:launchMode="singleInstance" android:name=".Remote_03"></activity> <activity android:name=".pictures" android:launchMode="singleInstance"></activity> <activity android:name=".picturesfullscreen" android:launchMode="singleInstance"></activity> - <activity android:launchMode="singleInstance" android:name=".MusicDir"></activity> + <activity android:launchMode="singleInstance" android:name=".musicDir"></activity> <activity android:name=".setup" android:launchMode="singleInstance"></activity> <activity android:name=".nowplaying" android:launchMode="singleInstance"></activity> <activity android:name=".nowplaylist" android:launchMode="singleInstance"></activity> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-19 16:43:47 UTC (rev 4047) @@ -39,8 +39,9 @@ ------------ Vibration feedback (not completed) switch WIFI on (just msg now) -gesture control for pictures (swipe) / alert dialog save files from Android to MP if the MP has no focus the remote doesnt work (normal) save huge files can cause out of memory, better save stream +playlist select on file (switch to file x) +progress task for downloads Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -5,6 +5,7 @@ import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.net.Uri; +import android.util.Log; public class MediaScannerNotifier implements MediaScannerConnectionClient { private Context mContext; @@ -13,6 +14,9 @@ private String mMimeType; public MediaScannerNotifier(Context context, String path, String mimeType) { + + Log.d("MediaPortal", "MediaScanner " + path + " | " + mimeType); + mContext = context; mPath = path; mMimeType = mimeType; @@ -21,10 +25,17 @@ } public void onMediaScannerConnected() { + + Log.d("MediaPortal", "MediaScanner connected"); + mConnection.scanFile(mPath, mMimeType); + Log.d("MediaScanner", "scanner connected"); } public void onScanCompleted(String path, Uri uri) { + + Log.d("MediaPortal", "MediaScanner completed"); + // OPTIONAL: scan is complete, this will cause the viewer to render it try { if (uri != null) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -46,12 +46,15 @@ import android.widget.AdapterView.OnItemClickListener; import android.widget.Toast; -public class MusicDir extends Activity { +public class musicDir extends Activity { + private Context myParent; + private Handler mHandler = new Handler(); private static Vibrator vibrate; private String actualDir = ""; + private String downloadFile = ""; private static ArrayList<ReceiveDirectoryXmlHandler.DirItems> musicList; private static ReceiveDirectoryXmlHandler.DirItems selectedItem; @@ -64,6 +67,8 @@ super.onCreate(savedInstanceState); setContentView(R.layout.music); + myParent = this.getApplicationContext(); + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); @@ -97,24 +102,19 @@ + selectedItem.File.replaceAll( " ", "%20")); Toast.makeText( - MusicDir.this, + musicDir.this, selectedItem.File + " has been added", Toast.LENGTH_SHORT).show(); break; case 1: PostClear(); - Toast.makeText(MusicDir.this, + Toast.makeText(musicDir.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); break; case 2: SavetoSDCard(selectedItem.File); - Toast.makeText( - MusicDir.this, - selectedItem.File - + " has been transferd", - Toast.LENGTH_SHORT).show(); break; } } @@ -182,14 +182,8 @@ private void SavetoSDCard(String File) { - httpHandler h = new httpHandler(); - h.DownloadFile(File , actualDir); - - String sd = Environment.getExternalStorageDirectory().toString(); - - @SuppressWarnings("unused") - MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" - + File, "audio/mpeg"); + downloadFile = File; + new download().execute(); } private Runnable mUpdateTimeTask = new Runnable() { @@ -199,7 +193,7 @@ }; private class update extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(MusicDir.this); + private final ProgressDialog dialog = new ProgressDialog(musicDir.this); // can use UI thread here protected void onPreExecute() { @@ -224,15 +218,50 @@ } if (musicList.size() == 0) { - Toast.makeText(MusicDir.this, "TIME OUT SERVER", + Toast.makeText(musicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { GridView gridview = (GridView) findViewById(R.id.music_grid); - gridview.setAdapter(new ImageAdapter2(MusicDir.this)); + gridview.setAdapter(new ImageAdapter2(musicDir.this)); } } } + private class download extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(musicDir.this); + // can use UI thread here + protected void onPreExecute() { + this.dialog.setMessage("save to sd card..."); + this.dialog.show(); + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + Log.d("MediaPortal", "download starts"); + + httpHandler h = new httpHandler(); + h.DownloadFile(downloadFile , actualDir); + + return null; + } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + this.dialog.dismiss(); + } + + Toast.makeText(musicDir.this, + selectedItem.File + " has been saved.", Toast.LENGTH_SHORT).show(); + + Log.d("MediaPortal", "download ends"); + + String sd = Environment.getExternalStorageDirectory().toString(); + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(myParent, sd + "/" + downloadFile, "audio/mpeg"); + } + } + private static void DoVibrate() { if (Settings.Vibrate) { vibrate.vibrate(100); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -16,6 +16,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Environment; +import android.util.Log; public class httpHandler { @@ -78,6 +79,7 @@ public void DownloadFileByID(String Filename, String ID) { + Log.d("MediaPortal", "get file: " + Filename); extStorageDirectory = Environment.getExternalStorageDirectory() .toString(); @@ -85,26 +87,33 @@ InputStream in = openHttpConnection("http://" + Settings.Server + ":" + Settings.Port + "/db_music/getfile?id=" + ID); - // BufferedInputStream bis = new BufferedInputStream(in); - ByteArrayBuffer baf = new ByteArrayBuffer(50); - // int current = 0; + if (in != null) { + // BufferedInputStream bis = new BufferedInputStream(in); + ByteArrayBuffer baf = new ByteArrayBuffer(50); + // int current = 0; - OutputStream outStream = null; - File file = new File(extStorageDirectory, Filename); - outStream = new FileOutputStream(file); - - byte[] bb = new byte[1024]; - int l = in.read(bb, 0, 1024); + OutputStream outStream = null; + File file = new File(extStorageDirectory, Filename); + outStream = new FileOutputStream(file); + + int size = 0; + + byte[] bb = new byte[1024]; + int l = in.read(bb, 0, 1024); - while (l > -0) { - //baf.append(bb, 0, l); - outStream.write(bb); - l = in.read(bb, 0, 1024); + while (l > -0) { + size += l; + //baf.append(bb, 0, l); + outStream.write(bb,0,l); + l = in.read(bb, 0, 1024); + } + + //outStream.write(baf.toByteArray()); + outStream.flush(); + outStream.close(); + + Log.d("MediaPortal", "finshed size: " + size); } - - //outStream.write(baf.toByteArray()); - outStream.flush(); - outStream.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block @@ -116,14 +125,15 @@ } public void DownloadFile(String Filename, String Path) { - + + Log.d("MediaPortal", "get file: " + Filename); extStorageDirectory = Environment.getExternalStorageDirectory() .toString(); try { InputStream in = openHttpConnection("http://" + Settings.Server - + ":" + Settings.Port + "/music/" + Path + Filename.replaceAll( - " ", "%20")); + + ":" + Settings.Port + "/music/" + Path + + Filename.replaceAll(" ", "%20")); if (in != null) { // BufferedInputStream bis = new BufferedInputStream(in); @@ -133,19 +143,24 @@ OutputStream outStream = null; File file = new File(extStorageDirectory, Filename); outStream = new FileOutputStream(file); + + int size = 0; byte[] bb = new byte[1024]; int l = in.read(bb, 0, 1024); while (l > -0) { - //baf.append(bb, 0, l); - outStream.write(bb); + size += l; + // baf.append(bb, 0, l); + outStream.write(bb, 0, l); l = in.read(bb, 0, 1024); } - //outStream.write(baf.toByteArray()); + // outStream.write(baf.toByteArray()); outStream.flush(); outStream.close(); + + Log.d("MediaPortal", "finshed size: " + size); } } catch (FileNotFoundException e) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -226,8 +226,8 @@ final android.net.NetworkInfo wifi = connMgr .getNetworkInfo(ConnectivityManager.TYPE_WIFI); - final android.net.NetworkInfo mobile = connMgr - .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); + //final android.net.NetworkInfo mobile = connMgr + // .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (!wifi.isAvailable()) { Toast.makeText(this, "Warning : Wifi is not available !", Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -51,6 +51,8 @@ Artist,Album; } + private Context myParent; + private Handler mHandler = new Handler(); private static Vibrator vibrate; @@ -58,6 +60,8 @@ public static String Select = ""; public static SelectMode Mode; + private static String downloadFile = ""; + private static String downloadID = ""; ReceiveDbXmlHandler.DbItems selectedItem = null; final CharSequence[] items = { "Add to playlist", "Clear playlist", @@ -67,6 +71,8 @@ super.onCreate(savedInstanceState); setContentView(R.layout.music_results); + myParent = this.getApplicationContext(); + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); @@ -103,8 +109,6 @@ break; case 2: SavetoSDCard(selectedItem); - Toast.makeText(musicResults.this, - selectedItem.Title + " has been transferd", Toast.LENGTH_SHORT).show(); break; } } @@ -146,16 +150,11 @@ post.Post(xml); } private void SavetoSDCard(ReceiveDbXmlHandler.DbItems Item) { - - String filename = Item.Artist + " - " + Item.Title + ".mp3"; - String id = Item.ID; + + downloadFile = Item.Artist + " - " + Item.Title + ".mp3";; + downloadID = Item.ID; - httpHandler h = new httpHandler(); - h.DownloadFileByID(filename,id); - - String sd = Environment.getExternalStorageDirectory().toString(); - @SuppressWarnings("unused") - MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); + new download().execute(); } private Runnable mUpdateTimeTask = new Runnable() { @@ -201,6 +200,41 @@ } } } + private class download extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(musicResults.this); + + // can use UI thread here + protected void onPreExecute() { + this.dialog.setMessage("save to sd card..."); + this.dialog.show(); + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + Log.d("MediaPortal", "download starts"); + + httpHandler h = new httpHandler(); + h.DownloadFileByID(downloadFile,downloadID); + + return null; + } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + this.dialog.dismiss(); + } + + Toast.makeText(musicResults.this, + selectedItem.Title + " has been saved.", Toast.LENGTH_SHORT).show(); + + Log.d("MediaPortal", "download ends"); + + String sd = Environment.getExternalStorageDirectory().toString(); + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(myParent, sd + "/" + downloadFile, "audio/mpeg"); + } + } private static void DoVibrate() { if (Settings.Vibrate) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -58,7 +58,7 @@ .setContent(intent); tabHost.addTab(spec); - intent = new Intent().setClass(this, MusicDir.class); + intent = new Intent().setClass(this, musicDir.class); spec = tabHost.newTabSpec("music") .setIndicator("Music", res.getDrawable(R.drawable.ic_tab4)) .setContent(intent); Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) 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. |
From: <kro...@us...> - 2010-12-19 13:44:31
|
Revision: 4046 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4046&view=rev Author: kroko_koenig Date: 2010-12-19 13:44:24 +0000 (Sun, 19 Dec 2010) Log Message: ----------- more vibrations and mp3 fix with menu now Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Release/Android Server communication.docx trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -25,11 +25,15 @@ import mediaportal.remote.R; import mediaportal.remote.ReceiveDirectoryXmlHandler.DirItems; import android.app.Activity; +import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; +import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; +import android.os.Environment; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -45,11 +49,16 @@ public class MusicDir extends Activity { private Handler mHandler = new Handler(); + private static Vibrator vibrate; + private String actualDir = ""; private static ArrayList<ReceiveDirectoryXmlHandler.DirItems> musicList; - private static ReceiveDirectoryXmlHandler.DirItems selectedItem; - + private static ReceiveDirectoryXmlHandler.DirItems selectedItem; + + final CharSequence[] items = { "Add to playlist", "Clear playlist", + "Save to SD card", "Cancel" }; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -58,6 +67,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + GridView gridview = (GridView) findViewById(R.id.music_grid); gridview.setOnItemClickListener(new OnItemClickListener() { @@ -67,12 +78,49 @@ ImageView iv = (ImageView) v.findViewById(R.id.icon_image); musicItem music = (musicItem) iv.getTag(); + DoVibrate(); + if (music.typ == "item") { - selectedItem = musicList.get(position); - PostAddFile(actualDir + selectedItem.File.replaceAll(" ", "%20")); - - Toast.makeText(MusicDir.this, - selectedItem.File + " has been added", Toast.LENGTH_SHORT).show(); + selectedItem = musicList.get(position-1); + + AlertDialog.Builder builder = new AlertDialog.Builder( + parent.getContext()); + + builder.setTitle(selectedItem.File); + builder.setItems(items, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int item) { + switch (item) { + case 0: + PostAddFile(actualDir + + selectedItem.File.replaceAll( + " ", "%20")); + Toast.makeText( + MusicDir.this, + selectedItem.File + + " has been added", + Toast.LENGTH_SHORT).show(); + break; + case 1: + PostClear(); + Toast.makeText(MusicDir.this, + "Playlist has been cleared", + Toast.LENGTH_SHORT).show(); + break; + case 2: + SavetoSDCard(selectedItem.File); + Toast.makeText( + MusicDir.this, + selectedItem.File + + " has been transferd", + Toast.LENGTH_SHORT).show(); + break; + } + } + }); + AlertDialog alert = builder.create(); + alert.show(); } if (music.typ == "folder") { @@ -100,6 +148,20 @@ }); } + public void PostClear() { + + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); + + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>CLEAR_PLAYLIST</command>"; + xml += "</message>"; + + post.Post(xml); + } + public void PostAddFile(String Filename) { PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); @@ -118,6 +180,18 @@ post.Post(xml); } + private void SavetoSDCard(String File) { + + httpHandler h = new httpHandler(); + h.DownloadFile(File , actualDir); + + String sd = Environment.getExternalStorageDirectory().toString(); + + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + + File, "audio/mpeg"); + } + private Runnable mUpdateTimeTask = new Runnable() { public void run() { new update().execute(); @@ -150,15 +224,21 @@ } if (musicList.size() == 0) { - Toast.makeText(MusicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT) - .show(); + Toast.makeText(MusicDir.this, "TIME OUT SERVER", + Toast.LENGTH_SHORT).show(); } else { GridView gridview = (GridView) findViewById(R.id.music_grid); gridview.setAdapter(new ImageAdapter2(MusicDir.this)); } } } - + + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + public class ImageAdapter2 extends BaseAdapter { private Context mContext; public static final int ACTIVITY_CREATE = 10; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -37,15 +37,15 @@ public class ReceiveHandler { private org.xml.sax.ContentHandler _handler; - + public ReceiveHandler(org.xml.sax.ContentHandler Handler) { _handler = Handler; } - - public void readValues(String Url) - { - String fileUrl = "http://" + Settings.Server + ":" + Settings.Port + Url; + public void readValues(String Url) { + String fileUrl = "http://" + Settings.Server + ":" + Settings.Port + + Url; + URL myFileUrl = null; try { myFileUrl = new URL(fileUrl); @@ -91,13 +91,18 @@ e.printStackTrace(); } is.close(); - sp.reset(); + + try { + sp.reset(); + } catch (Exception e) { + // if not supported ... + } + } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } - - + } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -76,31 +76,33 @@ return bitmap; } - public void DownloadFile(String Filename, String ID) { - - extStorageDirectory = Environment.getExternalStorageDirectory().toString(); - + public void DownloadFileByID(String Filename, String ID) { + + extStorageDirectory = Environment.getExternalStorageDirectory() + .toString(); + try { - InputStream in = openHttpConnection("http://"+ Settings.Server + ":" + Settings.Port + - "/db_music/getfile?id=" + ID); + InputStream in = openHttpConnection("http://" + Settings.Server + + ":" + Settings.Port + "/db_music/getfile?id=" + ID); // BufferedInputStream bis = new BufferedInputStream(in); ByteArrayBuffer baf = new ByteArrayBuffer(50); - //int current = 0; + // int current = 0; + OutputStream outStream = null; + File file = new File(extStorageDirectory, Filename); + outStream = new FileOutputStream(file); + byte[] bb = new byte[1024]; int l = in.read(bb, 0, 1024); while (l > -0) { - baf.append(bb, 0, l); + //baf.append(bb, 0, l); + outStream.write(bb); l = in.read(bb, 0, 1024); } - - OutputStream outStream = null; - File file = new File(extStorageDirectory, Filename); - - outStream = new FileOutputStream(file); - outStream.write(baf.toByteArray()); + + //outStream.write(baf.toByteArray()); outStream.flush(); outStream.close(); @@ -113,4 +115,46 @@ } } + public void DownloadFile(String Filename, String Path) { + + extStorageDirectory = Environment.getExternalStorageDirectory() + .toString(); + + try { + InputStream in = openHttpConnection("http://" + Settings.Server + + ":" + Settings.Port + "/music/" + Path + Filename.replaceAll( + " ", "%20")); + + if (in != null) { + // BufferedInputStream bis = new BufferedInputStream(in); + ByteArrayBuffer baf = new ByteArrayBuffer(50); + // int current = 0; + + OutputStream outStream = null; + File file = new File(extStorageDirectory, Filename); + outStream = new FileOutputStream(file); + + byte[] bb = new byte[1024]; + int l = in.read(bb, 0, 1024); + + while (l > -0) { + //baf.append(bb, 0, l); + outStream.write(bb); + l = in.read(bb, 0, 1024); + } + + //outStream.write(baf.toByteArray()); + outStream.flush(); + outStream.close(); + } + + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -45,6 +45,7 @@ public class musicAlbum extends Activity { private Handler mHandler = new Handler(); + private static Vibrator vibrate; private static ArrayList<ReceiveDbXmlHandler.DbItems> albumList; @@ -55,6 +56,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ListView l1 = (ListView) findViewById(R.id.list_album); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() @@ -67,6 +70,8 @@ musicResults.Select = item.Album + "&" + item.Artist; musicResults.Mode = musicResults.SelectMode.Album; + musicAlbum.DoVibrate(); + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); startActivityForResult(myIntent, 0); } @@ -116,16 +121,15 @@ listview.setAdapter(new EfficientAdapter(musicAlbum.this)); } } - - public void DoVibrate() { - if (Settings.Vibrate) { - // Get instance of Vibrator from current Context - Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - v.vibrate(100); - } + + } + + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); } } - + private static class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -44,9 +44,9 @@ public class musicArtist extends Activity { - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); - + private static Vibrator vibrate; + private static ArrayList<ReceiveDbXmlHandler.DbItems> artistList; public void onCreate(Bundle savedInstanceState) { @@ -56,6 +56,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ListView l1 = (ListView) findViewById(R.id.list_artist); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -67,6 +69,8 @@ musicResults.Select = item.Artist; musicResults.Mode = musicResults.SelectMode.Artist; + musicArtist.DoVibrate(); + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); startActivityForResult(myIntent, 0); @@ -118,15 +122,15 @@ } } - public void DoVibrate() { - if (Settings.Vibrate) { - // Get instance of Vibrator from current Context - Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - v.vibrate(100); - } + + } + + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); } } - + private static class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -33,6 +33,7 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -50,9 +51,9 @@ Artist,Album; } - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); - + private static Vibrator vibrate; + private static ArrayList<ReceiveDbXmlHandler.DbItems> itemList; public static String Select = ""; @@ -69,6 +70,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ListView l1 = (ListView) findViewById(R.id.list_result); ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); @@ -81,6 +84,8 @@ selectedItem = itemList.get(arg2); + DoVibrate(); + AlertDialog.Builder builder = new AlertDialog.Builder(arg0 .getContext()); builder.setTitle(selectedItem.Title); @@ -146,10 +151,11 @@ String id = Item.ID; httpHandler h = new httpHandler(); - h.DownloadFile(filename,id); + h.DownloadFileByID(filename,id); String sd = Environment.getExternalStorageDirectory().toString(); - MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); } private Runnable mUpdateTimeTask = new Runnable() { @@ -196,6 +202,12 @@ } } + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + private static class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -33,6 +33,7 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -46,7 +47,8 @@ public class musicSong extends Activity { private Handler mHandler = new Handler(); - + private static Vibrator vibrate; + private static ArrayList<ReceiveDbXmlHandler.DbItems> songList; public static String Select = ""; @@ -62,6 +64,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ListView l1 = (ListView) findViewById(R.id.list_song); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -69,6 +73,8 @@ long arg3) { selectedItem = songList.get(arg2); + + DoVibrate(); AlertDialog.Builder builder = new AlertDialog.Builder(arg0 .getContext()); @@ -144,6 +150,12 @@ } } + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + public void PostClear() { PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); @@ -180,7 +192,7 @@ String id = Item.ID; httpHandler h = new httpHandler(); - h.DownloadFile(filename,id); + h.DownloadFileByID(filename,id); String sd = Environment.getExternalStorageDirectory().toString(); MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -2,7 +2,6 @@ import java.io.IOException; import java.io.InputStream; - import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; @@ -11,14 +10,15 @@ import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; - import android.app.Activity; +import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.os.Bundle; import android.os.Handler; +import android.os.Vibrator; import android.view.View; import android.widget.ImageButton; import android.widget.ImageView; @@ -28,10 +28,10 @@ public class nowplaying extends Activity { - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - private static String lastTitle = ""; + private Handler mHandler = new Handler(); + private static Vibrator vibrate; /** Called when the activity is first created. */ @Override @@ -39,6 +39,8 @@ super.onCreate(savedInstanceState); setContentView(R.layout.playingnow); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ImageButton btn1 = (ImageButton) findViewById(R.id.now_prev); ImageButton btn2 = (ImageButton) findViewById(R.id.now_stop); ImageButton btn4 = (ImageButton) findViewById(R.id.now_play); @@ -98,11 +100,9 @@ }; private void update() { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; nowplayinghandler handler = nowplayinghandler.getinstance(); handler.setconnection(HttpServer, HttpPort); @@ -178,11 +178,11 @@ } public void PostCommand(String button) { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + + DoVibrate(); - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; HttpParams httpParameters = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(httpParameters, 3000); @@ -228,4 +228,10 @@ } } + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -7,10 +7,10 @@ public class nowplayingXmlHandler extends DefaultHandler { Boolean currentElement = false; String currentValue = null; - + /** * Called when tag starts ( example:- <name>AndroidPeople</name> -- <name> ) - */ + */ @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -103,8 +103,15 @@ e.printStackTrace(); } is.close(); - sp.reset(); + try { + sp.reset(); + } + catch (Exception e) + { + // if not supported ... + } + result = true; } catch (IOException e) { @@ -115,5 +122,4 @@ return result; } - } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -2,7 +2,6 @@ import java.io.IOException; import java.io.InputStream; - import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; @@ -11,17 +10,16 @@ import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; - import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; -import android.content.SharedPreferences; import android.content.res.AssetManager; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.os.Handler; +import android.os.Vibrator; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -88,8 +86,8 @@ } } - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); + private static Vibrator vibrate; final CharSequence[] items = { "Delete item", "Clear playlist", "Cancel" }; private nowplaylisthandler.PlayListItem selectedItem; @@ -103,6 +101,8 @@ ListView l1 = (ListView) findViewById(R.id.ListView01); l1.setAdapter(new EfficientAdapter(this)); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { // @override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, @@ -187,11 +187,9 @@ }; private void update() { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; nowplaylisthandler handler = nowplaylisthandler.getinstance(); handler.setconnection(HttpServer, HttpPort); @@ -209,12 +207,11 @@ public void PostCommand(String button) { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + DoVibrate(); + + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); - HttpParams httpParameters = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(httpParameters, 3000); HttpConnectionParams.setSoTimeout(httpParameters, 3000); @@ -259,4 +256,10 @@ } } + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -106,8 +106,13 @@ e.printStackTrace(); } is.close(); - sp.reset(); + try { + sp.reset(); + } catch (Exception e) { + // if not supported ... + } + result = true; } catch (IOException e) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -31,6 +31,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -46,6 +47,8 @@ public class pictures extends Activity { private Handler mHandler = new Handler(); + private static Vibrator vibrate; + public static String actualDir = ""; public static ArrayList<ReceiveDirectoryXmlHandler.DirItems> pictureList; @@ -59,6 +62,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + GridView gridview = (GridView) findViewById(R.id.GridView01); gridview.setOnItemClickListener(new OnItemClickListener() { @@ -68,6 +73,8 @@ ImageView iv = (ImageView) v.findViewById(R.id.icon_image); picItem pic = (picItem) iv.getTag(); + DoVibrate(); + if (pic.typ == "item") { selectedPicture = position - 1; Intent myIntent = new Intent(pictures.this, @@ -141,6 +148,12 @@ } } } + + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } public class ImageAdapter2 extends BaseAdapter { private Context mContext; Modified: trunk/plugins/AndroidRemote/Release/Android Server communication.docx =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-19 13:44:24 UTC (rev 4046) @@ -1216,9 +1216,12 @@ } private void ReplyMusicFile(string Filename, string Mode) { - if (File.Exists(Filename)) + directoryList = GetMpShare("music"); + string dir = GetLocalDir(Filename, directoryList); + + if (File.Exists(dir)) { - byte[] b = FileToByteArray(Filename); + byte[] b = FileToByteArray(dir); string msg = string.Empty; // header 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. |
From: <che...@us...> - 2010-12-19 12:43:47
|
Revision: 4045 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4045&view=rev Author: chemelli_sf Date: 2010-12-19 12:43:40 +0000 (Sun, 19 Dec 2010) Log Message: ----------- Fixed online location of MPEI package Modified Paths: -------------- trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.4.mpe1 trunk/plugins/ItalyLogos/package/ItalyLogos.xmp2 trunk/plugins/ItalyLogos/update.xml Modified: trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.4.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/package/ItalyLogos.xmp2 =================================================================== --- trunk/plugins/ItalyLogos/package/ItalyLogos.xmp2 2010-12-18 03:20:43 UTC (rev 4044) +++ trunk/plugins/ItalyLogos/package/ItalyLogos.xmp2 2010-12-19 12:43:40 UTC (rev 4045) @@ -6081,13 +6081,6 @@ <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> <Param1 /> <UpdateOption>AlwaysOverwrite</UpdateOption> - <LocalFileName>..\logos\TV\logos\Thumbs.db</LocalFileName> - <ZipFileName>Installer{CopyFile}\{91b9d2ca-5343-4cab-913f-78730c130388}-Thumbs.db</ZipFileName> - <DestinationFilename>%Thumbs%\TV\logos\Thumbs.db</DestinationFilename> - </FileItem> - <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> - <Param1 /> - <UpdateOption>AlwaysOverwrite</UpdateOption> <LocalFileName>..\logos\TV\logos\tlc telecampione.png</LocalFileName> <ZipFileName>Installer{CopyFile}\{dc87e11a-1ea2-4dd5-a9fb-847b7be76f6e}-tlc telecampione.png</ZipFileName> <DestinationFilename>%Thumbs%\TV\logos\tlc telecampione.png</DestinationFilename> @@ -6193,10 +6186,108 @@ <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> <Param1 /> <UpdateOption>AlwaysOverwrite</UpdateOption> - <LocalFileName>..\logos\Radio\Thumbs.db</LocalFileName> - <ZipFileName>Installer{CopyFile}\{1f18c8d5-f09f-4fc0-85a1-fb755e2c9bab}-Thumbs.db</ZipFileName> - <DestinationFilename>%Thumbs%\Radio\Thumbs.db</DestinationFilename> + <LocalFileName>..\logos\TV\logos\-frisbee-.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{16cb9a2f-9362-4d19-9883-ce06d706f9bf}--frisbee-.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\-frisbee-.png</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\axn +1.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{81abf8cb-039b-4ca9-b582-6efcc1d21e10}-axn +1.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\axn +1.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\axn hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{6b5d31c8-6ee3-4926-aa0a-f371119c473e}-axn hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\axn hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\caccia e pesca +.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{4056e2b4-0867-4ae0-9948-1eb17e079a42}-caccia e pesca +.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\caccia e pesca +.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinema +1 hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{9dadfca5-9f25-40b9-912a-e546b020de71}-cinema +1 hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinema +1 hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinema italia hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{5e421fd3-808a-4de0-8773-aa994c5b7436}-cinema italia hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinema italia hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinema itv.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{ea77ecc4-de44-4a62-b85c-cee831e57aea}-cinema itv.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinema itv.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinemafamilyhd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{da536aa5-cb70-44c5-a477-f1ba369806d0}-cinemafamilyhd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinemafamilyhd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinemamaniahd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{64802b77-c25b-4bd2-9d3d-2f7da1c39f75}-cinemamaniahd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinemamaniahd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\classics hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{2e58e7d0-907c-4793-bad5-e59c1f4e9214}-classics hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\classics hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\deasuper.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{a434489a-0bd9-4bab-8a16-f7c37cbd7c2a}-deasuper.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\deasuper.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\dovetv.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{0b6e3a53-66b1-405d-aa4e-a76bf8fa30e2}-dovetv.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\dovetv.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\playhouse +.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{af8414ce-8dd1-45a5-9aa8-12dcfd571638}-playhouse +.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\playhouse +.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\premium cinema hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{a298edd7-c122-4e50-9cdf-5727ee137739}-premium cinema hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\premium cinema hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\rai sport 2.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{9f50a9ff-e905-4efa-abc1-466aaba6440a}-rai sport 2.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\rai sport 2.png</DestinationFilename> + </FileItem> </Items> </Files> </GroupItem> @@ -6320,7 +6411,7 @@ <Major>1</Major> <Minor>0</Minor> <Build>0</Build> - <Revision>3</Revision> + <Revision>4</Revision> </Version> <ExtensionDescription>This package will copy all TV and Radio logos for Italian stations broacasted on Analog, DVB-T @@ -6331,10 +6422,10 @@ 13°E Hotbird </ExtensionDescription> - <VersionDescription>Some logos updates + <VersionDescription>Some logos updates </VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.3.mpe1</OnlineLocation> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.[Version].mpe1</OnlineLocation> <ReleaseDate>2010-12-06T19:14:51</ReleaseDate> <Tags>logos</Tags> <Location>..\ItalyLogos v.[Version].mpe1</Location> @@ -12444,13 +12535,6 @@ <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> <Param1 /> <UpdateOption>AlwaysOverwrite</UpdateOption> - <LocalFileName>..\logos\TV\logos\Thumbs.db</LocalFileName> - <ZipFileName>Installer{CopyFile}\{91b9d2ca-5343-4cab-913f-78730c130388}-Thumbs.db</ZipFileName> - <DestinationFilename>%Thumbs%\TV\logos\Thumbs.db</DestinationFilename> - </FileItem> - <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> - <Param1 /> - <UpdateOption>AlwaysOverwrite</UpdateOption> <LocalFileName>..\logos\TV\logos\tlc telecampione.png</LocalFileName> <ZipFileName>Installer{CopyFile}\{dc87e11a-1ea2-4dd5-a9fb-847b7be76f6e}-tlc telecampione.png</ZipFileName> <DestinationFilename>%Thumbs%\TV\logos\tlc telecampione.png</DestinationFilename> @@ -12556,15 +12640,113 @@ <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> <Param1 /> <UpdateOption>AlwaysOverwrite</UpdateOption> - <LocalFileName>..\logos\Radio\Thumbs.db</LocalFileName> - <ZipFileName>Installer{CopyFile}\{1f18c8d5-f09f-4fc0-85a1-fb755e2c9bab}-Thumbs.db</ZipFileName> - <DestinationFilename>%Thumbs%\Radio\Thumbs.db</DestinationFilename> + <LocalFileName>..\logos\TV\logos\-frisbee-.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{16cb9a2f-9362-4d19-9883-ce06d706f9bf}--frisbee-.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\-frisbee-.png</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\axn +1.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{81abf8cb-039b-4ca9-b582-6efcc1d21e10}-axn +1.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\axn +1.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\axn hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{6b5d31c8-6ee3-4926-aa0a-f371119c473e}-axn hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\axn hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\caccia e pesca +.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{4056e2b4-0867-4ae0-9948-1eb17e079a42}-caccia e pesca +.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\caccia e pesca +.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinema +1 hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{9dadfca5-9f25-40b9-912a-e546b020de71}-cinema +1 hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinema +1 hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinema italia hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{5e421fd3-808a-4de0-8773-aa994c5b7436}-cinema italia hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinema italia hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinema itv.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{ea77ecc4-de44-4a62-b85c-cee831e57aea}-cinema itv.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinema itv.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinemafamilyhd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{da536aa5-cb70-44c5-a477-f1ba369806d0}-cinemafamilyhd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinemafamilyhd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\cinemamaniahd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{64802b77-c25b-4bd2-9d3d-2f7da1c39f75}-cinemamaniahd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\cinemamaniahd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\classics hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{2e58e7d0-907c-4793-bad5-e59c1f4e9214}-classics hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\classics hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\deasuper.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{a434489a-0bd9-4bab-8a16-f7c37cbd7c2a}-deasuper.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\deasuper.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\dovetv.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{0b6e3a53-66b1-405d-aa4e-a76bf8fa30e2}-dovetv.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\dovetv.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\playhouse +.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{af8414ce-8dd1-45a5-9aa8-12dcfd571638}-playhouse +.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\playhouse +.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\premium cinema hd.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{a298edd7-c122-4e50-9cdf-5727ee137739}-premium cinema hd.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\premium cinema hd.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\logos\TV\logos\rai sport 2.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{9f50a9ff-e905-4efa-abc1-466aaba6440a}-rai sport 2.png</ZipFileName> + <DestinationFilename>%Thumbs%\TV\logos\rai sport 2.png</DestinationFilename> + </FileItem> <FileItem InstallType="CopyFile" SystemFile="true" Modified="true"> <Param1 /> <UpdateOption>OverwriteIfOlder</UpdateOption> <LocalFileName>ItalyFlag.png</LocalFileName> - <ZipFileName>Installer{CopyFile}\{16b0205b-9516-4a13-a896-ddbde51e458b}-ItalyFlag.png</ZipFileName> + <ZipFileName>Installer{CopyFile}\{fd9267ea-0fc7-414b-991e-98ac45b1af9c}-ItalyFlag.png</ZipFileName> <DestinationFilename /> </FileItem> </Items> Modified: trunk/plugins/ItalyLogos/update.xml =================================================================== --- trunk/plugins/ItalyLogos/update.xml 2010-12-18 03:20:43 UTC (rev 4044) +++ trunk/plugins/ItalyLogos/update.xml 2010-12-19 12:43:40 UTC (rev 4045) @@ -32,279 +32,6 @@ <Major>1</Major> <Minor>0</Minor> <Build>0</Build> - <Revision>1</Revision> - </Version> - <ExtensionDescription>This package will copy all TV and Radio logos for Italian stations broacasted on: - - - - -DVB-T - - -Analog - - -13°E Hotbird -</ExtensionDescription> - <VersionDescription /> - <DevelopmentStatus>Stable</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.1.mpe1</OnlineLocation> - <ReleaseDate>2010-06-25T19:14:51</ReleaseDate> - <Tags>logos</Tags> - <Location>..\ItalyLogos v.[Version].mpe1</Location> - <Params> - <Items> - <SectionParam Name="Icon"> - <Value>C:\svnroot\mp-plugins\trunk\plugins\ItalyLogos\package\ItalyFlag.png</Value> - <ValueType>File</ValueType> - <Description>The icon file of the package (jpg,png,bmp)</Description> - </SectionParam> - <SectionParam Name="Online Icon"> - <Value /> - <ValueType>String</ValueType> - <Description>The icon file of the package stored online (jpg,png,bmp)</Description> - </SectionParam> - <SectionParam Name="Configuration file"> - <Value /> - <ValueType>Template</ValueType> - <Description>The file used to configure the extension. - If have .exe extension the will be executed - If have .dll extension used like MP plugin configuration</Description> - </SectionParam> - <SectionParam Name="Online Screenshots"> - <Value /> - <ValueType>String</ValueType> - <Description>Online stored screenshot urls separated by ; </Description> - </SectionParam> - <SectionParam Name="Force to uninstall on update"> - <Value>yes</Value> - <ValueType>Bool</ValueType> - <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> - </SectionParam> - </Items> - </Params> - </GeneralInfo> - <UniqueFileList> - <Items /> - </UniqueFileList> - <ProjectSettings> - <FolderGroups /> - </ProjectSettings> - </PackageClass> - <PackageClass> - <Version>2.0</Version> - <Groups> - <Items> - <GroupItem Name="Default"> - <DisplayName>Default</DisplayName> - <DefaulChecked>true</DefaulChecked> - <Description>Default</Description> - <Files> - <Items /> - </Files> - </GroupItem> - </Items> - </Groups> - <Sections> - <Items /> - </Sections> - <Dependencies> - <Items /> - </Dependencies> - <GeneralInfo> - <Name>Italy logos Tv and Radio</Name> - <Id>784949ad-7eed-4541-9ec8-edc0cb6a3521</Id> - <Author>Various</Author> - <HomePage /> - <ForumPage /> - <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/update.xml</UpdateUrl> - <Version> - <Major>1</Major> - <Minor>0</Minor> - <Build>0</Build> - <Revision>2</Revision> - </Version> - <ExtensionDescription>This package will copy all TV and Radio logos for Italian stations broacasted on: - - - - - -DVB-T - - - -Analog - - - -13°E Hotbird -</ExtensionDescription> - <VersionDescription /> - <DevelopmentStatus>Stable</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.2.mpe1</OnlineLocation> - <ReleaseDate>2010-08-21T19:14:51</ReleaseDate> - <Tags>logos</Tags> - <Location>..\ItalyLogos v.[Version].mpe1</Location> - <Params> - <Items> - <SectionParam Name="Icon"> - <Value>C:\svnroot\mp-plugins\trunk\plugins\ItalyLogos\package\ItalyFlag.png</Value> - <ValueType>File</ValueType> - <Description>The icon file of the package (jpg,png,bmp)</Description> - </SectionParam> - <SectionParam Name="Online Icon"> - <Value /> - <ValueType>String</ValueType> - <Description>The icon file of the package stored online (jpg,png,bmp)</Description> - </SectionParam> - <SectionParam Name="Configuration file"> - <Value /> - <ValueType>Template</ValueType> - <Description>The file used to configure the extension. - If have .exe extension the will be executed - If have .dll extension used like MP plugin configuration</Description> - </SectionParam> - <SectionParam Name="Online Screenshots"> - <Value /> - <ValueType>String</ValueType> - <Description>Online stored screenshot urls separated by ; </Description> - </SectionParam> - <SectionParam Name="Force to uninstall on update"> - <Value>yes</Value> - <ValueType>Bool</ValueType> - <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> - </SectionParam> - </Items> - </Params> - </GeneralInfo> - <UniqueFileList> - <Items /> - </UniqueFileList> - <ProjectSettings> - <FolderGroups /> - </ProjectSettings> - </PackageClass> - <PackageClass> - <Version>2.0</Version> - <Groups> - <Items> - <GroupItem Name="Default"> - <DisplayName>Default</DisplayName> - <DefaulChecked>true</DefaulChecked> - <Description>Default</Description> - <Files> - <Items /> - </Files> - </GroupItem> - </Items> - </Groups> - <Sections> - <Items /> - </Sections> - <Dependencies> - <Items /> - </Dependencies> - <GeneralInfo> - <Name>Italy logos Tv and Radio</Name> - <Id>784949ad-7eed-4541-9ec8-edc0cb6a3521</Id> - <Author>Various</Author> - <HomePage /> - <ForumPage /> - <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/update.xml</UpdateUrl> - <Version> - <Major>1</Major> - <Minor>0</Minor> - <Build>0</Build> - <Revision>3</Revision> - </Version> - <ExtensionDescription>This package will copy all TV and Radio logos for Italian stations broacasted on Analog, -DVB-T - - and - - - -13°E Hotbird -</ExtensionDescription> - <VersionDescription>Some logos updates -</VersionDescription> - <DevelopmentStatus>Stable</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.3.mpe1</OnlineLocation> - <ReleaseDate>2010-12-06T19:14:51</ReleaseDate> - <Tags>logos</Tags> - <Location>..\ItalyLogos v.[Version].mpe1</Location> - <Params> - <Items> - <SectionParam Name="Icon"> - <Value>C:\svnroot\mp-plugins\trunk\plugins\ItalyLogos\package\ItalyFlag.png</Value> - <ValueType>File</ValueType> - <Description>The icon file of the package (jpg,png,bmp)</Description> - </SectionParam> - <SectionParam Name="Online Icon"> - <Value /> - <ValueType>String</ValueType> - <Description>The icon file of the package stored online (jpg,png,bmp)</Description> - </SectionParam> - <SectionParam Name="Configuration file"> - <Value /> - <ValueType>Template</ValueType> - <Description>The file used to configure the extension. - If have .exe extension the will be executed - If have .dll extension used like MP plugin configuration</Description> - </SectionParam> - <SectionParam Name="Online Screenshots"> - <Value /> - <ValueType>String</ValueType> - <Description>Online stored screenshot urls separated by ; </Description> - </SectionParam> - <SectionParam Name="Force to uninstall on update"> - <Value>yes</Value> - <ValueType>Bool</ValueType> - <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> - </SectionParam> - </Items> - </Params> - </GeneralInfo> - <UniqueFileList> - <Items /> - </UniqueFileList> - <ProjectSettings> - <FolderGroups /> - </ProjectSettings> - </PackageClass> - <PackageClass> - <Version>2.0</Version> - <Groups> - <Items> - <GroupItem Name="Default"> - <DisplayName>Default</DisplayName> - <DefaulChecked>true</DefaulChecked> - <Description>Default</Description> - <Files> - <Items /> - </Files> - </GroupItem> - </Items> - </Groups> - <Sections> - <Items /> - </Sections> - <Dependencies> - <Items /> - </Dependencies> - <GeneralInfo> - <Name>Italy logos Tv and Radio</Name> - <Id>784949ad-7eed-4541-9ec8-edc0cb6a3521</Id> - <Author>Various</Author> - <HomePage /> - <ForumPage /> - <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/update.xml</UpdateUrl> - <Version> - <Major>1</Major> - <Minor>0</Minor> - <Build>0</Build> <Revision>4</Revision> </Version> <ExtensionDescription>This package will copy all TV and Radio logos for Italian stations broacasted on Analog, @@ -319,7 +46,7 @@ <VersionDescription>Some logos updates </VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.3.mpe1</OnlineLocation> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.4.mpe1</OnlineLocation> <ReleaseDate>2010-12-06T19:14:51</ReleaseDate> <Tags>logos</Tags> <Location>..\ItalyLogos v.[Version].mpe1</Location> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2010-12-18 04:22:57
|
Revision: 4044 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4044&view=rev Author: chef_koch Date: 2010-12-18 03:20:43 +0000 (Sat, 18 Dec 2010) Log Message: ----------- updated install path for default input mapping updated mpdirs header to latest from mp svn Modified Paths: -------------- trunk/plugins/IR Server Suite/setup/include/MediaPortalDirectories.nsh trunk/plugins/IR Server Suite/setup/setup.nsi Modified: trunk/plugins/IR Server Suite/setup/include/MediaPortalDirectories.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup/include/MediaPortalDirectories.nsh 2010-12-18 02:28:02 UTC (rev 4043) +++ trunk/plugins/IR Server Suite/setup/include/MediaPortalDirectories.nsh 2010-12-18 03:20:43 UTC (rev 4044) @@ -61,8 +61,6 @@ Var MPdir.Config Var MPdir.Plugins Var MPdir.Log -Var MPdir.CustomInputDevice -Var MPdir.CustomInputDefault Var MPdir.Skin Var MPdir.Language Var MPdir.Database @@ -122,8 +120,6 @@ StrCpy $MPdir.Plugins "$MPdir.Base\plugins" StrCpy $MPdir.Log "$MPdir.Config\log" - StrCpy $MPdir.CustomInputDevice "$MPdir.Config\InputDeviceMappings" - StrCpy $MPdir.CustomInputDefault "$MPdir.Base\InputDeviceMappings\defaults" StrCpy $MPdir.Skin "$MPdir.Config\skin" StrCpy $MPdir.Language "$MPdir.Config\language" StrCpy $MPdir.Database "$MPdir.Config\database" @@ -165,8 +161,6 @@ ${ReadMPdir} Config ${ReadMPdir} Plugins ${ReadMPdir} Log - ${ReadMPdir} CustomInputDevice - ${ReadMPdir} CustomInputDefault ${ReadMPdir} Skin ${ReadMPdir} Language ${ReadMPdir} Database @@ -236,8 +230,6 @@ ${LOG_TEXT} "INFO" " Config: $MPdir.Config" ${LOG_TEXT} "INFO" " Plugins: $MPdir.Plugins" ${LOG_TEXT} "INFO" " Log: $MPdir.Log" - ${LOG_TEXT} "INFO" " CustomInputDevice: $MPdir.CustomInputDevice" - ${LOG_TEXT} "INFO" " CustomInputDefault: $MPdir.CustomInputDefault" ${LOG_TEXT} "INFO" " Skin: $MPdir.Skin" ${LOG_TEXT} "INFO" " Language: $MPdir.Language" ${LOG_TEXT} "INFO" " Database: $MPdir.Database" Modified: trunk/plugins/IR Server Suite/setup/setup.nsi =================================================================== --- trunk/plugins/IR Server Suite/setup/setup.nsi 2010-12-18 02:28:02 UTC (rev 4043) +++ trunk/plugins/IR Server Suite/setup/setup.nsi 2010-12-18 03:20:43 UTC (rev 4044) @@ -480,8 +480,8 @@ SetOutPath "$MPdir.Plugins\Process" File "..\MediaPortal Plugins\MediaPortal Plugins\MP Control Plugin\bin\${Build_Type}\MPControlPlugin.*" - ; Write input mapping - SetOutPath "$MPdir.CustomInputDefault" + ; Write default input mapping + SetOutPath "$MPdir.Base\defaults\InputDeviceMappings" File "..\MediaPortal Plugins\MediaPortal Plugins\MP Control Plugin\InputMapping\MPControlPlugin.xml" ; Write app data @@ -498,7 +498,11 @@ !macro Remove_${SectionMPControlPlugin} ${LOG_TEXT} "INFO" "MP Control Plugin..." + ; Delete plugin dll Delete "$MPdir.Plugins\Process\MPControlPlugin.*" + + ; Delete default input mapping + Delete "$MPdir.Base\defaults\InputDeviceMappings\MPControlPlugin.xml" !macroend ;====================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2010-12-18 02:28:11
|
Revision: 4043 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4043&view=rev Author: chef_koch Date: 2010-12-18 02:28:02 +0000 (Sat, 18 Dec 2010) Log Message: ----------- using native Keyboard and Mouse class from IrssUtils in MCE, Imon and Wii projects, instead of their own implementation (with same, duplicated code) Modified Paths: -------------- trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Keyboard.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.csproj trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.csproj Removed Paths: ------------- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Keyboard.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Mouse.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Mouse.cs Modified: trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Keyboard.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Keyboard.cs 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Keyboard.cs 2010-12-18 02:28:02 UTC (rev 4043) @@ -22,6 +22,7 @@ using System; using System.Runtime.InteropServices; +using System.Text; using System.Threading; using IrssUtils.Exceptions; @@ -104,6 +105,68 @@ /// </summary> private const string PrefixVK = "VK_"; + #region Imported from MCE Transceiver's 'native Keyboard handler (Keyboard.cs) + + /// <summary> + /// English (Australia). + /// </summary> + public const string English_AU = "00000c09"; + + /// <summary> + /// English (Great Britain). + /// </summary> + public const string English_GB = "00000809"; + + /// <summary> + /// English (US). + /// </summary> + public const string English_US = "00000409"; + + /// <summary> + /// French (France). + /// </summary> + public const string French_FR = "0000040c"; + + /// <summary> + /// German (Austria). + /// </summary> + public const string German_AT = "00000c07"; + + /// <summary> + /// German (Germany). + /// </summary> + public const string German_DE = "00000407"; + + /// <summary> + /// Japanese (Japan). + /// </summary> + public const string Japanese_JP = "00000411"; + + /// <summary> + /// Spanish (Spain). + /// </summary> + public const string Spanish_ES = "00000c0a"; + + + private const int KL_NAMELENGTH = 9; + + private const uint KLF_ACTIVATE = 0x0001; + //private const uint KLF_NOTELLSHELL = 0x0080; + private const uint KLF_REORDER = 0x0008; + //private const uint KLF_REPLACELANG = 0x0010; + //const uint KLF_RESET = 0x40000000; + private const uint KLF_SETFORPROCESS = 0x0100; + //const uint KLF_SHIFTLOCK = 0x10000; + private const uint KLF_SUBSTITUTE_OK = 0x0002; + //private const uint KLF_UNLOADPREVIOUS = 0x0004; + + + //private const int MAPVK_SCAN_TO_VK = 1; + private const int MAPVK_VK_TO_CHAR = 2; + //private const int MAPVK_VK_TO_SCAN = 0; + + #endregion + #endregion Constants #region Interop @@ -124,6 +187,33 @@ uint code, uint mapType); + #region Imported from MCE Transceiver's 'native Keyboard handler (Keyboard.cs) + + [DllImport("user32.dll")] + private static extern long GetKeyboardLayoutName( + StringBuilder pwszKLID); + + [DllImport("user32.dll")] + private static extern int ActivateKeyboardLayout( + IntPtr nkl, + uint Flags); + + [DllImport("user32.dll")] + private static extern uint GetKeyboardLayoutList( + int nBuff, + [Out] IntPtr[] lpList); + + [DllImport("user32.dll")] + private static extern IntPtr LoadKeyboardLayout( + string pwszKLID, + uint Flags); + + [DllImport("user32.dll")] + private static extern bool UnloadKeyboardLayout( + IntPtr hkl); + + #endregion + #endregion Interop #region Enumerations @@ -1227,6 +1317,83 @@ if (winKey) KeyUp(VKey.VK_LWIN); } + #region Imported from MCE Transceiver's 'native Keyboard handler (Keyboard.cs) + + /// <summary> + /// Gets the character that maps to the Virtual Key provided. + /// </summary> + /// <param name="vKey">The virtual key.</param> + /// <returns>The character.</returns> + public static char GetCharFromVKey(VKey vKey) + { + return (char)MapVirtualKey((uint)vKey, MAPVK_VK_TO_CHAR); + } + + /// <summary> + /// Gets the current keyboard layout. + /// </summary> + /// <returns>The name of the current keyboard layout.</returns> + public static string GetLayout() + { + StringBuilder name = new StringBuilder(KL_NAMELENGTH); + GetKeyboardLayoutName(name); + return name.ToString(); + } + + /// <summary> + /// Loads the specified keyboard layout. + /// </summary> + /// <param name="layout">The keyboard layout to load.</param> + /// <returns>Identifier for removing this keyboard layout.</returns> + public static IntPtr LoadLayout(string layout) + { + return LoadKeyboardLayout(layout, KLF_ACTIVATE | KLF_REORDER | KLF_SETFORPROCESS | KLF_SUBSTITUTE_OK); + } + + /// <summary> + /// Unloads the already loaded layout. + /// </summary> + /// <param name="layout">The layout to unload.</param> + /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns> + public static bool UnloadLayout(IntPtr layout) + { + return UnloadKeyboardLayout(layout); + } + + /* + /// <summary> + /// Simulate a key being pressed down. + /// </summary> + /// <param name="vKey">Virtual key to press.</param> + public static void KeyDown(VKey vKey) + { + keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyDown, IntPtr.Zero); + } + + /// <summary> + /// Simulate a key being released. + /// </summary> + /// <param name="vKey">Virtual key to release.</param> + public static void KeyUp(VKey vKey) + { + keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyUp, IntPtr.Zero); + } + */ + + /// <summary> + /// Simulate a Virtual Key event. + /// </summary> + /// <param name="vKey">Virtual Key.</param> + /// <param name="scan">Scan code.</param> + /// <param name="flags">Event type.</param> + /// <param name="extraInfo">Pointer to additional information.</param> + public static void Event(VKey vKey, byte scan, KeyEvents flags, IntPtr extraInfo) + { + keybd_event((byte)vKey, scan, (uint)flags, extraInfo); + } + + #endregion + #endregion Public Methods } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs 2010-12-18 02:28:02 UTC (rev 4043) @@ -32,6 +32,7 @@ using System.Windows.Forms; using System.Xml; using IRServer.Plugin.Properties; +using IrssUtils; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; Modified: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.csproj 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.csproj 2010-12-18 02:28:02 UTC (rev 4043) @@ -76,8 +76,6 @@ </Compile> <Compile Include="Debug.cs" /> <Compile Include="FileIO.cs" /> - <Compile Include="Keyboard.cs" /> - <Compile Include="Mouse.cs" /> <Compile Include="PluginBaseInterfaces.cs" /> <Compile Include="Imon USB Receivers.cs" /> <Compile Include="Properties\Resources.Designer.cs"> @@ -90,6 +88,10 @@ <Compile Include="TestApplication.cs" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\Common\IrssUtils\IrssUtils.csproj"> + <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project> + <Name>IrssUtils</Name> + </ProjectReference> <ProjectReference Include="..\IR Server Plugin Interface\IR Server Plugin Interface.csproj"> <Project>{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}</Project> <Name>IR Server Plugin Interface</Name> Deleted: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Keyboard.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Keyboard.cs 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Keyboard.cs 2010-12-18 02:28:02 UTC (rev 4043) @@ -1,250 +0,0 @@ -#region Copyright (C) 2005-2009 Team MediaPortal - -// Copyright (C) 2005-2009 Team MediaPortal -// http://www.team-mediaportal.com -// -// This Program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This Program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with GNU Make; see the file COPYING. If not, write to -// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -// http://www.gnu.org/copyleft/gpl.html - -#endregion - -using System; -using System.Runtime.InteropServices; - -namespace IRServer.Plugin -{ - /// <summary> - /// Win32 native method wrapper for Keyboard control functions. - /// </summary> - internal static class Keyboard - { - #region Interop - - [DllImport("user32.dll")] - private static extern void keybd_event( - byte bVk, - byte bScan, - uint dwFlags, - IntPtr dwExtraInfo); - - #endregion Interop - - #region Enumerations - - #region KeyEvents enum - - /// <summary> - /// Key Event Types. - /// </summary> - [Flags] - public enum KeyEvents - { - KeyDown = 0x00, - ExtendedKey = 0x01, - KeyUp = 0x02, - Unicode = 0x04, - ScanCode = 0x08, - } - - #endregion - - #region VKey enum - - /// <summary> - /// Virtual Key Codes. - /// </summary> - public enum VKey - { - None = 0, - VK_0 = 0x30, - VK_1 = 0x31, - VK_2 = 0x32, - VK_3 = 0x33, - VK_4 = 0x34, - VK_5 = 0x35, - VK_6 = 0x36, - VK_7 = 0x37, - VK_8 = 0x38, - VK_9 = 0x39, - VK_A = 0x41, - VK_B = 0x42, - VK_C = 0x43, - VK_D = 0x44, - VK_E = 0x45, - VK_F = 0x46, - VK_G = 0x47, - VK_H = 0x48, - VK_I = 0x49, - VK_J = 0x4A, - VK_K = 0x4B, - VK_L = 0x4C, - VK_M = 0x4D, - VK_N = 0x4E, - VK_O = 0x4F, - VK_P = 0x50, - VK_Q = 0x51, - VK_R = 0x52, - VK_S = 0x53, - VK_T = 0x54, - VK_U = 0x55, - VK_V = 0x56, - VK_W = 0x57, - VK_X = 0x58, - VK_Y = 0x59, - VK_Z = 0x5A, - VK_ADD = 0x6B, - VK_APPS = 0x5D, - VK_ATTN = 0xF6, - VK_BACK = 0x8, - VK_CANCEL = 0x3, - VK_CAPITAL = 0x14, - VK_CLEAR = 0xC, - VK_CONTROL = 0x11, - VK_CRSEL = 0xF7, - VK_DECIMAL = 0x6E, - VK_DELETE = 0x2E, - VK_DIVIDE = 0x6F, - VK_DOWN = 0x28, - VK_END = 0x23, - VK_EREOF = 0xF9, - VK_ESCAPE = 0x1B, - VK_EXECUTE = 0x2B, - VK_EXSEL = 0xF8, - VK_F1 = 0x70, - VK_F2 = 0x71, - VK_F3 = 0x72, - VK_F4 = 0x73, - VK_F5 = 0x74, - VK_F6 = 0x75, - VK_F7 = 0x76, - VK_F8 = 0x77, - VK_F9 = 0x78, - VK_F10 = 0x79, - VK_F11 = 0x7A, - VK_F12 = 0x7B, - VK_F13 = 0x7C, - VK_F14 = 0x7D, - VK_F15 = 0x7E, - VK_F16 = 0x7F, - VK_F17 = 0x80, - VK_F18 = 0x81, - VK_F19 = 0x82, - VK_F20 = 0x83, - VK_F21 = 0x84, - VK_F22 = 0x85, - VK_F23 = 0x86, - VK_F24 = 0x87, - VK_HELP = 0x2F, - VK_HOME = 0x24, - VK_INSERT = 0x2D, - VK_LBUTTON = 0x1, - VK_LCONTROL = 0xA2, - VK_LEFT = 0x25, - VK_LMENU = 0xA4, - VK_LSHIFT = 0xA0, - VK_LWIN = 0x5B, - VK_MBUTTON = 0x4, - VK_MENU = 0x12, - VK_MULTIPLY = 0x6A, - VK_NEXT = 0x22, - VK_NONAME = 0xFC, - VK_NUMLOCK = 0x90, - VK_NUMPAD0 = 0x60, - VK_NUMPAD1 = 0x61, - VK_NUMPAD2 = 0x62, - VK_NUMPAD3 = 0x63, - VK_NUMPAD4 = 0x64, - VK_NUMPAD5 = 0x65, - VK_NUMPAD6 = 0x66, - VK_NUMPAD7 = 0x67, - VK_NUMPAD8 = 0x68, - VK_NUMPAD9 = 0x69, - VK_OEM_1 = 0xBA, // ";:" - VK_OEM_2 = 0xBF, // "/?" - VK_OEM_3 = 0xC0, // "`~" for US - VK_OEM_4 = 0xDB, // "[{" for US - VK_OEM_5 = 0xDC, // "\|" for US - VK_OEM_6 = 0xDD, // "]}" for US - VK_OEM_7 = 0xDE, // "'"" for US - VK_OEM_102 = 0xE2, - VK_OEM_CLEAR = 0xFE, - VK_OEM_COMMA = 0xBC, - VK_OEM_MINUS = 0xBD, - VK_OEM_PERIOD = 0xBE, - VK_OEM_PLUS = 0xBB, // "+=" - VK_PA1 = 0xFD, - VK_PAUSE = 0x13, - VK_PLAY = 0xFA, - VK_PRINT = 0x2A, - VK_PRIOR = 0x21, - VK_PROCESSKEY = 0xE5, - VK_RBUTTON = 0x2, - VK_RCONTROL = 0xA3, - VK_RETURN = 0xD, - VK_RIGHT = 0x27, - VK_RMENU = 0xA5, - VK_RSHIFT = 0xA1, - VK_RWIN = 0x5C, - VK_SCROLL = 0x91, - VK_SELECT = 0x29, - VK_SEPARATOR = 0x6C, - VK_SHIFT = 0x10, - VK_SNAPSHOT = 0x2C, - VK_SPACE = 0x20, - VK_SUBTRACT = 0x6D, - VK_TAB = 0x9, - VK_UP = 0x26, - VK_ZOOM = 0xFB, - } - - #endregion - - #endregion Enumerations - - #region Public Methods - - /// <summary> - /// Simulate a key being pressed down. - /// </summary> - /// <param name="vKey">Virtual key to press.</param> - public static void KeyDown(VKey vKey) - { - keybd_event((byte) vKey, 0, (uint) KeyEvents.KeyDown, IntPtr.Zero); - } - - /// <summary> - /// Simulate a key being released. - /// </summary> - /// <param name="vKey">Virtual key to release.</param> - public static void KeyUp(VKey vKey) - { - keybd_event((byte) vKey, 0, (uint) KeyEvents.KeyUp, IntPtr.Zero); - } - - /// <summary> - /// Simulate a Virtual Key event. - /// </summary> - /// <param name="vKey">Virtual Key.</param> - /// <param name="scan">Scan code.</param> - /// <param name="flags">Event type.</param> - /// <param name="extraInfo">Pointer to additional information.</param> - public static void Event(VKey vKey, byte scan, KeyEvents flags, IntPtr extraInfo) - { - keybd_event((byte) vKey, scan, (uint) flags, extraInfo); - } - - #endregion Public Methods - } -} \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Mouse.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Mouse.cs 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Mouse.cs 2010-12-18 02:28:02 UTC (rev 4043) @@ -1,163 +0,0 @@ -#region Copyright (C) 2005-2009 Team MediaPortal - -// Copyright (C) 2005-2009 Team MediaPortal -// http://www.team-mediaportal.com -// -// This Program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This Program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with GNU Make; see the file COPYING. If not, write to -// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -// http://www.gnu.org/copyleft/gpl.html - -#endregion - -using System; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace IRServer.Plugin -{ - /// <summary> - /// Win32 native method wrapper for Mouse control functions. - /// </summary> - internal static class Mouse - { - #region Interop - - [DllImport("user32")] - private static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, IntPtr dwExtraInfo); - - #endregion Interop - - #region Enumerations - - #region MouseEvents enum - - /// <summary> - /// Used to simulate mouse actions. - /// </summary> - [Flags] - public enum MouseEvents - { - /// <summary> - /// No Event. - /// </summary> - None = 0x0000, - /// <summary> - /// Move. - /// </summary> - Move = 0x0001, - /// <summary> - /// Left Button Down. - /// </summary> - LeftDown = 0x0002, - /// <summary> - /// Left Button Up. - /// </summary> - LeftUp = 0x0004, - /// <summary> - /// Right Button Down. - /// </summary> - RightDown = 0x0008, - /// <summary> - /// Right Button Up. - /// </summary> - RightUp = 0x0010, - /// <summary> - /// Middle Button Down. - /// </summary> - MiddleDown = 0x0020, - /// <summary> - /// Middle Button Up. - /// </summary> - MiddleUp = 0x0040, - /// <summary> - /// Scroll. - /// </summary> - Scroll = 0x0800, - /// <summary> - /// Position Absolute. - /// </summary> - Absolute = 0x8000 - } - - #endregion - - #region ScrollDir enum - - /// <summary> - /// Used to simulate mouse wheel scrolling. - /// </summary> - public enum ScrollDir - { - /// <summary> - /// No Scroll. - /// </summary> - None = 0, - /// <summary> - /// Scroll Up. - /// </summary> - Up = 120, - /// <summary> - /// Scroll Down. - /// </summary> - Down = -120 - } - - #endregion - - #endregion Enumerations - - #region Public Methods - - /// <summary> - /// Simulates mouse button actions. - /// </summary> - /// <param name="flags">The button action to simulate.</param> - public static void Button(MouseEvents flags) - { - mouse_event((int) flags, 0, 0, 0, IntPtr.Zero); - } - - /// <summary> - /// Simulate mouse movements. - /// </summary> - /// <param name="dx">Movement on the X axis.</param> - /// <param name="dy">Movement on the Y axis.</param> - /// <param name="absolute">If true, dx and dy are taken as absolute position. If false, dx and dy are taken as relative to the current position.</param> - public static void Move(int dx, int dy, bool absolute) - { - if (absolute) - { - int x = dx * 65536 / Screen.PrimaryScreen.Bounds.Width; - int y = dy * 65536 / Screen.PrimaryScreen.Bounds.Height; - - mouse_event((int) (MouseEvents.Move | MouseEvents.Absolute), x, y, 0, IntPtr.Zero); - } - else - { - mouse_event((int) (MouseEvents.Move), dx, dy, 0, IntPtr.Zero); - } - } - - /// <summary> - /// Simulates mouse wheel scrolling. - /// </summary> - /// <param name="direction">The direction to scroll.</param> - public static void Scroll(ScrollDir direction) - { - mouse_event((int) MouseEvents.Scroll, 0, 0, (int) direction, IntPtr.Zero); - } - - #endregion Public Methods - } -} \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs 2010-12-18 02:28:02 UTC (rev 4043) @@ -1,383 +0,0 @@ -#region Copyright (C) 2005-2009 Team MediaPortal - -// Copyright (C) 2005-2009 Team MediaPortal -// http://www.team-mediaportal.com -// -// This Program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This Program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with GNU Make; see the file COPYING. If not, write to -// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -// http://www.gnu.org/copyleft/gpl.html - -#endregion - -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace IRServer.Plugin -{ - /// <summary> - /// Win32 native method wrapper for Keyboard control functions. - /// </summary> - internal static class Keyboard - { - #region Constants - - /// <summary> - /// English (Australia). - /// </summary> - public const string English_AU = "00000c09"; - - /// <summary> - /// English (Great Britain). - /// </summary> - public const string English_GB = "00000809"; - - /// <summary> - /// English (US). - /// </summary> - public const string English_US = "00000409"; - - /// <summary> - /// French (France). - /// </summary> - public const string French_FR = "0000040c"; - - /// <summary> - /// German (Austria). - /// </summary> - public const string German_AT = "00000c07"; - - /// <summary> - /// German (Germany). - /// </summary> - public const string German_DE = "00000407"; - - /// <summary> - /// Japanese (Japan). - /// </summary> - public const string Japanese_JP = "00000411"; - - private const int KL_NAMELENGTH = 9; - - private const uint KLF_ACTIVATE = 0x0001; - //private const uint KLF_NOTELLSHELL = 0x0080; - private const uint KLF_REORDER = 0x0008; - //private const uint KLF_REPLACELANG = 0x0010; - //const uint KLF_RESET = 0x40000000; - private const uint KLF_SETFORPROCESS = 0x0100; - //const uint KLF_SHIFTLOCK = 0x10000; - private const uint KLF_SUBSTITUTE_OK = 0x0002; - //private const uint KLF_UNLOADPREVIOUS = 0x0004; - - - //private const int MAPVK_SCAN_TO_VK = 1; - private const int MAPVK_VK_TO_CHAR = 2; - //private const int MAPVK_VK_TO_SCAN = 0; - - - /// <summary> - /// Spanish (Spain). - /// </summary> - public const string Spanish_ES = "00000c0a"; - - #endregion Constants - - #region Interop - - [DllImport("user32.dll")] - private static extern void keybd_event( - byte bVk, - byte bScan, - uint dwFlags, - IntPtr dwExtraInfo); - - [DllImport("user32.dll")] - private static extern long GetKeyboardLayoutName( - StringBuilder pwszKLID); - - [DllImport("user32.dll")] - private static extern int ActivateKeyboardLayout( - IntPtr nkl, - uint Flags); - - [DllImport("user32.dll")] - private static extern uint GetKeyboardLayoutList( - int nBuff, - [Out] IntPtr[] lpList); - - [DllImport("user32.dll")] - private static extern IntPtr LoadKeyboardLayout( - string pwszKLID, - uint Flags); - - [DllImport("user32.dll")] - private static extern bool UnloadKeyboardLayout( - IntPtr hkl); - - [DllImport("user32.dll")] - private static extern uint MapVirtualKey( - uint uCode, - uint uMapType); - - #endregion Interop - - #region Enumerations - - #region KeyEvents enum - - /// <summary> - /// Key Event Types. - /// </summary> - [Flags] - public enum KeyEvents - { - KeyDown = 0x00, - ExtendedKey = 0x01, - KeyUp = 0x02, - Unicode = 0x04, - ScanCode = 0x08, - } - - #endregion - - #region VKey enum - - /// <summary> - /// Virtual Key Codes. - /// </summary> - public enum VKey - { - None = 0, - VK_0 = 0x30, - VK_1 = 0x31, - VK_2 = 0x32, - VK_3 = 0x33, - VK_4 = 0x34, - VK_5 = 0x35, - VK_6 = 0x36, - VK_7 = 0x37, - VK_8 = 0x38, - VK_9 = 0x39, - VK_A = 0x41, - VK_B = 0x42, - VK_C = 0x43, - VK_D = 0x44, - VK_E = 0x45, - VK_F = 0x46, - VK_G = 0x47, - VK_H = 0x48, - VK_I = 0x49, - VK_J = 0x4A, - VK_K = 0x4B, - VK_L = 0x4C, - VK_M = 0x4D, - VK_N = 0x4E, - VK_O = 0x4F, - VK_P = 0x50, - VK_Q = 0x51, - VK_R = 0x52, - VK_S = 0x53, - VK_T = 0x54, - VK_U = 0x55, - VK_V = 0x56, - VK_W = 0x57, - VK_X = 0x58, - VK_Y = 0x59, - VK_Z = 0x5A, - VK_ADD = 0x6B, - VK_APPS = 0x5D, - VK_ATTN = 0xF6, - VK_BACK = 0x8, - VK_CANCEL = 0x3, - VK_CAPITAL = 0x14, - VK_CLEAR = 0xC, - VK_CONTROL = 0x11, - VK_CRSEL = 0xF7, - VK_DECIMAL = 0x6E, - VK_DELETE = 0x2E, - VK_DIVIDE = 0x6F, - VK_DOWN = 0x28, - VK_END = 0x23, - VK_EREOF = 0xF9, - VK_ESCAPE = 0x1B, - VK_EXECUTE = 0x2B, - VK_EXSEL = 0xF8, - VK_F1 = 0x70, - VK_F2 = 0x71, - VK_F3 = 0x72, - VK_F4 = 0x73, - VK_F5 = 0x74, - VK_F6 = 0x75, - VK_F7 = 0x76, - VK_F8 = 0x77, - VK_F9 = 0x78, - VK_F10 = 0x79, - VK_F11 = 0x7A, - VK_F12 = 0x7B, - VK_F13 = 0x7C, - VK_F14 = 0x7D, - VK_F15 = 0x7E, - VK_F16 = 0x7F, - VK_F17 = 0x80, - VK_F18 = 0x81, - VK_F19 = 0x82, - VK_F20 = 0x83, - VK_F21 = 0x84, - VK_F22 = 0x85, - VK_F23 = 0x86, - VK_F24 = 0x87, - VK_HELP = 0x2F, - VK_HOME = 0x24, - VK_INSERT = 0x2D, - VK_LBUTTON = 0x1, - VK_LCONTROL = 0xA2, - VK_LEFT = 0x25, - VK_LMENU = 0xA4, - VK_LSHIFT = 0xA0, - VK_LWIN = 0x5B, - VK_MBUTTON = 0x4, - VK_MENU = 0x12, - VK_MULTIPLY = 0x6A, - VK_NEXT = 0x22, - VK_NONAME = 0xFC, - VK_NUMLOCK = 0x90, - VK_NUMPAD0 = 0x60, - VK_NUMPAD1 = 0x61, - VK_NUMPAD2 = 0x62, - VK_NUMPAD3 = 0x63, - VK_NUMPAD4 = 0x64, - VK_NUMPAD5 = 0x65, - VK_NUMPAD6 = 0x66, - VK_NUMPAD7 = 0x67, - VK_NUMPAD8 = 0x68, - VK_NUMPAD9 = 0x69, - VK_OEM_1 = 0xBA, // ";:" - VK_OEM_2 = 0xBF, // "/?" - VK_OEM_3 = 0xC0, // "`~" for US - VK_OEM_4 = 0xDB, // "[{" for US - VK_OEM_5 = 0xDC, // "\|" for US - VK_OEM_6 = 0xDD, // "]}" for US - VK_OEM_7 = 0xDE, // "'"" for US - VK_OEM_102 = 0xE2, - VK_OEM_CLEAR = 0xFE, - VK_OEM_COMMA = 0xBC, - VK_OEM_MINUS = 0xBD, - VK_OEM_PERIOD = 0xBE, - VK_OEM_PLUS = 0xBB, // "+=" - VK_PA1 = 0xFD, - VK_PAUSE = 0x13, - VK_PLAY = 0xFA, - VK_PRINT = 0x2A, - VK_PRIOR = 0x21, - VK_PROCESSKEY = 0xE5, - VK_RBUTTON = 0x2, - VK_RCONTROL = 0xA3, - VK_RETURN = 0xD, - VK_RIGHT = 0x27, - VK_RMENU = 0xA5, - VK_RSHIFT = 0xA1, - VK_RWIN = 0x5C, - VK_SCROLL = 0x91, - VK_SELECT = 0x29, - VK_SEPARATOR = 0x6C, - VK_SHIFT = 0x10, - VK_SNAPSHOT = 0x2C, - VK_SPACE = 0x20, - VK_SUBTRACT = 0x6D, - VK_TAB = 0x9, - VK_UP = 0x26, - VK_ZOOM = 0xFB, - } - - #endregion - - #endregion Enumerations - - #region Public Methods - - /// <summary> - /// Gets the character that maps to the Virtual Key provided. - /// </summary> - /// <param name="vKey">The virtual key.</param> - /// <returns>The character.</returns> - public static char GetCharFromVKey(VKey vKey) - { - return (char) MapVirtualKey((uint) vKey, MAPVK_VK_TO_CHAR); - } - - /// <summary> - /// Gets the current keyboard layout. - /// </summary> - /// <returns>The name of the current keyboard layout.</returns> - public static string GetLayout() - { - StringBuilder name = new StringBuilder(KL_NAMELENGTH); - GetKeyboardLayoutName(name); - return name.ToString(); - } - - /// <summary> - /// Loads the specified keyboard layout. - /// </summary> - /// <param name="layout">The keyboard layout to load.</param> - /// <returns>Identifier for removing this keyboard layout.</returns> - public static IntPtr LoadLayout(string layout) - { - return LoadKeyboardLayout(layout, KLF_ACTIVATE | KLF_REORDER | KLF_SETFORPROCESS | KLF_SUBSTITUTE_OK); - } - - /// <summary> - /// Unloads the already loaded layout. - /// </summary> - /// <param name="layout">The layout to unload.</param> - /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns> - public static bool UnloadLayout(IntPtr layout) - { - return UnloadKeyboardLayout(layout); - } - - - /// <summary> - /// Simulate a key being pressed down. - /// </summary> - /// <param name="vKey">Virtual key to press.</param> - public static void KeyDown(VKey vKey) - { - keybd_event((byte) vKey, 0, (uint) KeyEvents.KeyDown, IntPtr.Zero); - } - - /// <summary> - /// Simulate a key being released. - /// </summary> - /// <param name="vKey">Virtual key to release.</param> - public static void KeyUp(VKey vKey) - { - keybd_event((byte) vKey, 0, (uint) KeyEvents.KeyUp, IntPtr.Zero); - } - - /// <summary> - /// Simulate a Virtual Key event. - /// </summary> - /// <param name="vKey">Virtual Key.</param> - /// <param name="scan">Scan code.</param> - /// <param name="flags">Event type.</param> - /// <param name="extraInfo">Pointer to additional information.</param> - public static void Event(VKey vKey, byte scan, KeyEvents flags, IntPtr extraInfo) - { - keybd_event((byte) vKey, scan, (uint) flags, extraInfo); - } - - #endregion Public Methods - } -} \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj 2010-12-18 02:28:02 UTC (rev 4043) @@ -88,11 +88,9 @@ <Compile Include="DriverVista.cs" /> <Compile Include="DriverXP.cs" /> <Compile Include="IrDecoder.cs" /> - <Compile Include="Keyboard.cs" /> <Compile Include="MceDetectionData.cs" /> <Compile Include="IrCode.cs" /> <Compile Include="MicrosoftMceTransceiver.cs" /> - <Compile Include="Mouse.cs" /> <Compile Include="NotifyWindow.cs" /> <Compile Include="Pronto.cs" /> <Compile Include="Properties\Resources.Designer.cs"> Deleted: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs 2010-12-18 02:28:02 UTC (rev 4043) @@ -1,163 +0,0 @@ -#region Copyright (C) 2005-2009 Team MediaPortal - -// Copyright (C) 2005-2009 Team MediaPortal -// http://www.team-mediaportal.com -// -// This Program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This Program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with GNU Make; see the file COPYING. If not, write to -// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -// http://www.gnu.org/copyleft/gpl.html - -#endregion - -using System; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace IRServer.Plugin -{ - /// <summary> - /// Win32 native method wrapper for Mouse control functions. - /// </summary> - internal static class Mouse - { - #region Interop - - [DllImport("user32")] - private static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, IntPtr dwExtraInfo); - - #endregion Interop - - #region Enumerations - - #region MouseEvents enum - - /// <summary> - /// Used to simulate mouse actions. - /// </summary> - [Flags] - public enum MouseEvents - { - /// <summary> - /// No Event. - /// </summary> - None = 0x0000, - /// <summary> - /// Move. - /// </summary> - Move = 0x0001, - /// <summary> - /// Left Button Down. - /// </summary> - LeftDown = 0x0002, - /// <summary> - /// Left Button Up. - /// </summary> - LeftUp = 0x0004, - /// <summary> - /// Right Button Down. - /// </summary> - RightDown = 0x0008, - /// <summary> - /// Right Button Up. - /// </summary> - RightUp = 0x0010, - /// <summary> - /// Middle Button Down. - /// </summary> - MiddleDown = 0x0020, - /// <summary> - /// Middle Button Up. - /// </summary> - MiddleUp = 0x0040, - /// <summary> - /// Scroll. - /// </summary> - Scroll = 0x0800, - /// <summary> - /// Position Absolute. - /// </summary> - Absolute = 0x8000 - } - - #endregion - - #region ScrollDir enum - - /// <summary> - /// Used to simulate mouse wheel scrolling. - /// </summary> - public enum ScrollDir - { - /// <summary> - /// No Scroll. - /// </summary> - None = 0, - /// <summary> - /// Scroll Up. - /// </summary> - Up = 120, - /// <summary> - /// Scroll Down. - /// </summary> - Down = -120 - } - - #endregion - - #endregion Enumerations - - #region Public Methods - - /// <summary> - /// Simulates mouse button actions. - /// </summary> - /// <param name="flags">The button action to simulate.</param> - public static void Button(MouseEvents flags) - { - mouse_event((int) flags, 0, 0, 0, IntPtr.Zero); - } - - /// <summary> - /// Simulate mouse movements. - /// </summary> - /// <param name="dx">Movement on the X axis.</param> - /// <param name="dy">Movement on the Y axis.</param> - /// <param name="absolute">If true, dx and dy are taken as absolute position. If false, dx and dy are taken as relative to the current position.</param> - public static void Move(int dx, int dy, bool absolute) - { - if (absolute) - { - int x = dx * 65536 / Screen.PrimaryScreen.Bounds.Width; - int y = dy * 65536 / Screen.PrimaryScreen.Bounds.Height; - - mouse_event((int) (MouseEvents.Move | MouseEvents.Absolute), x, y, 0, IntPtr.Zero); - } - else - { - mouse_event((int) (MouseEvents.Move), dx, dy, 0, IntPtr.Zero); - } - } - - /// <summary> - /// Simulates mouse wheel scrolling. - /// </summary> - /// <param name="direction">The direction to scroll.</param> - public static void Scroll(ScrollDir direction) - { - mouse_event((int) MouseEvents.Scroll, 0, 0, (int) direction, IntPtr.Zero); - } - - #endregion Public Methods - } -} \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Mouse.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Mouse.cs 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Mouse.cs 2010-12-18 02:28:02 UTC (rev 4043) @@ -1,168 +0,0 @@ -#region Copyright (C) 2005-2009 Team MediaPortal - -// Copyright (C) 2005-2009 Team MediaPortal -// http://www.team-mediaportal.com -// -// This Program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This Program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with GNU Make; see the file COPYING. If not, write to -// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -// http://www.gnu.org/copyleft/gpl.html - -#endregion - -using System; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace IRServer.Plugin -{ - /// <summary> - /// Win32 native method wrapper for Mouse control functions. - /// </summary> - internal static class Mouse - { - #region Interop - - [DllImport("user32")] - private static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, IntPtr dwExtraInfo); - - #endregion Interop - - #region Enumerations - - #region MouseEvents enum - - /// <summary> - /// Used to simulate mouse actions. - /// </summary> - [Flags] - public enum MouseEvents - { - /// <summary> - /// No Event. - /// </summary> - None = 0x0000, - /// <summary> - /// Move. - /// </summary> - Move = 0x0001, - /// <summary> - /// Left Button Down. - /// </summary> - LeftDown = 0x0002, - /// <summary> - /// Left Button Up. - /// </summary> - LeftUp = 0x0004, - /// <summary> - /// Right Button Down. - /// </summary> - RightDown = 0x0008, - /// <summary> - /// Right Button Up. - /// </summary> - RightUp = 0x0010, - /// <summary> - /// Middle Button Down. - /// </summary> - MiddleDown = 0x0020, - /// <summary> - /// Middle Button Up. - /// </summary> - MiddleUp = 0x0040, - /// <summary> - /// Scroll. - /// </summary> - Scroll = 0x0800, - /// <summary> - /// Position Absolute. - /// </summary> - Absolute = 0x8000 - } - - #endregion - - #region ScrollDir enum - - /// <summary> - /// Used to simulate mouse wheel scrolling. - /// </summary> - public enum ScrollDir - { - /// <summary> - /// No Scroll. - /// </summary> - None = 0, - /// <summary> - /// Scroll Up. - /// </summary> - Up = 120, - /// <summary> - /// Scroll Down. - /// </summary> - Down = -120 - } - - #endregion - - #endregion Enumerations - - #region Public Methods - - /// <summary> - /// Simulates mouse button actions. - /// </summary> - /// <param name="flags">The button action to simulate.</param> - public static void Button(MouseEvents flags) - { - mouse_event((int) flags, 0, 0, 0, IntPtr.Zero); - } - - /// <summary> - /// Simulate mouse movements. - /// </summary> - /// <param name="dx">Movement on the X axis.</param> - /// <param name="dy">Movement on the Y axis.</param> - /// <param name="absolute">If true, dx and dy are taken as absolute position. If false, dx and dy are taken as relative to the current position.</param> - public static void Move(int dx, int dy, bool absolute) - { - //if (absolute) - //Cursor.Position = new Point(dx, dy); - //else - //Cursor.Position = new Point(Curson.Position.X + dx, Cursor.Position.Y + dy); - - if (absolute) - { - int x = dx * 65536 / Screen.PrimaryScreen.Bounds.Width; - int y = dy * 65536 / Screen.PrimaryScreen.Bounds.Height; - - mouse_event((int) (MouseEvents.Move | MouseEvents.Absolute), x, y, 0, IntPtr.Zero); - } - else - { - mouse_event((int) (MouseEvents.Move), dx, dy, 0, IntPtr.Zero); - } - } - - /// <summary> - /// Simulates mouse wheel scrolling. - /// </summary> - /// <param name="direction">The direction to scroll.</param> - public static void Scroll(ScrollDir direction) - { - mouse_event((int) MouseEvents.Scroll, 0, 0, (int) direction, IntPtr.Zero); - } - - #endregion Public Methods - } -} \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.cs 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.cs 2010-12-18 02:28:02 UTC (rev 4043) @@ -30,6 +30,7 @@ using System.Windows.Forms; using System.Xml; using IRServer.Plugin.Properties; +using IrssUtils; using WiimoteLib; namespace IRServer.Plugin Modified: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.csproj 2010-12-17 16:59:14 UTC (rev 4042) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.csproj 2010-12-18 02:28:02 UTC (rev 4043) @@ -70,7 +70,6 @@ <Link>Properties\SolutionInfo.cs</Link> </Compile> <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Mouse.cs" /> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> @@ -85,6 +84,10 @@ <Compile Include="Wii Remote Receiver.cs" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\Common\IrssUtils\IrssUtils.csproj"> + <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project> + <Name>IrssUtils</Name> + </ProjectReference> <ProjectReference Include="..\IR Server Plugin Interface\IR Server Plugin Interface.csproj"> <Project>{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}</Project> <Name>IR Server Plugin Interface</Name> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2010-12-17 16:59:20
|
Revision: 4042 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4042&view=rev Author: chef_koch Date: 2010-12-17 16:59:14 +0000 (Fri, 17 Dec 2010) Log Message: ----------- made irss compatible with latest svn, should also be compatible with older MediaPortal releases Modified Paths: -------------- trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MPUtils/MPCommon.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/CommandHibernate.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/CommandStandBy.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/MediaPortalCommands.csproj trunk/plugins/IR Server Suite/MediaPortal Plugins/MediaPortal Plugins/MP Control Plugin/InputMapper/InputMappingForm.cs Removed Paths: ------------- trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/Common.cs Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MPUtils/MPCommon.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MPUtils/MPCommon.cs 2010-12-17 08:46:22 UTC (rev 4041) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MPUtils/MPCommon.cs 2010-12-17 16:59:14 UTC (rev 4042) @@ -42,12 +42,12 @@ /// <summary> /// Folder for Input Device data default files. /// </summary> - public static readonly string CustomInputDefault = Config.GetFolder(Config.Dir.CustomInputDefault); + public static readonly string CustomInputDefault = Config.GetSubFolder(Config.Dir.Base, @"Defaults\InputDeviceMappings"); /// <summary> /// Folder for Custom Input Device data files. /// </summary> - public static readonly string CustomInputDevice = Config.GetFolder(Config.Dir.CustomInputDevice); + public static readonly string CustomInputDevice = Config.GetSubFolder(Config.Dir.Config, @"InputDeviceMappings"); /// <summary> /// Path to the MediaPortal configuration file. Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/CommandHibernate.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/CommandHibernate.cs 2010-12-17 08:46:22 UTC (rev 4041) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/CommandHibernate.cs 2010-12-17 16:59:14 UTC (rev 4042) @@ -24,6 +24,7 @@ using MediaPortal.Player; using MediaPortal.Profile; using MediaPortal.Util; +using MPUtils; namespace Commands.MediaPortal { @@ -79,7 +80,7 @@ public override void Execute(VariableList variables) { bool mpBasicHome = false; - using (Settings xmlreader = new Settings(Common.MPConfigFile)) + using (Settings xmlreader = new Settings(MPCommon.MPConfigFile)) mpBasicHome = xmlreader.GetValueAsBool("general", "startbasichome", false); GUIGraphicsContext.ResetLastActivity(); Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/CommandStandBy.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/CommandStandBy.cs 2010-12-17 08:46:22 UTC (rev 4041) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/CommandStandBy.cs 2010-12-17 16:59:14 UTC (rev 4042) @@ -24,6 +24,7 @@ using MediaPortal.Player; using MediaPortal.Profile; using MediaPortal.Util; +using MPUtils; namespace Commands.MediaPortal { @@ -79,7 +80,7 @@ public override void Execute(VariableList variables) { bool mpBasicHome = false; - using (Settings xmlreader = new Settings(Common.MPConfigFile)) + using (Settings xmlreader = new Settings(MPCommon.MPConfigFile)) mpBasicHome = xmlreader.GetValueAsBool("general", "startbasichome", false); GUIGraphicsContext.ResetLastActivity(); Deleted: trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/Common.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/Common.cs 2010-12-17 08:46:22 UTC (rev 4041) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/Common.cs 2010-12-17 16:59:14 UTC (rev 4042) @@ -1,44 +0,0 @@ -#region Copyright (C) 2005-2009 Team MediaPortal - -// Copyright (C) 2005-2009 Team MediaPortal -// http://www.team-mediaportal.com -// -// This Program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This Program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with GNU Make; see the file COPYING. If not, write to -// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -// http://www.gnu.org/copyleft/gpl.html - -#endregion - -using MediaPortal.Configuration; - -namespace Commands.MediaPortal -{ - internal static class Common - { - /// <summary> - /// Folder for Input Device data default files. - /// </summary> - public static readonly string CustomInputDefault = Config.GetFolder(Config.Dir.CustomInputDefault) + "\\"; - - /// <summary> - /// Folder for Custom Input Device data files. - /// </summary> - public static readonly string CustomInputDevice = Config.GetFolder(Config.Dir.CustomInputDevice) + "\\"; - - /// <summary> - /// Path to the MediaPortal configuration file. - /// </summary> - public static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml"; - } -} \ No newline at end of file Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/MediaPortalCommands.csproj =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/MediaPortalCommands.csproj 2010-12-17 08:46:22 UTC (rev 4041) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/Common/MediaPortalCommands/MediaPortalCommands.csproj 2010-12-17 16:59:14 UTC (rev 4042) @@ -72,7 +72,6 @@ <Compile Include="CommandReboot.cs" /> <Compile Include="CommandShutdown.cs" /> <Compile Include="CommandHibernate.cs" /> - <Compile Include="Common.cs" /> <Compile Include="CommandStandBy.cs" /> <Compile Include="CommandSendAction.cs" /> <Compile Include="CommandSendMessage.cs" /> @@ -146,6 +145,10 @@ <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project> <Name>IrssUtils</Name> </ProjectReference> + <ProjectReference Include="..\MPUtils\MPUtils.csproj"> + <Project>{08F57DD7-2C6E-484E-9CC5-835F70C5BC64}</Project> + <Name>MPUtils</Name> + </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MediaPortal Plugins/MP Control Plugin/InputMapper/InputMappingForm.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MediaPortal Plugins/MP Control Plugin/InputMapper/InputMappingForm.cs 2010-12-17 08:46:22 UTC (rev 4041) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MediaPortal Plugins/MP Control Plugin/InputMapper/InputMappingForm.cs 2010-12-17 16:59:14 UTC (rev 4042) @@ -178,6 +178,9 @@ private void LoadMapping(string xmlFile, bool defaults) { + string pathDefault = Path.Combine(MPUtils.MPCommon.CustomInputDefault, xmlFile); + string pathCustom = Path.Combine(MPUtils.MPCommon.CustomInputDevice, xmlFile); + try { groupBoxLayer.Enabled = false; @@ -185,9 +188,9 @@ groupBoxAction.Enabled = false; treeMapping.Nodes.Clear(); XmlDocument doc = new XmlDocument(); - string path = Config.GetFolder(Config.Dir.Base) + "\\InputDeviceMappings\\defaults\\" + xmlFile; - if (!defaults && File.Exists(Config.GetFile(Config.Dir.CustomInputDevice, xmlFile))) - path = Config.GetFile(Config.Dir.CustomInputDevice, xmlFile); + string path = pathDefault; + if (!defaults && File.Exists(pathCustom)) + path = pathCustom; if (!File.Exists(path)) { MessageBox.Show( @@ -376,26 +379,29 @@ catch (Exception ex) { Log.Error(ex); - File.Delete(Config.GetFile(Config.Dir.CustomInputDevice, xmlFile)); + File.Delete(pathCustom); LoadMapping(xmlFile, true); } } private bool SaveMapping(string xmlFile) { + string customDir = MPUtils.MPCommon.CustomInputDevice; + string pathCustom = Path.Combine(customDir, xmlFile); + try { - Directory.CreateDirectory(Config.GetFolder(Config.Dir.CustomInputDevice)); + Directory.CreateDirectory(customDir); } catch { - Log.Info("MAP: Error accessing directory \"InputDeviceMappings\\custom\""); + Log.Info("MAP: Error accessing directory '{0}'", customDir); } try { using ( - XmlTextWriter writer = new XmlTextWriter(Config.GetFile(Config.Dir.CustomInputDevice, xmlFile), Encoding.UTF8) + XmlTextWriter writer = new XmlTextWriter(pathCustom, Encoding.UTF8) ) { writer.Formatting = Formatting.Indented; @@ -1249,7 +1255,7 @@ private void buttonDefault_Click(object sender, EventArgs e) { string fileName = _inputClassName + ".xml"; - string filePath = Config.GetFile(Config.Dir.CustomInputDevice, fileName); + string filePath = Path.Combine(MPUtils.MPCommon.CustomInputDevice, fileName); if (File.Exists(filePath)) File.Delete(filePath); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-17 08:46:29
|
Revision: 4041 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4041&view=rev Author: kroko_koenig Date: 2010-12-17 08:46:22 +0000 (Fri, 17 Dec 2010) Log Message: ----------- small changes Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-16 20:51:21 UTC (rev 4040) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-17 08:46:22 UTC (rev 4041) @@ -57,7 +57,6 @@ Button can = (Button) findViewById(R.id.btnBack); can.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("previousMenu"); } }); @@ -65,7 +64,6 @@ Button menu = (Button) findViewById(R.id.btnMenu); menu.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("contextMenu"); } }); @@ -73,7 +71,6 @@ Button home = (Button) findViewById(R.id.btnHome); home.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("parentDir"); } }); @@ -81,7 +78,6 @@ Button info = (Button) findViewById(R.id.btnInfo); info.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("showInfo"); } }); @@ -89,7 +85,6 @@ Button left = (Button) findViewById(R.id.btnLeft); left.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("moveLeft"); } }); @@ -97,7 +92,6 @@ Button right = (Button) findViewById(R.id.btnRight); right.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("moveRight"); } }); @@ -105,7 +99,6 @@ Button up = (Button) findViewById(R.id.btnUp); up.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("moveUp"); } }); @@ -113,7 +106,6 @@ Button down = (Button) findViewById(R.id.btnDown); down.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("moveDown"); } }); @@ -121,7 +113,6 @@ Button ok = (Button) findViewById(R.id.btnOk); ok.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("selectItem"); } }); @@ -136,7 +127,6 @@ Button pause = (Button) findViewById(R.id.btnPause); pause.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("pause"); } }); @@ -144,7 +134,6 @@ Button stop = (Button) findViewById(R.id.btnStop); stop.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("stop"); } }); @@ -152,7 +141,6 @@ Button skipForw = (Button) findViewById(R.id.btnSkipForw); skipForw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("nextItem"); } }); @@ -160,7 +148,6 @@ Button skipBack = (Button) findViewById(R.id.btnSkipBack); skipBack.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("prevItem"); } }); @@ -168,7 +155,6 @@ Button fForw = (Button) findViewById(R.id.btnFForw); fForw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("forward"); } }); @@ -176,7 +162,6 @@ Button fBackw = (Button) findViewById(R.id.btnFBack); fBackw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("rewind"); } }); @@ -188,6 +173,8 @@ public void PostCommand(String button) { + DoVibrate(); + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); AssetManager assetManager = getAssets(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-16 20:51:21 UTC (rev 4040) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-17 08:46:22 UTC (rev 4041) @@ -56,21 +56,18 @@ Button btnVolumeUp = (Button) findViewById(R.id.btnVolumeUp); btnVolumeUp.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("volumeUp"); } }); Button btnVolumeDown = (Button) findViewById(R.id.btnVolumeDown); btnVolumeDown.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("volumeDown"); } }); Button btnVolumeMute = (Button) findViewById(R.id.btnVolumeMute); btnVolumeMute.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("volumeMute"); } }); @@ -78,14 +75,12 @@ Button btnChannelUp = (Button) findViewById(R.id.btnChannelUp); btnChannelUp.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("nextChannel"); } }); Button btnChannelDown = (Button) findViewById(R.id.btnChannelDown); btnChannelDown.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("prevChannel"); } }); @@ -93,7 +88,6 @@ Button btnExit = (Button) findViewById(R.id.btnExit); btnExit.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("exit"); } }); @@ -106,14 +100,12 @@ Button btnHibernate = (Button) findViewById(R.id.btnHibernate); btnHibernate.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("hibernate"); } }); Button btnRestart = (Button) findViewById(R.id.btnRestart); btnRestart.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("restart"); } }); @@ -127,7 +119,6 @@ Button btnWakeOnLan = (Button) findViewById(R.id.btnWakeOnLan); btnWakeOnLan.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - DoVibrate(); PostCommand("wakeonlan"); } }); @@ -136,6 +127,8 @@ public void PostCommand(String button) { + DoVibrate(); + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); AssetManager assetManager = getAssets(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java 2010-12-16 20:51:21 UTC (rev 4040) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java 2010-12-17 08:46:22 UTC (rev 4041) @@ -21,13 +21,11 @@ package mediaportal.remote; -import java.io.IOException; -import java.io.InputStream; + import mediaportal.remote.R; import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.content.res.AssetManager; import android.os.Bundle; import android.os.Vibrator; import android.view.GestureDetector; @@ -45,7 +43,7 @@ private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; private static final int SWIPE_THRESHOLD_VELOCITY = 200; - + /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { @@ -101,6 +99,15 @@ Button btn19 = (Button) findViewById(R.id.btnkey19); btn19.setOnClickListener(mClickListener); + // shift + Button btn20 = (Button) findViewById(R.id.btnkey20); + btn20.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + DoVibrate(); + + } + }); + Button btn21 = (Button) findViewById(R.id.btnkey21); btn21.setOnClickListener(mClickListener); Button btn22 = (Button) findViewById(R.id.btnkey22); @@ -115,9 +122,26 @@ btn26.setOnClickListener(mClickListener); Button btn27 = (Button) findViewById(R.id.btnkey27); btn27.setOnClickListener(mClickListener); + + Button btn30 = (Button) findViewById(R.id.btnkey30); + btn30.setOnClickListener(mClickListener); + + // space + Button btn31 = (Button) findViewById(R.id.btnkey31); + btn31.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + PostKey(" "); + } + }); + + Button btn32 = (Button) findViewById(R.id.btnkey32); + btn32.setOnClickListener(mClickListener); + Button btn33 = (Button) findViewById(R.id.btnkey33); + btn33.setOnClickListener(mClickListener); } private void PostKey(String Key) { + DoVibrate(); PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java 2010-12-16 20:51:21 UTC (rev 4040) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java 2010-12-17 08:46:22 UTC (rev 4041) @@ -62,6 +62,8 @@ } report += "-------------------------------\n\n"; + report += "Remote Version : initial release\n\n"; + report += "-------------------------------\n\n"; report += "--------- Device ---------\n\n"; report += "Brand: " + Build.BRAND + "\n"; report += "Device: " + Build.DEVICE + "\n"; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-16 20:51:21 UTC (rev 4040) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-17 08:46:22 UTC (rev 4041) @@ -31,6 +31,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -115,6 +116,14 @@ listview.setAdapter(new EfficientAdapter(musicAlbum.this)); } } + + public void DoVibrate() { + if (Settings.Vibrate) { + // Get instance of Vibrator from current Context + Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + v.vibrate(100); + } + } } private static class EfficientAdapter extends BaseAdapter { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-16 20:51:21 UTC (rev 4040) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-17 08:46:22 UTC (rev 4041) @@ -31,6 +31,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -65,7 +66,7 @@ musicResults.Select = item.Artist; musicResults.Mode = musicResults.SelectMode.Artist; - + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); startActivityForResult(myIntent, 0); @@ -116,6 +117,14 @@ listview.setAdapter(new EfficientAdapter(musicArtist.this)); } } + + public void DoVibrate() { + if (Settings.Vibrate) { + // Get instance of Vibrator from current Context + Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + v.vibrate(100); + } + } } private static class EfficientAdapter extends BaseAdapter { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-16 20:51:21 UTC (rev 4040) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-17 08:46:22 UTC (rev 4041) @@ -40,22 +40,16 @@ import android.os.Environment; import android.os.Handler; import android.util.Log; -import android.view.ContextMenu; import android.view.GestureDetector; -import android.view.MenuInflater; -import android.view.MenuItem; import android.view.MotionEvent; -import android.view.View; import android.view.Window; import android.view.WindowManager; -import android.view.ContextMenu.ContextMenuInfo; import android.view.GestureDetector.OnGestureListener; -import android.view.View.OnCreateContextMenuListener; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; -public class picturesfullscreen extends Activity implements OnGestureListener { +public class picturesfullscreen extends Activity implements OnGestureListener { private Handler mHandler = new Handler(); private GestureDetector gestureScanner; @@ -77,22 +71,22 @@ WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.picturesfullscreen); - gestureScanner = new GestureDetector(picturesfullscreen.this); - new setPicture().execute(); } - private class setPicture extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(picturesfullscreen.this); + private final ProgressDialog dialog = new ProgressDialog( + picturesfullscreen.this); DirItems item = pictures.pictureList.get(pictures.selectedPicture); // can use UI thread here protected void onPreExecute() { - this.dialog.setMessage("Loading..."); - this.dialog.show(); + if (!slideShow) { + this.dialog.setMessage("Loading..."); + this.dialog.show(); + } } // automatically done on worker thread (separate from UI thread) @@ -100,7 +94,7 @@ if (!item.isFolder) { httpHandler http = new httpHandler(); String file = "http://" + Settings.Server + ":" + Settings.Port - + "/pictures/"; + + "/pictures/"; file += pictures.actualDir + item.File; item.Picture = http.DownloadImage(file.replaceAll(" ", "%20")); } @@ -114,17 +108,15 @@ this.dialog.dismiss(); } - if (item.isFolder != true){ + if (item.isFolder != true) { ImageView imagev = (ImageView) findViewById(R.id.ImageView01); imagev.setImageBitmap(item.Picture); TextView txt = (TextView) findViewById(R.id.full_text); txt.setText(item.File); } - } - } + } - @Override public void onStart() { super.onStart(); @@ -145,10 +137,9 @@ pictures.selectedPicture = 0; new setPicture().execute(); - } - else if (randomShow) { - String req = "http://" + Settings.Server + ":" - + Settings.Port + "/random/pictures/random.jpg"; + } else if (randomShow) { + String req = "http://" + Settings.Server + ":" + Settings.Port + + "/random/pictures/random.jpg"; httpHandler handler = new httpHandler(); Bitmap pic = handler.DownloadImage(req); @@ -171,7 +162,6 @@ mHandler.removeCallbacks(mUpdateTimeTask); } - @Override protected void onResume() { super.onResume(); @@ -180,14 +170,13 @@ mHandler.postDelayed(mUpdateTimeTask, SlideInterval); } - // **************** // Menu Functions // ****************** private void OpenURL() { DirItems item = pictures.pictureList.get(pictures.selectedPicture); String file = "http://" + Settings.Server + ":" + Settings.Port - + "/pictures/"; + + "/pictures/"; file += pictures.actualDir + item.File; String url = file.replaceAll(" ", "%20"); Intent i = new Intent(Intent.ACTION_VIEW); @@ -207,7 +196,6 @@ + item.File.toString()); } catch (FileNotFoundException e) { - // TODO Auto-generated catch block e.printStackTrace(); Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString()); @@ -216,7 +204,6 @@ try { outStream.flush(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString()); @@ -224,10 +211,14 @@ try { outStream.close(); + @SuppressWarnings("unused") + MediaScannerNotifier media = new MediaScannerNotifier( + picturesfullscreen.this, fPath + "/" + + item.File.toString(), "image/jpeg"); + Toast.makeText(picturesfullscreen.this, "File saved.", Toast.LENGTH_SHORT).show(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString()); @@ -248,7 +239,7 @@ picMessageIntent.setType("image/jpeg"); picMessageIntent.putExtra(Intent.EXTRA_STREAM, item.Picture); startActivity(Intent.createChooser(picMessageIntent, - "Send picture using:")); + "Send picture using:")); } catch (Exception e) { Log.e("Debug", "SendPicture " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString()); @@ -256,6 +247,9 @@ } } + // **************** + // gesture control + // **************** @Override public boolean onTouchEvent(MotionEvent me) { @@ -274,12 +268,12 @@ if (e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { - if (pictures.selectedPicture < max - 1) { + if (pictures.selectedPicture < max - 1) { pictures.selectedPicture++; new setPicture().execute(); } else - Toast.makeText(this, "reached end +", - Toast.LENGTH_SHORT).show(); + Toast.makeText(this, "reached end +", Toast.LENGTH_SHORT) + .show(); return true; } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { @@ -288,8 +282,8 @@ pictures.selectedPicture--; new setPicture().execute(); } else - Toast.makeText(this, "reached end -", - Toast.LENGTH_SHORT).show(); + Toast.makeText(this, "reached end -", Toast.LENGTH_SHORT) + .show(); return true; } } catch (Exception e) { @@ -306,21 +300,21 @@ String slidestatus; String randomslidestatus; - if (slideShow == true) + if (slideShow == true) slidestatus = "Stop slideshow"; else slidestatus = "Start slideshow"; - if (randomShow == true) + if (randomShow == true) randomslidestatus = "Stop random slideshow"; else randomslidestatus = "Start random slideshow"; - final CharSequence[] items = { "Save to sd card", "Open in browser", - "Send Picture", slidestatus ,randomslidestatus, "Cancel" }; + "Send Picture", slidestatus, randomslidestatus, "Cancel" }; - AlertDialog.Builder builder = new AlertDialog.Builder(picturesfullscreen.this); + AlertDialog.Builder builder = new AlertDialog.Builder( + picturesfullscreen.this); builder.setTitle("Picture optoins"); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { @@ -368,28 +362,21 @@ } public boolean onSingleTapUp(MotionEvent arg0) { - if (slideShow == true || randomShow == true){ - if (SlideshowPaused == false) - { + if (slideShow == true || randomShow == true) { + if (SlideshowPaused == false) { onPause(); - Toast.makeText(this, "Pause slideshow", - Toast.LENGTH_SHORT).show(); + Toast.makeText(this, "Pause slideshow", Toast.LENGTH_SHORT) + .show(); return true; - } - else - { - onResume(); - Toast.makeText(this, "Resume slideshow", - Toast.LENGTH_SHORT).show(); + } else { + onResume(); + Toast.makeText(this, "Resume slideshow", Toast.LENGTH_SHORT) + .show(); return true; } - } - else - { + } else { return false; } } - - } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-16 20:51:21 UTC (rev 4040) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-17 08:46:22 UTC (rev 4041) @@ -354,7 +354,16 @@ PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); if (playList.Count > 0) playlistPlayer.Play(0); + } + private void StartPlayerLast() + { + // we need to do this, we could crash external players because their are not thread safe. + PlayListPlayer playlistPlayer = PlayListPlayer.SingletonPlayer; + playlistPlayer.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC; + PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); + if (playList.Count > 0) + playlistPlayer.Play(playList.Count - 1); } private void ExceuteCommand(string Message) @@ -392,9 +401,9 @@ GUIGraphicsContext.OnAction(action); } else - { - StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayer); - GUIGraphicsContext.form.Invoke(del, new object[] { }); + { + StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayer); + GUIGraphicsContext.form.Invoke(del, new object[] { }); } } if (data["command"] == ("ACTION_STOP")) @@ -589,6 +598,12 @@ playlistItem.MusicTag = tag; playList.Add(playlistItem); + + if (!g_Player.Playing) + { + StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayerLast); + GUIGraphicsContext.form.Invoke(del, new object[] { }); + } } } #endregion @@ -644,6 +659,12 @@ playlistItem.MusicTag = tag; playList.Add(playlistItem); + + if (!g_Player.Playing) + { + StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayerLast); + GUIGraphicsContext.form.Invoke(del, new object[] { }); + } } } @@ -866,7 +887,7 @@ byte[] b; Bitmap thumb = (Bitmap)bit.Clone(); - thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 85, 85, false, true); + thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 85, 60, false, true); b = BildToByteArray((Image)thumb); @@ -1088,7 +1109,7 @@ byte[] b; Bitmap thumb = (Bitmap)bit.Clone(); - thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 85, 85, false, true); + thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 85, 60, false, true); b = BildToByteArray((Image)thumb); 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. |
From: <Rol...@us...> - 2010-12-16 20:51:27
|
Revision: 4040 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4040&view=rev Author: Rollsroyc3 Date: 2010-12-16 20:51:21 +0000 (Thu, 16 Dec 2010) Log Message: ----------- bugfix Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-16 20:31:18 UTC (rev 4039) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-16 20:51:21 UTC (rev 4040) @@ -137,28 +137,27 @@ public void run() { if (slideShow) { - if (!randomShow) { - int max = pictures.pictureList.size(); + int max = pictures.pictureList.size(); - if (pictures.selectedPicture < max - 1) - pictures.selectedPicture++; - else - pictures.selectedPicture = 0; + if (pictures.selectedPicture < max - 1) + pictures.selectedPicture++; + else + pictures.selectedPicture = 0; - new setPicture().execute(); - } else { - String req = "http://" + Settings.Server + ":" - + Settings.Port + "/random/pictures/random.jpg"; - httpHandler handler = new httpHandler(); + new setPicture().execute(); + } + else if (randomShow) { + String req = "http://" + Settings.Server + ":" + + Settings.Port + "/random/pictures/random.jpg"; + httpHandler handler = new httpHandler(); - Bitmap pic = handler.DownloadImage(req); + Bitmap pic = handler.DownloadImage(req); - ImageView imagev = (ImageView) findViewById(R.id.ImageView01); - imagev.setImageBitmap(pic); + ImageView imagev = (ImageView) findViewById(R.id.ImageView01); + imagev.setImageBitmap(pic); - TextView txt = (TextView) findViewById(R.id.full_text); - txt.setText("Random slide show"); - } + TextView txt = (TextView) findViewById(R.id.full_text); + txt.setText("Random slide show"); } mHandler.postDelayed(mUpdateTimeTask, SlideInterval); @@ -306,21 +305,21 @@ public void onLongPress(MotionEvent arg0) { String slidestatus; String randomslidestatus; - + if (slideShow == true) slidestatus = "Stop slideshow"; else slidestatus = "Start slideshow"; - + if (randomShow == true) randomslidestatus = "Stop random slideshow"; else randomslidestatus = "Start random slideshow"; - - + + final CharSequence[] items = { "Save to sd card", "Open in browser", "Send Picture", slidestatus ,randomslidestatus, "Cancel" }; - + AlertDialog.Builder builder = new AlertDialog.Builder(picturesfullscreen.this); builder.setTitle("Picture optoins"); builder.setItems(items, new DialogInterface.OnClickListener() { @@ -340,12 +339,18 @@ slideShow = false; else slideShow = true; + + mHandler.removeCallbacks(mUpdateTimeTask); + mHandler.postDelayed(mUpdateTimeTask, SlideInterval); break; case 4: if (randomShow == true) randomShow = false; else randomShow = true; + + mHandler.removeCallbacks(mUpdateTimeTask); + mHandler.postDelayed(mUpdateTimeTask, SlideInterval); break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Rol...@us...> - 2010-12-16 20:31:25
|
Revision: 4039 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4039&view=rev Author: Rollsroyc3 Date: 2010-12-16 20:31:18 +0000 (Thu, 16 Dec 2010) Log Message: ----------- updated swipe, added alertdialog, pause and resume to slideshow. Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-16 16:55:31 UTC (rev 4038) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-16 20:31:18 UTC (rev 4039) @@ -29,7 +29,9 @@ import mediaportal.remote.R; import mediaportal.remote.ReceiveDirectoryXmlHandler.DirItems; import android.app.Activity; +import android.app.AlertDialog; import android.app.ProgressDialog; +import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; @@ -48,6 +50,7 @@ import android.view.WindowManager; import android.view.ContextMenu.ContextMenuInfo; import android.view.GestureDetector.OnGestureListener; +import android.view.View.OnCreateContextMenuListener; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; @@ -74,58 +77,54 @@ WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.picturesfullscreen); - ImageView imagev = (ImageView) findViewById(R.id.ImageView01); - //registerForContextMenu(imagev); - - gestureScanner = new GestureDetector(this); - + + gestureScanner = new GestureDetector(picturesfullscreen.this); + new setPicture().execute(); - + } - - - - private class setPicture extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(picturesfullscreen.this); - DirItems item = pictures.pictureList.get(pictures.selectedPicture); - - // can use UI thread here - protected void onPreExecute() { - this.dialog.setMessage("Loading..."); - this.dialog.show(); - } - - // automatically done on worker thread (separate from UI thread) - protected Void doInBackground(final String... args) { - if (!item.isFolder) { - httpHandler http = new httpHandler(); - String file = "http://" + Settings.Server + ":" + Settings.Port - + "/pictures/"; - file += pictures.actualDir + item.File; - item.Picture = http.DownloadImage(file.replaceAll(" ", "%20")); - } - - return null; - } - - // can use UI thread here - protected void onPostExecute(final Void unused) { - if (this.dialog.isShowing()) { - this.dialog.dismiss(); - } - - if (item.isFolder != true){ - ImageView imagev = (ImageView) findViewById(R.id.ImageView01); - imagev.setImageBitmap(item.Picture); - TextView txt = (TextView) findViewById(R.id.full_text); - txt.setText(item.File); - } - } - } - + private class setPicture extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(picturesfullscreen.this); + DirItems item = pictures.pictureList.get(pictures.selectedPicture); + // can use UI thread here + protected void onPreExecute() { + this.dialog.setMessage("Loading..."); + this.dialog.show(); + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + if (!item.isFolder) { + httpHandler http = new httpHandler(); + String file = "http://" + Settings.Server + ":" + Settings.Port + + "/pictures/"; + file += pictures.actualDir + item.File; + item.Picture = http.DownloadImage(file.replaceAll(" ", "%20")); + } + + return null; + } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + this.dialog.dismiss(); + } + + if (item.isFolder != true){ + ImageView imagev = (ImageView) findViewById(R.id.ImageView01); + imagev.setImageBitmap(item.Picture); + TextView txt = (TextView) findViewById(R.id.full_text); + txt.setText(item.File); + } + + } + } + + @Override public void onStart() { super.onStart(); @@ -145,18 +144,18 @@ pictures.selectedPicture++; else pictures.selectedPicture = 0; - - new setPicture().execute(); + + new setPicture().execute(); } else { String req = "http://" + Settings.Server + ":" - + Settings.Port + "/random/pictures/random.jpg"; + + Settings.Port + "/random/pictures/random.jpg"; httpHandler handler = new httpHandler(); Bitmap pic = handler.DownloadImage(req); ImageView imagev = (ImageView) findViewById(R.id.ImageView01); imagev.setImageBitmap(pic); - + TextView txt = (TextView) findViewById(R.id.full_text); txt.setText("Random slide show"); } @@ -169,78 +168,27 @@ @Override public void onPause() { super.onPause(); - SlideshowPaused = true; + SlideshowPaused = true; mHandler.removeCallbacks(mUpdateTimeTask); } - - - @Override - protected void onResume() { - super.onResume(); - SlideshowPaused = false; - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, SlideInterval); - } - - public void onCreateContextMenu(ContextMenu menu, View v, - ContextMenuInfo menuInfo) { - super.onCreateContextMenu(menu, v, menuInfo); - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.picturefullscreenmenu, menu); - if (slideShow) { - if (randomShow) { - MenuItem item = menu.findItem(R.id.rslide); - item.setChecked(slideShow); - } else { - MenuItem item = menu.findItem(R.id.slide); - item.setChecked(slideShow); - } - } - } - @Override - public boolean onContextItemSelected(MenuItem item) { - - String title = (String) item.getTitle(); - - if (title.compareTo("Save to sd card") == 0) { - SavetoSDCard(); - return true; - } else if (title.compareTo("Open in browser") == 0) { - OpenURL(); - return true; - } else if (title.compareTo("Send Picture") == 0) { - SendPicture(); - return true; - } else if (title.compareTo("Slide show") == 0) { - if ((slideShow == false) || (slideShow && randomShow)) { - slideShow = true; - randomShow = false; - } else { - slideShow = false; - } - return true; - } else if (title.compareTo("Random slide show") == 0) { - if ((slideShow == false) || (slideShow && !randomShow)) { - slideShow = true; - randomShow = true; - } else { - slideShow = false; - } - return true; - } - return false; + protected void onResume() { + super.onResume(); + SlideshowPaused = false; + mHandler.removeCallbacks(mUpdateTimeTask); + mHandler.postDelayed(mUpdateTimeTask, SlideInterval); } + // **************** // Menu Functions // ****************** private void OpenURL() { DirItems item = pictures.pictureList.get(pictures.selectedPicture); String file = "http://" + Settings.Server + ":" + Settings.Port - + "/pictures/"; + + "/pictures/"; file += pictures.actualDir + item.File; String url = file.replaceAll(" ", "%20"); Intent i = new Intent(Intent.ACTION_VIEW); @@ -301,21 +249,20 @@ picMessageIntent.setType("image/jpeg"); picMessageIntent.putExtra(Intent.EXTRA_STREAM, item.Picture); startActivity(Intent.createChooser(picMessageIntent, - "Send picture using:")); + "Send picture using:")); } catch (Exception e) { Log.e("Debug", "SendPicture " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString()); // e.printStackTrace(); } } - - + + @Override public boolean onTouchEvent(MotionEvent me) { - this.gestureScanner.onTouchEvent(me); - return super.onTouchEvent(me); + return gestureScanner.onTouchEvent(me); } - + public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { try { @@ -342,8 +289,8 @@ pictures.selectedPicture--; new setPicture().execute(); } else - Toast.makeText(this, "reached end -", - Toast.LENGTH_SHORT).show(); + Toast.makeText(this, "reached end -", + Toast.LENGTH_SHORT).show(); return true; } } catch (Exception e) { @@ -357,6 +304,54 @@ } public void onLongPress(MotionEvent arg0) { + String slidestatus; + String randomslidestatus; + + if (slideShow == true) + slidestatus = "Stop slideshow"; + else + slidestatus = "Start slideshow"; + + if (randomShow == true) + randomslidestatus = "Stop random slideshow"; + else + randomslidestatus = "Start random slideshow"; + + + final CharSequence[] items = { "Save to sd card", "Open in browser", + "Send Picture", slidestatus ,randomslidestatus, "Cancel" }; + + AlertDialog.Builder builder = new AlertDialog.Builder(picturesfullscreen.this); + builder.setTitle("Picture optoins"); + builder.setItems(items, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int item) { + switch (item) { + case 0: + SavetoSDCard(); + break; + case 1: + OpenURL(); + break; + case 2: + SendPicture(); + break; + case 3: + if (slideShow == true) + slideShow = false; + else + slideShow = true; + break; + case 4: + if (randomShow == true) + randomShow = false; + else + randomShow = true; + break; + } + } + }); + AlertDialog alert = builder.create(); + alert.show(); } public boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2, @@ -372,16 +367,16 @@ if (SlideshowPaused == false) { onPause(); - Toast.makeText(this, "Pause", - Toast.LENGTH_SHORT).show(); + Toast.makeText(this, "Pause slideshow", + Toast.LENGTH_SHORT).show(); return true; } else { - onResume(); - Toast.makeText(this, "Play", - Toast.LENGTH_SHORT).show(); - return true; + onResume(); + Toast.makeText(this, "Resume slideshow", + Toast.LENGTH_SHORT).show(); + return true; } } else @@ -389,7 +384,7 @@ return false; } } - - + + } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-16 16:55:37
|
Revision: 4038 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4038&view=rev Author: kroko_koenig Date: 2010-12-16 16:55:31 +0000 (Thu, 16 Dec 2010) Log Message: ----------- updated installer Modified Paths: -------------- trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) 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. |
From: <kro...@us...> - 2010-12-16 16:53:30
|
Revision: 4037 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4037&view=rev Author: kroko_koenig Date: 2010-12-16 16:53:23 +0000 (Thu, 16 Dec 2010) Log Message: ----------- so hopefully better playing now, also change icon play/pause Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-16 16:53:23 UTC (rev 4037) @@ -79,7 +79,6 @@ public static final int wake_on_lan=0x7f020041; } public static final class id { - public static final int Button01=0x7f060060; public static final int GridView01=0x7f060017; public static final int ImageView01=0x7f060019; public static final int LinearLayout00=0x7f06004a; @@ -146,7 +145,21 @@ public static final int btnkey17=0x7f06005c; public static final int btnkey18=0x7f06005d; public static final int btnkey19=0x7f06005e; - public static final int clearplaylist=0x7f060067; + public static final int btnkey20=0x7f060060; + public static final int btnkey21=0x7f060061; + public static final int btnkey22=0x7f060062; + public static final int btnkey23=0x7f060063; + public static final int btnkey24=0x7f060064; + public static final int btnkey25=0x7f060065; + public static final int btnkey26=0x7f060066; + public static final int btnkey27=0x7f060067; + public static final int btnkey28=0x7f060068; + public static final int btnkey29=0x7f060069; + public static final int btnkey30=0x7f06006a; + public static final int btnkey31=0x7f06006b; + public static final int btnkey32=0x7f06006c; + public static final int btnkey33=0x7f06006d; + public static final int clearplaylist=0x7f060074; public static final int full_text=0x7f060018; public static final int icon_image=0x7f060001; public static final int icon_text=0x7f060002; @@ -170,18 +183,18 @@ public static final int now_progress=0x7f06001e; public static final int now_stop=0x7f060024; public static final int now_title=0x7f060021; - public static final int open=0x7f06006a; - public static final int playlist=0x7f060066; - public static final int rslide=0x7f06006d; - public static final int save=0x7f060069; - public static final int sdcard=0x7f060068; - public static final int send=0x7f06006b; - public static final int server_ip=0x7f060061; - public static final int server_macid=0x7f060063; - public static final int server_port=0x7f060062; - public static final int slide=0x7f06006c; - public static final int title=0x7f060065; - public static final int vibration=0x7f060064; + public static final int open=0x7f060077; + public static final int playlist=0x7f060073; + public static final int rslide=0x7f06007a; + public static final int save=0x7f060076; + public static final int sdcard=0x7f060075; + public static final int send=0x7f060078; + public static final int server_ip=0x7f06006e; + public static final int server_macid=0x7f060070; + public static final int server_port=0x7f06006f; + public static final int slide=0x7f060079; + public static final int title=0x7f060072; + public static final int vibration=0x7f060071; public static final int widget0=0x7f060011; public static final int widget00=0x7f06002a; public static final int widget01=0x7f06002e; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2010-12-16 16:53:23 UTC (rev 4037) @@ -13,41 +13,41 @@ <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> - <ImageButton android:src="@drawable/main_pictures" android:scaleType="fitXY" + <Button android:background="@drawable/main_pictures" android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" android:layout_marginRight="40dip" android:padding="5dip" android:id="@+id/btn_main_pictures"> - </ImageButton> + </Button> - <ImageButton android:layout_height="80dip" android:layout_width="80dip" + <Button android:layout_height="80dip" android:layout_width="80dip" android:scaleType="fitXY" android:padding="5dip" - android:src="@drawable/main_music" android:id="@+id/btn_main_music"> - </ImageButton> + android:background="@drawable/main_music" android:id="@+id/btn_main_music"> + </Button> </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> - <ImageButton android:scaleType="fitXY" + <Button android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" - android:padding="5dip" android:layout_marginRight="40dip" android:src="@drawable/main_video" android:id="@+id/btn_main_video"> - </ImageButton> + android:padding="5dip" android:layout_marginRight="40dip" android:background="@drawable/main_video" android:id="@+id/btn_main_video"> + </Button> - <ImageButton android:layout_height="80dip" android:layout_width="80dip" - android:scaleType="fitXY" android:padding="5dip" android:src="@drawable/main_remote" android:id="@+id/btn_main_remote"> - </ImageButton> + <Button android:layout_height="80dip" android:layout_width="80dip" + android:scaleType="fitXY" android:padding="5dip" android:background="@drawable/main_remote" android:id="@+id/btn_main_remote"> + </Button> </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> - <ImageButton android:scaleType="fitXY" + <Button android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" - android:padding="5dip" android:layout_marginRight="40dip" android:src="@drawable/main_now_playing" android:id="@+id/btn_main_now_playing"> - </ImageButton> + android:padding="5dip" android:layout_marginRight="40dip" android:background="@drawable/main_now_playing" android:id="@+id/btn_main_now_playing"> + </Button> - <ImageButton android:layout_height="80dip" android:layout_width="80dip" - android:scaleType="fitXY" android:padding="5dip" android:src="@drawable/main_settings" android:id="@+id/btn_main_settings"> - </ImageButton> + <Button android:layout_height="80dip" android:layout_width="80dip" + android:scaleType="fitXY" android:padding="5dip" android:background="@drawable/main_settings" android:id="@+id/btn_main_settings"> + </Button> </TableRow> @@ -61,20 +61,16 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:background="#0FF0FFFF" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> - - - - - <ImageButton android:src="@drawable/main_skp_back" android:scaleType="fitXY" + <Button android:background="@drawable/main_skp_back" android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> + android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip"></Button> <ImageButton android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_play" android:src="@drawable/main_play" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> - <ImageButton android:scaleType="fitXY" + android:id="@+id/btn_main_play" android:background="@drawable/main_play" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> + <Button android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_skp_forw" android:src="@drawable/main_skp_forw" android:padding="2dip"></ImageButton> + android:id="@+id/btn_main_skp_forw" android:background="@drawable/main_skp_forw" android:padding="2dip"></Button> </LinearLayout> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml 2010-12-16 16:53:23 UTC (rev 4037) @@ -63,7 +63,7 @@ <ImageButton android:id="@+id/now_stop" android:background="@drawable/stop" android:layout_height="60dip" android:layout_width="60dip"/> <ImageButton android:id="@+id/now_play" - android:layout_height="60dip" android:background="@drawable/right" android:layout_width="60dip"/> + android:layout_height="60dip" android:background="@drawable/right" android:layout_width="60dip" android:scaleType="fitXY"/> <ImageButton android:id="@+id/now_next" android:layout_height="60dip" android:background="@drawable/skip_forward" android:layout_width="60dip"/> <ImageButton android:id="@+id/now_list" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml 2010-12-16 16:53:23 UTC (rev 4037) @@ -16,34 +16,34 @@ android:layout_width="fill_parent" android:paddingBottom="5dip" android:paddingTop="5dip"> <Button android:id="@+id/btnkey01" android:padding="0dip" - android:text="Q" android:layout_width="32dip" android:layout_height="32dip"> + android:text="Q" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey02" android:padding="0dip" - android:text="W" android:layout_height="32dip" android:layout_width="32dip"> + android:text="W" android:layout_height="48dip" android:layout_width="32dip"> </Button> <Button android:id="@+id/btnkey03" android:padding="0dip" - android:text="E" android:layout_width="32dip" android:layout_height="32dip"> + android:text="E" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey04" android:padding="0dip" - android:text="R" android:layout_width="32dip" android:layout_height="32dip"> + android:text="R" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey05" android:padding="0dip" - android:text="T" android:layout_height="32dip" android:layout_width="32dip"> + android:text="T" android:layout_height="48dip" android:layout_width="32dip"> </Button> <Button android:id="@+id/btnkey06" android:padding="0dip" - android:text="Y" android:layout_width="32dip" android:layout_height="32dip"> + android:text="Y" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey07" android:padding="0dip" - android:text="U" android:layout_width="32dip" android:layout_height="32dip"> + android:text="U" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey08" android:padding="0dip" - android:text="I" android:layout_height="32dip" android:layout_width="32dip"> + android:text="I" android:layout_height="48dip" android:layout_width="32dip"> </Button> <Button android:id="@+id/btnkey09" android:padding="0dip" - android:text="O" android:layout_width="32dip" android:layout_height="32dip"> + android:text="O" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey10" android:padding="0dip" - android:text="P" android:layout_width="32dip" android:layout_height="32dip"> + android:text="P" android:layout_width="32dip" android:layout_height="48dip"> </Button> </LinearLayout> @@ -55,31 +55,31 @@ android:paddingBottom="5dip"> <Button android:id="@+id/btnkey11" android:padding="0dip" - android:text="A" android:layout_width="32dip" android:layout_height="32dip"> + android:text="A" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey12" android:padding="0dip" - android:text="S" android:layout_height="32dip" android:layout_width="32dip"> + android:text="S" android:layout_height="48dip" android:layout_width="32dip"> </Button> <Button android:id="@+id/btnkey13" android:padding="0dip" - android:text="D" android:layout_width="32dip" android:layout_height="32dip"> + android:text="D" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey14" android:padding="0dip" - android:text="F" android:layout_width="32dip" android:layout_height="32dip"> + android:text="F" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey15" android:padding="0dip" - android:text="G" android:layout_height="32dip" android:layout_width="32dip"> + android:text="G" android:layout_height="48dip" android:layout_width="32dip"> </Button> <Button android:id="@+id/btnkey16" android:padding="0dip" - android:text="H" android:layout_width="32dip" android:layout_height="32dip"> + android:text="H" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey17" android:padding="0dip" - android:text="J" android:layout_width="32dip" android:layout_height="32dip"> + android:text="J" android:layout_width="32dip" android:layout_height="48dip"> </Button> <Button android:id="@+id/btnkey18" android:padding="0dip" - android:text="K" android:layout_height="32dip" android:layout_width="32dip"> + android:text="K" android:layout_height="48dip" android:layout_width="32dip"> </Button> <Button android:id="@+id/btnkey19" android:padding="0dip" - android:text="L" android:layout_width="32dip" android:layout_height="32dip"> + android:text="L" android:layout_width="32dip" android:layout_height="48dip"> </Button> </LinearLayout> @@ -90,32 +90,32 @@ android:layout_width="wrap_content" android:paddingBottom="5dip"> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="Shift" android:layout_width="48dip" android:layout_height="32dip"> + <Button android:id="@+id/btnkey20" android:padding="0dip" + android:text="Shift" android:layout_width="48dip" android:layout_height="48dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="Z" android:layout_height="32dip" android:layout_width="32dip"> + <Button android:id="@+id/btnkey21" android:padding="0dip" + android:text="Z" android:layout_height="48dip" android:layout_width="32dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="X" android:layout_width="32dip" android:layout_height="32dip"> + <Button android:id="@+id/btnkey22" android:padding="0dip" + android:text="X" android:layout_width="32dip" android:layout_height="48dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="C" android:layout_width="32dip" android:layout_height="32dip"> + <Button android:id="@+id/btnkey23" android:padding="0dip" + android:text="C" android:layout_width="32dip" android:layout_height="48dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="V" android:layout_height="32dip" android:layout_width="32dip"> + <Button android:id="@+id/btnkey24" android:padding="0dip" + android:text="V" android:layout_height="48dip" android:layout_width="32dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="B" android:layout_width="32dip" android:layout_height="32dip"> + <Button android:id="@+id/btnkey25" android:padding="0dip" + android:text="B" android:layout_width="32dip" android:layout_height="48dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="N" android:layout_width="32dip" android:layout_height="32dip"> + <Button android:id="@+id/btnkey26" android:padding="0dip" + android:text="N" android:layout_width="32dip" android:layout_height="48dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="M" android:layout_height="32dip" android:layout_width="32dip"> + <Button android:id="@+id/btnkey27" android:padding="0dip" + android:text="M" android:layout_height="48dip" android:layout_width="32dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="DEL" android:layout_width="48dip" android:layout_height="32dip"> + <Button android:id="@+id/btnkey28" android:padding="0dip" + android:text="DEL" android:layout_width="48dip" android:layout_height="48dip"> </Button> </LinearLayout> @@ -126,20 +126,20 @@ android:layout_width="wrap_content" android:paddingBottom="5dip"> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text=".?123" android:layout_width="64dip" android:layout_height="32dip"> + <Button android:id="@+id/btnkey29" android:padding="0dip" + android:text=".?123" android:layout_width="64dip" android:layout_height="48dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:layout_height="32dip" android:layout_width="32dip" android:text="/"> + <Button android:id="@+id/btnkey30" android:padding="0dip" + android:layout_height="48dip" android:layout_width="32dip" android:text="/"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="Space" android:layout_height="32dip" android:layout_width="64dip"> + <Button android:id="@+id/btnkey31" android:padding="0dip" + android:text="Space" android:layout_height="48dip" android:layout_width="64dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="." android:layout_height="32dip" android:layout_width="32dip"> + <Button android:id="@+id/btnkey32" android:padding="0dip" + android:text="." android:layout_height="48dip" android:layout_width="32dip"> </Button> - <Button android:id="@+id/Button01" android:padding="0dip" - android:text="www" android:layout_width="64dip" android:layout_height="32dip"> + <Button android:id="@+id/btnkey33" android:padding="0dip" + android:text="www" android:layout_width="64dip" android:layout_height="48dip"> </Button> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml 2010-12-16 16:53:23 UTC (rev 4037) @@ -13,41 +13,41 @@ <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> - <ImageButton android:src="@drawable/main_pictures" android:scaleType="fitXY" + <Button android:background="@drawable/main_pictures" android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" android:layout_marginRight="40dip" android:padding="5dip" android:id="@+id/btn_main_pictures"> - </ImageButton> + </Button> - <ImageButton android:layout_height="80dip" android:layout_width="80dip" + <Button android:layout_height="80dip" android:layout_width="80dip" android:scaleType="fitXY" android:padding="5dip" - android:src="@drawable/main_music" android:id="@+id/btn_main_music"> - </ImageButton> + android:background="@drawable/main_music" android:id="@+id/btn_main_music"> + </Button> </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> - <ImageButton android:scaleType="fitXY" + <Button android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" - android:padding="5dip" android:layout_marginRight="40dip" android:src="@drawable/main_video" android:id="@+id/btn_main_video"> - </ImageButton> + android:padding="5dip" android:layout_marginRight="40dip" android:background="@drawable/main_video" android:id="@+id/btn_main_video"> + </Button> - <ImageButton android:layout_height="80dip" android:layout_width="80dip" - android:scaleType="fitXY" android:padding="5dip" android:src="@drawable/main_remote" android:id="@+id/btn_main_remote"> - </ImageButton> + <Button android:layout_height="80dip" android:layout_width="80dip" + android:scaleType="fitXY" android:padding="5dip" android:background="@drawable/main_remote" android:id="@+id/btn_main_remote"> + </Button> </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> - <ImageButton android:scaleType="fitXY" + <Button android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" - android:padding="5dip" android:layout_marginRight="40dip" android:src="@drawable/main_now_playing" android:id="@+id/btn_main_now_playing"> - </ImageButton> + android:padding="5dip" android:layout_marginRight="40dip" android:background="@drawable/main_now_playing" android:id="@+id/btn_main_now_playing"> + </Button> - <ImageButton android:layout_height="80dip" android:layout_width="80dip" - android:scaleType="fitXY" android:padding="5dip" android:src="@drawable/main_settings" android:id="@+id/btn_main_settings"> - </ImageButton> + <Button android:layout_height="80dip" android:layout_width="80dip" + android:scaleType="fitXY" android:padding="5dip" android:background="@drawable/main_settings" android:id="@+id/btn_main_settings"> + </Button> </TableRow> @@ -63,18 +63,14 @@ android:orientation="horizontal" android:background="#0FF0FFFF" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> - - - - - <ImageButton android:src="@drawable/main_skp_back" android:scaleType="fitXY" + <Button android:background="@drawable/main_skp_back" android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> + android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip"></Button> <ImageButton android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_play" android:src="@drawable/main_play" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> - <ImageButton android:scaleType="fitXY" + android:id="@+id/btn_main_play" android:background="@drawable/main_play" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> + <Button android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_skp_forw" android:src="@drawable/main_skp_forw" android:padding="2dip"></ImageButton> + android:id="@+id/btn_main_skp_forw" android:background="@drawable/main_skp_forw" android:padding="2dip"></Button> </LinearLayout> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml 2010-12-16 16:53:23 UTC (rev 4037) @@ -63,7 +63,7 @@ <ImageButton android:id="@+id/now_stop" android:background="@drawable/stop" android:layout_width="60dip" android:layout_height="60dip"/> <ImageButton android:id="@+id/now_play" - android:background="@drawable/right" android:layout_width="60dip" android:layout_height="60dip"/> + android:background="@drawable/right" android:layout_width="60dip" android:layout_height="60dip" android:scaleType="fitXY"/> <ImageButton android:id="@+id/now_next" android:background="@drawable/skip_forward" android:layout_width="60dip" android:layout_height="60dip"/> <ImageButton android:id="@+id/now_list" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java 2010-12-16 16:53:23 UTC (rev 4037) @@ -34,12 +34,13 @@ import android.view.MotionEvent; import android.view.View; import android.view.GestureDetector.OnGestureListener; +import android.view.View.OnClickListener; import android.widget.Button; public class Remote_03 extends Activity implements OnGestureListener { public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - + private GestureDetector gestureScanner; private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; @@ -52,36 +53,91 @@ setContentView(R.layout.remote03); gestureScanner = new GestureDetector(this); + + OnClickListener mClickListener = new OnClickListener() { + public void onClick(View v) { + Button btn = (Button)v; + PostKey(btn.getText().toString()); + } + }; + + Button btn01 = (Button) findViewById(R.id.btnkey01); + btn01.setOnClickListener(mClickListener); + Button btn02 = (Button) findViewById(R.id.btnkey02); + btn02.setOnClickListener(mClickListener); + Button btn03 = (Button) findViewById(R.id.btnkey03); + btn03.setOnClickListener(mClickListener); + Button btn04 = (Button) findViewById(R.id.btnkey04); + btn04.setOnClickListener(mClickListener); + Button btn05 = (Button) findViewById(R.id.btnkey05); + btn05.setOnClickListener(mClickListener); + Button btn06 = (Button) findViewById(R.id.btnkey06); + btn06.setOnClickListener(mClickListener); + Button btn07 = (Button) findViewById(R.id.btnkey07); + btn07.setOnClickListener(mClickListener); + Button btn08 = (Button) findViewById(R.id.btnkey08); + btn08.setOnClickListener(mClickListener); + Button btn09 = (Button) findViewById(R.id.btnkey09); + btn09.setOnClickListener(mClickListener); + Button btn10 = (Button) findViewById(R.id.btnkey10); + btn10.setOnClickListener(mClickListener); + Button btn11 = (Button) findViewById(R.id.btnkey11); + btn11.setOnClickListener(mClickListener); + Button btn12 = (Button) findViewById(R.id.btnkey12); + btn12.setOnClickListener(mClickListener); + Button btn13 = (Button) findViewById(R.id.btnkey13); + btn13.setOnClickListener(mClickListener); + Button btn14 = (Button) findViewById(R.id.btnkey14); + btn14.setOnClickListener(mClickListener); + Button btn15 = (Button) findViewById(R.id.btnkey15); + btn15.setOnClickListener(mClickListener); + Button btn16 = (Button) findViewById(R.id.btnkey16); + btn16.setOnClickListener(mClickListener); + Button btn17 = (Button) findViewById(R.id.btnkey17); + btn17.setOnClickListener(mClickListener); + Button btn18 = (Button) findViewById(R.id.btnkey18); + btn18.setOnClickListener(mClickListener); + Button btn19 = (Button) findViewById(R.id.btnkey19); + btn19.setOnClickListener(mClickListener); + + Button btn21 = (Button) findViewById(R.id.btnkey21); + btn21.setOnClickListener(mClickListener); + Button btn22 = (Button) findViewById(R.id.btnkey22); + btn22.setOnClickListener(mClickListener); + Button btn23 = (Button) findViewById(R.id.btnkey23); + btn23.setOnClickListener(mClickListener); + Button btn24 = (Button) findViewById(R.id.btnkey24); + btn24.setOnClickListener(mClickListener); + Button btn25 = (Button) findViewById(R.id.btnkey25); + btn25.setOnClickListener(mClickListener); + Button btn26 = (Button) findViewById(R.id.btnkey26); + btn26.setOnClickListener(mClickListener); + Button btn27 = (Button) findViewById(R.id.btnkey27); + btn27.setOnClickListener(mClickListener); } - public void PostCommand(String button) { - + private void PostKey(String Key) { + DoVibrate(); + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); - AssetManager assetManager = getAssets(); String xml = ""; - try { - InputStream inputStream = null; - inputStream = assetManager.open("cmd_" + button + ".xml"); + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>ACTION_KEY</command>"; + xml += "<key>" + Key + "</key>"; + xml += "</message>"; - int x = inputStream.read(); - - while (x != -1) { - xml = xml + (char) x; - x = inputStream.read(); - } - post.Post(xml); - } catch (IOException e) { - e.printStackTrace(); - } + post.Post(xml); } @Override public boolean onTouchEvent(MotionEvent me) { return gestureScanner.onTouchEvent(me); - } + } + public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { try { @@ -90,7 +146,7 @@ // right to left swipe if (e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { - + } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { Intent myIntent = new Intent(this, Remote_02.class); @@ -101,22 +157,26 @@ } return false; } - + public boolean onDown(MotionEvent arg0) { return true; } + public void onLongPress(MotionEvent arg0) { } + public boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2, float arg3) { return false; } + public void onShowPress(MotionEvent arg0) { } + public boolean onSingleTapUp(MotionEvent arg0) { return false; } - + public void DoVibrate() { if (Settings.Vibrate) { // Get instance of Vibrator from current Context Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-16 16:53:23 UTC (rev 4037) @@ -47,6 +47,7 @@ private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); private static String display = "nothing playing"; + private static String state = ""; @Override public void onCreate(Bundle savedInstanceState) { @@ -74,13 +75,9 @@ } - Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); - + Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); chkStatus(); - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, 1000); - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE); @@ -88,7 +85,7 @@ Settings.Port = settings.getString("Port", "8200"); Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); - ImageButton btnPictures = (ImageButton) findViewById(R.id.btn_main_pictures); + Button btnPictures = (Button) findViewById(R.id.btn_main_pictures); btnPictures.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); @@ -97,7 +94,7 @@ } }); - ImageButton btnMusic = (ImageButton) findViewById(R.id.btn_main_music); + Button btnMusic = (Button) findViewById(R.id.btn_main_music); btnMusic.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); @@ -106,7 +103,7 @@ } }); - ImageButton btnVideo = (ImageButton) findViewById(R.id.btn_main_video); + Button btnVideo = (Button) findViewById(R.id.btn_main_video); btnVideo.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); @@ -114,15 +111,10 @@ Toast.makeText(view.getContext(), "not implemented yet. Sorry !", Toast.LENGTH_LONG) .show(); - - int x = 0; - int y = 1; - - int z = y / x; // we do a exception ;-) } }); - ImageButton btnRemote = (ImageButton) findViewById(R.id.btn_main_remote); + Button btnRemote = (Button) findViewById(R.id.btn_main_remote); btnRemote.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); @@ -131,7 +123,7 @@ } }); - ImageButton btnNowPlaying = (ImageButton) findViewById(R.id.btn_main_now_playing); + Button btnNowPlaying = (Button) findViewById(R.id.btn_main_now_playing); btnNowPlaying.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); @@ -141,7 +133,7 @@ } }); - ImageButton btnSettings = (ImageButton) findViewById(R.id.btn_main_settings); + Button btnSettings = (Button) findViewById(R.id.btn_main_settings); btnSettings.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); @@ -150,7 +142,7 @@ } }); - ImageButton skipForw = (ImageButton) findViewById(R.id.btn_main_skp_forw); + Button skipForw = (Button) findViewById(R.id.btn_main_skp_forw); skipForw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); @@ -158,7 +150,7 @@ } }); - ImageButton skipBack = (ImageButton) findViewById(R.id.btn_main_skp_back); + Button skipBack = (Button) findViewById(R.id.btn_main_skp_back); skipBack.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); @@ -281,6 +273,14 @@ } @Override + public void onStart() { + super.onStart(); + + mHandler.removeCallbacks(mUpdateTimeTask); + mHandler.postDelayed(mUpdateTimeTask, 1000); + } + + @Override public void onPause() { super.onPause(); @@ -314,7 +314,9 @@ && (!nowplayinghandler.PlayerState .equals("no player active"))) { display = nowplayinghandler.Artist + " - " - + nowplayinghandler.Title; + + nowplayinghandler.Title + + " (" + nowplayinghandler.Actual + ")"; + state = nowplayinghandler.PlayerState; } return null; @@ -325,7 +327,19 @@ TextView txt0 = (TextView) findViewById(R.id.main_now_playing); txt0.setText(display); - + + ImageButton play = (ImageButton) findViewById(R.id.btn_main_play); + if(state.equals("playing")) + { + play.setImageDrawable(getResources() + .getDrawable(R.drawable.pause)); + } + else + { + play.setImageDrawable(getResources() + .getDrawable(R.drawable.right)); + } + mHandler.postDelayed(mUpdateTimeTask, 1000); } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-16 16:53:23 UTC (rev 4037) @@ -118,6 +118,18 @@ } } txt0.setText(display); + + ImageButton play = (ImageButton) findViewById(R.id.now_play); + if(nowplayinghandler.PlayerState.equals("playing")) + { + play.setImageDrawable(getResources() + .getDrawable(R.drawable.pause)); + } + else + { + play.setImageDrawable(getResources() + .getDrawable(R.drawable.right)); + } TextView txt1 = (TextView) findViewById(R.id.now_artist); txt1.setText(nowplayinghandler.Artist); Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-16 13:22:02 UTC (rev 4036) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-16 16:53:23 UTC (rev 4037) @@ -34,6 +34,8 @@ using System.Xml; using System.Drawing; using System.Web; +using System.Windows.Forms; +using System.Runtime.InteropServices; using MediaPortal.GUI.Library; using MediaPortal.Utils; @@ -51,6 +53,10 @@ { public class Request { + // Activate an application window. + [DllImport("USER32.DLL")] + public static extern bool SetForegroundWindow(IntPtr hWnd); + private Socket socket; private byte[] read; private byte[] buffer; @@ -386,19 +392,9 @@ GUIGraphicsContext.OnAction(action); } else - { - if (playlistPlayer.CurrentPlaylistType == PlayListType.PLAYLIST_NONE) - { + { StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayer); - GUIGraphicsContext.form.Invoke(del, new object[] { }); - - - } - else - { - Action action = new Action(Action.ActionType.ACTION_PLAY, 0, 0); - GUIGraphicsContext.OnAction(action); - } + GUIGraphicsContext.form.Invoke(del, new object[] { }); } } if (data["command"] == ("ACTION_STOP")) @@ -696,6 +692,16 @@ #endregion #endregion + + #region virtual keyboard + if (data["command"] == ("ACTION_KEY")) + { + IntPtr handle = GUIGraphicsContext.form.Handle; + + SetForegroundWindow(handle); + SendKeys.SendWait(data["key"]); + } + #endregion } } } 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. |
From: <kro...@us...> - 2010-12-16 13:22:09
|
Revision: 4036 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4036&view=rev Author: kroko_koenig Date: 2010-12-16 13:22:02 +0000 (Thu, 16 Dec 2010) Log Message: ----------- changed email adress to service.mediaportal + save to sd for mp3 from db Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-16 10:58:24 UTC (rev 4035) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-16 13:22:02 UTC (rev 4036) @@ -16,6 +16,7 @@ view playlist delete item from playlist clear playlist +save files from db to phone Video section ------------- @@ -38,7 +39,8 @@ ------------ Vibration feedback (not completed) switch WIFI on (just msg now) -gesture control for pictures (swipe) / alertdialog +gesture control for pictures (swipe) / alert dialog save files from Android to MP if the MP has no focus the remote doesnt work (normal) -Progress is not displayed +save huge files can cause out of memory, better save stream + Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java 2010-12-16 10:58:24 UTC (rev 4035) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java 2010-12-16 13:22:02 UTC (rev 4036) @@ -43,6 +43,7 @@ public String Rating= ""; public String Filename= ""; public String Duration= ""; + public String ID= ""; } private DbItems currentDbItem; @@ -77,6 +78,7 @@ if (localName == "Rating") {currentDbItem.Rating =currentValue;} if (localName == "Filename") {currentDbItem.Filename =currentValue;} if (localName == "Duration") {currentDbItem.Duration =currentValue;} + if (localName == "ID") {currentDbItem.ID =currentValue;} if (localName == "Item")DbList.add(currentDbItem); } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-16 10:58:24 UTC (rev 4035) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-16 13:22:02 UTC (rev 4036) @@ -76,13 +76,13 @@ return bitmap; } - public void DownloadFile() { - extStorageDirectory = Environment.getExternalStorageDirectory() - .toString(); - + public void DownloadFile(String Filename, String ID) { + + extStorageDirectory = Environment.getExternalStorageDirectory().toString(); + try { InputStream in = openHttpConnection("http://"+ Settings.Server + ":" + Settings.Port + - "/music/Clementi_Sonatina_Op.36_No.1_Movement_1.mp3"); + "/db_music/getfile?id=" + ID); // BufferedInputStream bis = new BufferedInputStream(in); ByteArrayBuffer baf = new ByteArrayBuffer(50); @@ -97,7 +97,7 @@ } OutputStream outStream = null; - File file = new File(extStorageDirectory, "test.mp3"); + File file = new File(extStorageDirectory, Filename); outStream = new FileOutputStream(file); outStream.write(baf.toByteArray()); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-16 10:58:24 UTC (rev 4035) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-16 13:22:02 UTC (rev 4036) @@ -75,6 +75,7 @@ } Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); + chkStatus(); mHandler.removeCallbacks(mUpdateTimeTask); @@ -117,7 +118,7 @@ int x = 0; int y = 1; - int z = y / x; + int z = y / x; // we do a exception ;-) } }); @@ -176,6 +177,7 @@ private boolean reportExist() { try { + @SuppressWarnings("unused") BufferedReader reader = new BufferedReader(new InputStreamReader( this.openFileInput("stack.trace"))); return true; @@ -199,11 +201,11 @@ Intent sendIntent = new Intent(Intent.ACTION_SEND); String subject = "Error report"; - String body = "Mail this to mar...@go...: " + String body = "Mail this to ser...@go... : " + "\n\n" + trace + "\n\n"; sendIntent.putExtra(Intent.EXTRA_EMAIL, - new String[] { "mar...@go..." }); + new String[] { "ser...@go..." }); sendIntent.putExtra(Intent.EXTRA_TEXT, body); sendIntent.putExtra(Intent.EXTRA_SUBJECT, subject); sendIntent.setType("message/rfc822"); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-16 10:58:24 UTC (rev 4035) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-16 13:22:02 UTC (rev 4036) @@ -31,6 +31,7 @@ import android.graphics.drawable.ColorDrawable; import android.os.AsyncTask; import android.os.Bundle; +import android.os.Environment; import android.os.Handler; import android.util.Log; import android.view.LayoutInflater; @@ -96,7 +97,7 @@ Toast.makeText(musicResults.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); break; case 2: - SavetoSDCard(); + SavetoSDCard(selectedItem); Toast.makeText(musicResults.this, selectedItem.Title + " has been transferd", Toast.LENGTH_SHORT).show(); break; @@ -139,8 +140,16 @@ post.Post(xml); } - private void SavetoSDCard() { - + private void SavetoSDCard(ReceiveDbXmlHandler.DbItems Item) { + + String filename = Item.Artist + " - " + Item.Title + ".mp3"; + String id = Item.ID; + + httpHandler h = new httpHandler(); + h.DownloadFile(filename,id); + + String sd = Environment.getExternalStorageDirectory().toString(); + MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); } private Runnable mUpdateTimeTask = new Runnable() { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-16 10:58:24 UTC (rev 4035) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-16 13:22:02 UTC (rev 4036) @@ -31,6 +31,7 @@ import android.graphics.drawable.ColorDrawable; import android.os.AsyncTask; import android.os.Bundle; +import android.os.Environment; import android.os.Handler; import android.util.Log; import android.view.LayoutInflater; @@ -85,7 +86,7 @@ Toast.makeText(musicSong.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); break; case 2: - SavetoSDCard(); + SavetoSDCard(selectedItem); Toast.makeText(musicSong.this, selectedItem.Title + " has been transferd", Toast.LENGTH_SHORT).show(); break; @@ -173,8 +174,16 @@ post.Post(xml); } - private void SavetoSDCard() { + private void SavetoSDCard(ReceiveDbXmlHandler.DbItems Item) { + String filename = Item.Artist + " - " + Item.Title + ".mp3"; + String id = Item.ID; + + httpHandler h = new httpHandler(); + h.DownloadFile(filename,id); + + String sd = Environment.getExternalStorageDirectory().toString(); + MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); } private static class EfficientAdapter extends BaseAdapter { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-16 10:58:24 UTC (rev 4035) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-16 13:22:02 UTC (rev 4036) @@ -47,29 +47,27 @@ private Handler mHandler = new Handler(); public static String actualDir = ""; - + public static ArrayList<ReceiveDirectoryXmlHandler.DirItems> pictureList; public static int selectedPicture; - + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pictures); - + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); GridView gridview = (GridView) findViewById(R.id.GridView01); - + gridview.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, long id) { - // TextView tv = (TextView) v.findViewById(R.id.icon_text); - // ImageView ImageView iv = (ImageView) v.findViewById(R.id.icon_image); picItem pic = (picItem) iv.getTag(); - + if (pic.typ == "item") { selectedPicture = position - 1; Intent myIntent = new Intent(pictures.this, @@ -103,60 +101,48 @@ }); } - @Override - public void onStart() { - super.onStart(); - - //mHandler.removeCallbacks(mUpdateTimeTask); - //mHandler.postDelayed(mUpdateTimeTask, 100); - } - private Runnable mUpdateTimeTask = new Runnable() { public void run() { - new update().execute(); - //update(); + new update().execute(); } }; - - - private class update extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(pictures.this); - - // can use UI thread here - protected void onPreExecute() { - this.dialog.setMessage("Loading..."); - this.dialog.show(); - } - - // automatically done on worker thread (separate from UI thread) - protected Void doInBackground(final String... args) { + private class update extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(pictures.this); + + // can use UI thread here + protected void onPreExecute() { + this.dialog.setMessage("Loading..."); + this.dialog.show(); + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { Log.d("update pictures", "do update folder : " + actualDir); - + ReceiveDirHandler h = ReceiveDirHandler.getinstance(); pictureList = h.getPictureDir(actualDir); - return null; - } - - // can use UI thread here - protected void onPostExecute(final Void unused) { - if (this.dialog.isShowing()) { - this.dialog.dismiss(); - } + return null; + } - if (pictureList.size() == 0) { - Toast.makeText(pictures.this, "TIME OUT SERVER", Toast.LENGTH_SHORT) - .show(); + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + this.dialog.dismiss(); + } + + if (pictureList.size() == 0) { + Toast.makeText(pictures.this, "TIME OUT SERVER", + Toast.LENGTH_SHORT).show(); } else { GridView gridview = (GridView) findViewById(R.id.GridView01); gridview.setAdapter(new ImageAdapter2(pictures.this)); } - } - } - - - public class ImageAdapter2 extends BaseAdapter { + } + } + + public class ImageAdapter2 extends BaseAdapter { private Context mContext; public static final int ACTIVITY_CREATE = 10; @@ -188,12 +174,10 @@ LayoutInflater li = LayoutInflater.from(mContext); v = li.inflate(R.layout.icon, null); - } - else - { + } else { v = convertView; } - + if (position > 0) { position = position - 1; @@ -220,7 +204,8 @@ String file = "http://" + Settings.Server + ":" + Settings.Port + "/pictures/"; file += actualDir + item.File + ".thb"; - item.Picture = http.DownloadImage(file.replaceAll(" ", "%20")); + item.Picture = http.DownloadImage(file.replaceAll(" ", + "%20")); iv.setImageBitmap(item.Picture); if (item.Picture == null) 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. |
From: <kro...@us...> - 2010-12-16 10:58:31
|
Revision: 4035 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4035&view=rev Author: kroko_koenig Date: 2010-12-16 10:58:24 +0000 (Thu, 16 Dec 2010) Log Message: ----------- add exception handler and send report via email Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java 2010-12-16 10:58:24 UTC (rev 4035) @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2005-2010 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +package mediaportal.remote; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import java.io.*; + +public class TopExceptionHandler implements Thread.UncaughtExceptionHandler { + + private Thread.UncaughtExceptionHandler defaultUEH; + + private Activity app = null; + + public TopExceptionHandler(Activity app) { + this.defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); + this.app = app; + } + + public void uncaughtException(Thread t, Throwable e) { + StackTraceElement[] arr = e.getStackTrace(); + String report = e.toString() + "\n\n"; + report += "--------- Stack trace ---------\n\n"; + for (int i = 0; i < arr.length; i++) { + report += " " + arr[i].toString() + "\n"; + } + report += "-------------------------------\n\n"; + + // If the exception was thrown in a background thread inside + // AsyncTask, then the actual exception can be found with getCause + report += "--------- Cause ---------\n\n"; + Throwable cause = e.getCause(); + if (cause != null) { + report += cause.toString() + "\n\n"; + arr = cause.getStackTrace(); + for (int i = 0; i < arr.length; i++) { + report += " " + arr[i].toString() + "\n"; + } + } + + report += "-------------------------------\n\n"; + report += "--------- Device ---------\n\n"; + report += "Brand: " + Build.BRAND + "\n"; + report += "Device: " + Build.DEVICE + "\n"; + report += "Model: " + Build.MODEL + "\n"; + report += "Id: " + Build.ID + "\n"; + report += "Product: " + Build.PRODUCT + "\n"; + report += "-------------------------------\n\n"; + report += "--------- Firmware ---------\n\n"; + report += "SDK: " + Build.VERSION.SDK + "\n"; + report += "Release: " + Build.VERSION.RELEASE + "\n"; + report += "Incremental: " + Build.VERSION.INCREMENTAL + "\n"; + report += "-------------------------------\n\n"; + + try { + FileOutputStream trace = app.openFileOutput("stack.trace", + Context.MODE_PRIVATE); + trace.write(report.getBytes()); + trace.close(); + } catch (IOException ioe) { + // ... + } + + defaultUEH.uncaughtException(t, e); + } + +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-15 21:33:12 UTC (rev 4034) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-16 10:58:24 UTC (rev 4035) @@ -21,11 +21,16 @@ package mediaportal.remote; +import java.io.BufferedReader; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import mediaportal.remote.R; import android.app.Activity; +import android.app.AlertDialog; import android.content.Context; +import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.AssetManager; @@ -42,17 +47,39 @@ private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); private static String display = "nothing playing"; - + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); + if (reportExist()) { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setMessage("Do you want to send a crash report ?") + .setTitle("Sorry .. remote has crashed") + .setPositiveButton("Yes", + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int item) { + sendReport(); + } + }) + .setNegativeButton("No", + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int item) { + deleteReport(); + } + }).show(); + + } + + Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); chkStatus(); - + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 1000); - + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE); @@ -86,6 +113,11 @@ Toast.makeText(view.getContext(), "not implemented yet. Sorry !", Toast.LENGTH_LONG) .show(); + + int x = 0; + int y = 1; + + int z = y / x; } }); @@ -142,6 +174,57 @@ }); } + private boolean reportExist() { + try { + BufferedReader reader = new BufferedReader(new InputStreamReader( + this.openFileInput("stack.trace"))); + return true; + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return false; + } + + private void sendReport() { + try { + String trace = ""; + String line = ""; + + BufferedReader reader = new BufferedReader(new InputStreamReader( + this.openFileInput("stack.trace"))); + while ((line = reader.readLine()) != null) { + trace += line + "\n"; + } + + Intent sendIntent = new Intent(Intent.ACTION_SEND); + String subject = "Error report"; + String body = "Mail this to mar...@go...: " + + "\n\n" + trace + "\n\n"; + + sendIntent.putExtra(Intent.EXTRA_EMAIL, + new String[] { "mar...@go..." }); + sendIntent.putExtra(Intent.EXTRA_TEXT, body); + sendIntent.putExtra(Intent.EXTRA_SUBJECT, subject); + sendIntent.setType("message/rfc822"); + + startActivity(Intent + .createChooser(sendIntent, "Send crash report:")); + this.deleteFile("stack.trace"); + + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private void deleteReport() { + this.deleteFile("stack.trace"); + } + void chkStatus() { final ConnectivityManager connMgr = (ConnectivityManager) this .getSystemService(Context.CONNECTIVITY_SERVICE); @@ -153,16 +236,15 @@ .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (!wifi.isAvailable()) { - Toast.makeText(this, "Wifi is not available !", Toast.LENGTH_SHORT).show(); + Toast.makeText(this, "Warning : Wifi is not available !", + Toast.LENGTH_SHORT).show(); } - + /* - else if (mobile.isAvailable()) { - Toast.makeText(this, "Mobile 3G ", Toast.LENGTH_LONG).show(); - } else { - Toast.makeText(this, "No Network ", Toast.LENGTH_LONG).show(); - } - */ + * else if (mobile.isAvailable()) { Toast.makeText(this, "Mobile 3G ", + * Toast.LENGTH_LONG).show(); } else { Toast.makeText(this, + * "No Network ", Toast.LENGTH_LONG).show(); } + */ } public void PostCommand(String button) { @@ -211,7 +293,7 @@ private class update extends AsyncTask<String, Void, Void> { // can use UI thread here - protected void onPreExecute() { + protected void onPreExecute() { } // automatically done on worker thread (separate from UI thread) @@ -227,21 +309,23 @@ handler.fetchdata(); if ((nowplayinghandler.PlayerState != null) - && (!nowplayinghandler.PlayerState.equals("no player active"))) { + && (!nowplayinghandler.PlayerState + .equals("no player active"))) { display = nowplayinghandler.Artist + " - " + nowplayinghandler.Title; } - + return null; } // can use UI thread here protected void onPostExecute(final Void unused) { - - TextView txt0 = (TextView) findViewById(R.id.main_now_playing); + + TextView txt0 = (TextView) findViewById(R.id.main_now_playing); txt0.setText(display); - + mHandler.postDelayed(mUpdateTimeTask, 1000); } + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2010-12-15 21:33:19
|
Revision: 4034 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4034&view=rev Author: chemelli_sf Date: 2010-12-15 21:33:12 +0000 (Wed, 15 Dec 2010) Log Message: ----------- Updated logos and MPEI package Modified Paths: -------------- trunk/plugins/ItalyLogos/logos/TV/logos/ canal+ sport.png trunk/plugins/ItalyLogos/logos/TV/logos/ canal+.png trunk/plugins/ItalyLogos/logos/TV/logos/alice.png trunk/plugins/ItalyLogos/logos/TV/logos/baby tv.png trunk/plugins/ItalyLogos/logos/TV/logos/bbc world.png trunk/plugins/ItalyLogos/logos/TV/logos/canale italia.png trunk/plugins/ItalyLogos/logos/TV/logos/canale5 HD.png trunk/plugins/ItalyLogos/logos/TV/logos/cielo.png trunk/plugins/ItalyLogos/logos/TV/logos/cinema family.png trunk/plugins/ItalyLogos/logos/TV/logos/cinema mania.png trunk/plugins/ItalyLogos/logos/TV/logos/class cnbc.png trunk/plugins/ItalyLogos/logos/TV/logos/cooltoon.png trunk/plugins/ItalyLogos/logos/TV/logos/cult.png trunk/plugins/ItalyLogos/logos/TV/logos/current.png trunk/plugins/ItalyLogos/logos/TV/logos/disney ch. +1.png trunk/plugins/ItalyLogos/logos/TV/logos/disney channel - premium.png trunk/plugins/ItalyLogos/logos/TV/logos/disney channel.png trunk/plugins/ItalyLogos/logos/TV/logos/espn america.png trunk/plugins/ItalyLogos/logos/TV/logos/espn classic.png trunk/plugins/ItalyLogos/logos/TV/logos/eurosport hd.png trunk/plugins/ItalyLogos/logos/TV/logos/fox crime +1.png trunk/plugins/ItalyLogos/logos/TV/logos/fox crime.png trunk/plugins/ItalyLogos/logos/TV/logos/fox life +1.png trunk/plugins/ItalyLogos/logos/TV/logos/fox life.png trunk/plugins/ItalyLogos/logos/TV/logos/fx.png trunk/plugins/ItalyLogos/logos/TV/logos/gambero rosso.png trunk/plugins/ItalyLogos/logos/TV/logos/glamour plus vm18.png trunk/plugins/ItalyLogos/logos/TV/logos/gxt +1.png trunk/plugins/ItalyLogos/logos/TV/logos/history +1.png trunk/plugins/ItalyLogos/logos/TV/logos/italia1 HD.png trunk/plugins/ItalyLogos/logos/TV/logos/jimmy.png trunk/plugins/ItalyLogos/logos/TV/logos/k2.png trunk/plugins/ItalyLogos/logos/TV/logos/la 5.png trunk/plugins/ItalyLogos/logos/TV/logos/la3.png trunk/plugins/ItalyLogos/logos/TV/logos/la5.png trunk/plugins/ItalyLogos/logos/TV/logos/la7.png trunk/plugins/ItalyLogos/logos/TV/logos/la7d (1).png trunk/plugins/ItalyLogos/logos/TV/logos/la7d.png trunk/plugins/ItalyLogos/logos/TV/logos/lady channel.png trunk/plugins/ItalyLogos/logos/TV/logos/lei.png trunk/plugins/ItalyLogos/logos/TV/logos/leonardo.png trunk/plugins/ItalyLogos/logos/TV/logos/mediaset plus.png trunk/plugins/ItalyLogos/logos/TV/logos/mtv brand new.png trunk/plugins/ItalyLogos/logos/TV/logos/mtv pulse.png trunk/plugins/ItalyLogos/logos/TV/logos/natgeo wild.png trunk/plugins/ItalyLogos/logos/TV/logos/natgeoadventur.png trunk/plugins/ItalyLogos/logos/TV/logos/nationalgeo +1.png trunk/plugins/ItalyLogos/logos/TV/logos/nuvolari.png trunk/plugins/ItalyLogos/logos/TV/logos/onda latina.png trunk/plugins/ItalyLogos/logos/TV/logos/playhouse disney - premium.png trunk/plugins/ItalyLogos/logos/TV/logos/playhouse disney.png trunk/plugins/ItalyLogos/logos/TV/logos/pokeritalia24.png trunk/plugins/ItalyLogos/logos/TV/logos/premium cinema.png trunk/plugins/ItalyLogos/logos/TV/logos/punto sat.png trunk/plugins/ItalyLogos/logos/TV/logos/puntosat.png trunk/plugins/ItalyLogos/logos/TV/logos/rai 1.png trunk/plugins/ItalyLogos/logos/TV/logos/rai 2.png trunk/plugins/ItalyLogos/logos/TV/logos/rai 3.png trunk/plugins/ItalyLogos/logos/TV/logos/rai 4.png trunk/plugins/ItalyLogos/logos/TV/logos/rai extra.png trunk/plugins/ItalyLogos/logos/TV/logos/rai movie.png trunk/plugins/ItalyLogos/logos/TV/logos/rai news.png trunk/plugins/ItalyLogos/logos/TV/logos/rai premium.png trunk/plugins/ItalyLogos/logos/TV/logos/rai test hd.png trunk/plugins/ItalyLogos/logos/TV/logos/rai yoyo.png trunk/plugins/ItalyLogos/logos/TV/logos/repubblica tv.png trunk/plugins/ItalyLogos/logos/TV/logos/rock tv.png trunk/plugins/ItalyLogos/logos/TV/logos/sky sport extra.png trunk/plugins/ItalyLogos/logos/TV/logos/toon disney +1.png trunk/plugins/ItalyLogos/logos/TV/logos/tv7 lady (1).png trunk/plugins/ItalyLogos/logos/TV/logos/tv7 lady (2).png trunk/plugins/ItalyLogos/logos/TV/logos/tv7 lady.png trunk/plugins/ItalyLogos/logos/TV/logos/tv7 triveneta net (1).png trunk/plugins/ItalyLogos/logos/TV/logos/tv7 triveneta net (2).png trunk/plugins/ItalyLogos/logos/TV/logos/tv7 triveneta net.png trunk/plugins/ItalyLogos/update.xml Added Paths: ----------- trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.4.mpe1 Removed Paths: ------------- trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.3.mpe1 Deleted: trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.3.mpe1 =================================================================== (Binary files differ) Added: trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.4.mpe1 =================================================================== (Binary files differ) Property changes on: trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.4.mpe1 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/ItalyLogos/logos/TV/logos/ canal+ sport.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/ canal+.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/alice.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/baby tv.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/bbc world.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/canale italia.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/canale5 HD.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/cielo.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/cinema family.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/cinema mania.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/class cnbc.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/cooltoon.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/cult.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/current.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/disney ch. +1.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/disney channel - premium.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/disney channel.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/espn america.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/espn classic.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/eurosport hd.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/fox crime +1.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/fox crime.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/fox life +1.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/fox life.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/fx.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/gambero rosso.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/glamour plus vm18.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/gxt +1.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/history +1.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/italia1 HD.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/jimmy.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/k2.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/la 5.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/la3.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/la5.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/la7.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/la7d (1).png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/la7d.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/lady channel.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/lei.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/leonardo.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/mediaset plus.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/mtv brand new.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/mtv pulse.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/natgeo wild.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/natgeoadventur.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/nationalgeo +1.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/nuvolari.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/onda latina.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/playhouse disney - premium.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/playhouse disney.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/pokeritalia24.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/premium cinema.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/punto sat.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/puntosat.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai 1.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai 2.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai 3.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai 4.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai extra.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai movie.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai news.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai premium.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai test hd.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rai yoyo.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/repubblica tv.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/rock tv.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/sky sport extra.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/toon disney +1.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/tv7 lady (1).png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/tv7 lady (2).png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/tv7 lady.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/tv7 triveneta net (1).png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/tv7 triveneta net (2).png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/logos/TV/logos/tv7 triveneta net.png =================================================================== (Binary files differ) Modified: trunk/plugins/ItalyLogos/update.xml =================================================================== --- trunk/plugins/ItalyLogos/update.xml 2010-12-15 17:10:53 UTC (rev 4033) +++ trunk/plugins/ItalyLogos/update.xml 2010-12-15 21:33:12 UTC (rev 4034) @@ -228,7 +228,7 @@ 13°E Hotbird </ExtensionDescription> - <VersionDescription>Some logos updates + <VersionDescription>Some logos updates </VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.3.mpe1</OnlineLocation> @@ -274,5 +274,93 @@ <FolderGroups /> </ProjectSettings> </PackageClass> + <PackageClass> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items /> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items /> + </Sections> + <Dependencies> + <Items /> + </Dependencies> + <GeneralInfo> + <Name>Italy logos Tv and Radio</Name> + <Id>784949ad-7eed-4541-9ec8-edc0cb6a3521</Id> + <Author>Various</Author> + <HomePage /> + <ForumPage /> + <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/update.xml</UpdateUrl> + <Version> + <Major>1</Major> + <Minor>0</Minor> + <Build>0</Build> + <Revision>4</Revision> + </Version> + <ExtensionDescription>This package will copy all TV and Radio logos for Italian stations broacasted on Analog, +DVB-T + + and + + + +13°E Hotbird +</ExtensionDescription> + <VersionDescription>Some logos updates +</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/ItalyLogos/ItalyLogos v.1.0.0.3.mpe1</OnlineLocation> + <ReleaseDate>2010-12-06T19:14:51</ReleaseDate> + <Tags>logos</Tags> + <Location>..\ItalyLogos v.[Version].mpe1</Location> + <Params> + <Items> + <SectionParam Name="Icon"> + <Value>C:\svnroot\mp-plugins\trunk\plugins\ItalyLogos\package\ItalyFlag.png</Value> + <ValueType>File</ValueType> + <Description>The icon file of the package (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Online Icon"> + <Value /> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value /> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items /> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + </ProjectSettings> + </PackageClass> </Items> </ExtensionCollection> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-15 17:10:59
|
Revision: 4033 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4033&view=rev Author: kroko_koenig Date: 2010-12-15 17:10:53 +0000 (Wed, 15 Dec 2010) Log Message: ----------- add threads for main & MusicDir also thread safe start of the playlist player Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-14 15:07:00 UTC (rev 4032) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-15 17:10:53 UTC (rev 4033) @@ -25,7 +25,9 @@ import mediaportal.remote.R; import mediaportal.remote.ReceiveDirectoryXmlHandler.DirItems; import android.app.Activity; +import android.app.ProgressDialog; import android.content.Context; +import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.util.Log; @@ -62,18 +64,15 @@ public void onItemClick(AdapterView<?> parent, View v, int position, long id) { - // TextView tv = (TextView) v.findViewById(R.id.icon_text); - // ImageView ImageView iv = (ImageView) v.findViewById(R.id.icon_image); musicItem music = (musicItem) iv.getTag(); if (music.typ == "item") { selectedItem = musicList.get(position); - PostAddFile(selectedItem.File); + PostAddFile(actualDir + selectedItem.File.replaceAll(" ", "%20")); Toast.makeText(MusicDir.this, - selectedItem.File + " has been added", Toast.LENGTH_SHORT).show(); - + selectedItem.File + " has been added", Toast.LENGTH_SHORT).show(); } if (music.typ == "folder") { @@ -109,7 +108,7 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; - xml += "<command>ADD_MUSIC</command>"; + xml += "<command>ADD_MUSIC_FILE</command>"; xml += "<filename>" + Filename + "</filename>"; xml += "<artist></artist>"; xml += "<title>" + Filename + "</title>"; @@ -119,34 +118,47 @@ post.Post(xml); } - - @Override - public void onStart() { - super.onStart(); - } - private Runnable mUpdateTimeTask = new Runnable() { public void run() { - update(); + new update().execute(); } }; - private void update() { + private class update extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(MusicDir.this); - Log.d("update music dir", "do update folder : " + actualDir); + // can use UI thread here + protected void onPreExecute() { + this.dialog.setMessage("Loading..."); + this.dialog.show(); + } - ReceiveDirHandler h = ReceiveDirHandler.getinstance(); - musicList = h.getMusicDir(actualDir); + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + Log.d("update music dir", "do update folder : " + actualDir); - if (musicList.size() == 0) { - Toast.makeText(MusicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT) - .show(); - } else { - GridView gridview = (GridView) findViewById(R.id.music_grid); - gridview.setAdapter(new ImageAdapter2(this)); + ReceiveDirHandler h = ReceiveDirHandler.getinstance(); + musicList = h.getMusicDir(actualDir); + + return null; } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + this.dialog.dismiss(); + } + + if (musicList.size() == 0) { + Toast.makeText(MusicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT) + .show(); + } else { + GridView gridview = (GridView) findViewById(R.id.music_grid); + gridview.setAdapter(new ImageAdapter2(MusicDir.this)); + } + } } - + public class ImageAdapter2 extends BaseAdapter { private Context mContext; public static final int ACTIVITY_CREATE = 10; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-14 15:07:00 UTC (rev 4032) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-15 17:10:53 UTC (rev 4033) @@ -23,7 +23,6 @@ import java.io.IOException; import java.io.InputStream; - import mediaportal.remote.R; import android.app.Activity; import android.content.Context; @@ -31,6 +30,7 @@ import android.content.SharedPreferences; import android.content.res.AssetManager; import android.net.ConnectivityManager; +import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.os.Vibrator; @@ -41,12 +41,18 @@ private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); - + private static String display = "nothing playing"; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); + chkStatus(); + + mHandler.removeCallbacks(mUpdateTimeTask); + mHandler.postDelayed(mUpdateTimeTask, 1000); + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE); @@ -76,6 +82,7 @@ btnVideo.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { DoVibrate(); + Toast.makeText(view.getContext(), "not implemented yet. Sorry !", Toast.LENGTH_LONG) .show(); @@ -146,7 +153,7 @@ .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (!wifi.isAvailable()) { - Toast.makeText(this, "Wifi is not available !", Toast.LENGTH_LONG).show(); + Toast.makeText(this, "Wifi is not available !", Toast.LENGTH_SHORT).show(); } /* @@ -190,17 +197,6 @@ } @Override - public void onStart() { - super.onStart(); - - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, 1000); - - chkStatus(); - - } - - @Override public void onPause() { super.onPause(); @@ -209,31 +205,43 @@ private Runnable mUpdateTimeTask = new Runnable() { public void run() { - update(); - mHandler.postDelayed(mUpdateTimeTask, 1000); + new update().execute(); } }; - private void update() { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + private class update extends AsyncTask<String, Void, Void> { + // can use UI thread here + protected void onPreExecute() { + } - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, + MODE_PRIVATE); - nowplayinghandler handler = nowplayinghandler.getinstance(); - handler.setconnection(HttpServer, HttpPort); - handler.fetchdata(); + String HttpServer = settings.getString("Server", "192.168.0.30"); + String HttpPort = settings.getString("Port", "8200"); - String display = "nothing playing"; - TextView txt0 = (TextView) findViewById(R.id.main_now_playing); + nowplayinghandler handler = nowplayinghandler.getinstance(); + handler.setconnection(HttpServer, HttpPort); + handler.fetchdata(); - if ((nowplayinghandler.PlayerState != null) - && (!nowplayinghandler.PlayerState.equals("no player active"))) { - display = nowplayinghandler.Artist + " - " - + nowplayinghandler.Title; + if ((nowplayinghandler.PlayerState != null) + && (!nowplayinghandler.PlayerState.equals("no player active"))) { + display = nowplayinghandler.Artist + " - " + + nowplayinghandler.Title; + } + + return null; } - txt0.setText(display); + + // can use UI thread here + protected void onPostExecute(final Void unused) { + + TextView txt0 = (TextView) findViewById(R.id.main_now_playing); + txt0.setText(display); + + mHandler.postDelayed(mUpdateTimeTask, 1000); + } } - } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-14 15:07:00 UTC (rev 4032) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-15 17:10:53 UTC (rev 4033) @@ -63,6 +63,8 @@ private Dictionary<string, string> directoryList = new Dictionary<string, string>(); private static List<string> allPicturesList = null; + private delegate void StartPlaylistPlayer(); + public Request(Socket Socket) { socket = Socket; @@ -338,6 +340,17 @@ } } + private void StartPlayer() + { + // we need to do this, we could crash external players because their are not thread safe. + PlayListPlayer playlistPlayer = PlayListPlayer.SingletonPlayer; + playlistPlayer.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC; + + PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); + if (playList.Count > 0) playlistPlayer.Play(0); + + } + private void ExceuteCommand(string Message) { AndroidServer.logDebug("execute command"); @@ -376,10 +389,10 @@ { if (playlistPlayer.CurrentPlaylistType == PlayListType.PLAYLIST_NONE) { - playlistPlayer.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC; + StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayer); + GUIGraphicsContext.form.Invoke(del, new object[] { }); - PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); - if (playList.Count > 0) playlistPlayer.Play(0); + } else { @@ -550,7 +563,7 @@ PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); bool found = false; - string fileName = data["filename"]; // TODO need to be converted to local name + string fileName = data["filename"]; foreach (PlayListItem item in playList) { @@ -581,7 +594,62 @@ playlistItem.MusicTag = tag; playList.Add(playlistItem); } + } + #endregion + #region add a item (file) + if (data["command"] == ("ADD_MUSIC_FILE")) + { + // add music + // parameter = filename,artist,title,duration + + PlayListPlayer playlistPlayer = PlayListPlayer.SingletonPlayer; + playlistPlayer.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC; + + PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); + + bool found = false; + + string fileName = data["filename"]; + fileName = fileName.Replace("%20", " "); + fileName = fileName.Replace("/", "\\"); + + string artist = data["artist"].Replace("%20", " "); + string title = data["title"].Replace("%20", " "); + + directoryList = GetMpShare("music"); + string local = GetLocalDir(fileName, directoryList); + + foreach (PlayListItem item in playList) + { + if (item.FileName == local) + { + found = true; + break; + } + } + + if (!found) + { + AndroidServer.logDebug("add music : " + artist + " - " + title); + + PlayListItem playlistItem = new PlayListItem(); + playlistItem.Type = PlayListItem.PlayListItemType.Audio; + playlistItem.FileName = local; + playlistItem.Description = artist + " - " + title; + playlistItem.Duration = 0; + + MusicTag tag = new MusicTag(); + tag.Artist = artist; + tag.Title = title; + + tag.Duration = Convert.ToInt32(data["duration"]); + tag.FileName = local; + + playlistItem.MusicTag = tag; + playList.Add(playlistItem); + } + } #endregion 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. |