From: <ze...@us...> - 2007-03-27 17:01:34
|
Revision: 241 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=241&view=rev Author: zebons Date: 2007-03-27 10:00:56 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Compatibility for DVDProfiler Database : manage a temporary database Modified Paths: -------------- trunk/plugins/MyFilms/CatalogConverter.cs trunk/plugins/MyFilms/MesFilms.cs trunk/plugins/MyFilms/MesFilms.csproj trunk/plugins/MyFilms/MesFilms.suo trunk/plugins/MyFilms/MesFilmsDetail.cs Modified: trunk/plugins/MyFilms/CatalogConverter.cs =================================================================== --- trunk/plugins/MyFilms/CatalogConverter.cs 2007-03-27 16:52:34 UTC (rev 240) +++ trunk/plugins/MyFilms/CatalogConverter.cs 2007-03-27 17:00:56 UTC (rev 241) @@ -3,6 +3,7 @@ using System.Text; using System.IO; using System.Xml; +using MediaPortal.GUI.Library; namespace MesFilms { @@ -29,7 +30,8 @@ public string ConvertProfiler(string source) { - string destFile = Path.GetTempPath()+@"\"+"AntTempFile.xml"; + //string destFile = Path.GetTempPath()+@"AntTempFile.xml"; + string destFile = source.Substring(0, source.Length - 4) + "_tmp.xml"; XmlTextWriter destXml = new XmlTextWriter(destFile,Encoding.Default); destXml.Formatting = Formatting.Indented; destXml.WriteStartDocument(); Modified: trunk/plugins/MyFilms/MesFilms.cs =================================================================== --- trunk/plugins/MyFilms/MesFilms.cs 2007-03-27 16:52:34 UTC (rev 240) +++ trunk/plugins/MyFilms/MesFilms.cs 2007-03-27 17:00:56 UTC (rev 241) @@ -126,6 +126,7 @@ string StrViewDfltItem = null; string StrViewDfltText = null; string StrFileXml = null; + string StrFileType = null; string StrPathImg = null; string StrSortSens = null; public string WStrSort = null; @@ -284,7 +285,7 @@ if (PreviousWindowId == ID_MesFilmsDetail) { CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Current_Config", ""); - Load_Config(CurrentConfig); + Load_Config(CurrentConfig ,false); Fin_Charge_Init(false); } else @@ -300,7 +301,7 @@ { if (CurrentConfig == "") CurrentConfig = Choice_Config(); - Load_Config(CurrentConfig); + Load_Config(CurrentConfig,true); Fin_Charge_Init(true); } } @@ -1086,9 +1087,17 @@ xmlwriter.SetValueAsBool(CurrentConfig, "boolselect", boolselect); xmlwriter.SetValue(CurrentConfig, "WStrSort", WStrSort); xmlwriter.SetValue(CurrentConfig, "Wstar", Wstar); + switch (StrFileType) + { + case "0": + break; + case "1": + xmlwriter.SetValue(CurrentConfig, "AntCatalogTemp", StrFileXml.ToString()); + break; + } } } - private void Load_Config(string CurrentConfig) + private void Load_Config(string CurrentConfig,bool create_temp) { //----------------------------------------------------------------------------------------------- // Load Config Parameters in MyFilms.xml file (section CurrentConfig) @@ -1109,14 +1118,21 @@ StrViewItem2 = xmlreader.GetValueAsString(CurrentConfig, "AntViewItem2", ""); StrViewText2 = xmlreader.GetValueAsString(CurrentConfig, "AntViewText2", ""); StrFileXml = xmlreader.GetValueAsString(CurrentConfig, "AntCatalog", ""); - switch (xmlreader.GetValueAsString(CurrentConfig, "CatalogType", "")) + StrFileType = xmlreader.GetValueAsString(CurrentConfig, "CatalogType", "0"); + switch (StrFileType) { case "0": break; case "1": - CatalogConverter cv = new CatalogConverter(); - StrFileXml = cv.ConvertProfiler(StrFileXml); + if (create_temp) + { + CatalogConverter cv = new CatalogConverter(); + StrFileXml = cv.ConvertProfiler(StrFileXml); + } + else + StrFileXml = xmlreader.GetValueAsString(CurrentConfig, "AntCatalogTemp", ""); break; + } StrPathImg = xmlreader.GetValueAsString(CurrentConfig, "AntPicture", ""); StrSelect = xmlreader.GetValueAsString(CurrentConfig, "StrSelect", ""); @@ -1353,7 +1369,7 @@ { //Change "Config": mydivx.Clear(); - Load_Config(Choice_Config()); + Load_Config(Choice_Config(),true); Fin_Charge_Init(true); return; } Modified: trunk/plugins/MyFilms/MesFilms.csproj =================================================================== --- trunk/plugins/MyFilms/MesFilms.csproj 2007-03-27 16:52:34 UTC (rev 240) +++ trunk/plugins/MyFilms/MesFilms.csproj 2007-03-27 17:00:56 UTC (rev 241) @@ -31,7 +31,7 @@ <ItemGroup> <Reference Include="Core, Version=1.0.2548.1824, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Svn\Core.dll</HintPath> + <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Stable\Core.DLL</HintPath> </Reference> <Reference Include="Databases, Version=1.0.2548.1828, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> @@ -50,7 +50,7 @@ <Reference Include="System.Xml" /> <Reference Include="Utils, Version=1.0.2548.1816, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Svn\Utils.dll</HintPath> + <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Stable\Utils.DLL</HintPath> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/MyFilms/MesFilms.suo =================================================================== (Binary files differ) Modified: trunk/plugins/MyFilms/MesFilmsDetail.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-03-27 16:52:34 UTC (rev 240) +++ trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-03-27 17:00:56 UTC (rev 241) @@ -207,6 +207,14 @@ StrTitleSelect = xmlreader.GetValueAsString(CurrentConfig, "StrTitleSelect", ""); StrFilmSelect = xmlreader.GetValueAsString(CurrentConfig, "StrFilmSelect", ""); TitleDelim = xmlreader.GetValueAsString(CurrentConfig, "TitleDelim", "."); + switch (xmlreader.GetValueAsString(CurrentConfig, "CatalogType", "0")) + { + case "0": + break; + case "1": + StrFileXml = xmlreader.GetValueAsString(CurrentConfig, "AntCatalogTemp", ""); + break; + } } if (TxtSelect.Length == 0) GUIPropertyManager.SetProperty("#select", " "); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |