From: <ze...@us...> - 2007-12-01 16:54:10
|
Revision: 1114 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1114&view=rev Author: zebons Date: 2007-12-01 08:54:02 -0800 (Sat, 01 Dec 2007) Log Message: ----------- My Films v4.3.2 Modified Paths: -------------- trunk/plugins/MyFilms/CatalogConverter.cs trunk/plugins/MyFilms/Configuration.cs trunk/plugins/MyFilms/MesFilms.cs trunk/plugins/MyFilms/MesFilms.csproj trunk/plugins/MyFilms/MesFilmsDetail.cs trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs trunk/plugins/MyFilms/MesFilmsSetup.cs trunk/plugins/MyFilms/skin/Aqua 0.2.3.0/MesFilms.common.facade.xml trunk/plugins/MyFilms/skin/BlackMyst/MesFilms.xml trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml trunk/plugins/MyFilms/skin/Project Mayhem 3/MesFilms.xml trunk/plugins/MyFilms/skin/SpinSafe Revolve/Media/Films_first_focus.png trunk/plugins/MyFilms/skin/SpinSafe Revolve/Media/Films_first_nofocus.png trunk/plugins/MyFilms/skin/SpinSafe Revolve/Media/Films_last_focus.png trunk/plugins/MyFilms/skin/SpinSafe Revolve/Media/Films_last_nofocus.png trunk/plugins/MyFilms/skin/SpinSafe Revolve/Media/Films_next_focus.PNG trunk/plugins/MyFilms/skin/SpinSafe Revolve/Media/Films_next_nofocus.PNG trunk/plugins/MyFilms/skin/SpinSafe Revolve/Media/Films_prior_focus.PNG trunk/plugins/MyFilms/skin/SpinSafe Revolve/Media/Films_prior_nofocus.PNG trunk/plugins/MyFilms/skin/SpinSafe Revolve/MesFilms.xml trunk/plugins/MyFilms/skin/SpinSafe Revolve/MesFilmsDetail.xml Added Paths: ----------- trunk/plugins/MyFilms/skin/Monochrome/ trunk/plugins/MyFilms/skin/Monochrome/Media/ trunk/plugins/MyFilms/skin/Monochrome/Media/Films_DD.png trunk/plugins/MyFilms/skin/Monochrome/Media/Films_first_focus.png trunk/plugins/MyFilms/skin/Monochrome/Media/Films_first_nofocus.png trunk/plugins/MyFilms/skin/Monochrome/Media/Films_last_focus.png trunk/plugins/MyFilms/skin/Monochrome/Media/Films_last_nofocus.png trunk/plugins/MyFilms/skin/Monochrome/Media/Films_next_focus.PNG trunk/plugins/MyFilms/skin/Monochrome/Media/Films_next_nofocus.PNG trunk/plugins/MyFilms/skin/Monochrome/Media/Films_prior_focus.PNG trunk/plugins/MyFilms/skin/Monochrome/Media/Films_prior_nofocus.PNG trunk/plugins/MyFilms/skin/Monochrome/Media/amclogo.png trunk/plugins/MyFilms/skin/Monochrome/Media/hover_my films.png trunk/plugins/MyFilms/skin/Monochrome/MesFilms.xml trunk/plugins/MyFilms/skin/Monochrome/MesFilmsDetail.xml trunk/plugins/MyFilms/skin/Monochrome/MesFilms_Visible.xml trunk/plugins/MyFilms/skin/Xface/MesFilms.common.window.xml Modified: trunk/plugins/MyFilms/CatalogConverter.cs =================================================================== --- trunk/plugins/MyFilms/CatalogConverter.cs 2007-11-30 16:37:26 UTC (rev 1113) +++ trunk/plugins/MyFilms/CatalogConverter.cs 2007-12-01 16:54:02 UTC (rev 1114) @@ -37,7 +37,7 @@ } public string TagFullName; - public string ConvertProfiler(string source, string folderimage, bool SortTitle, string TagField) + public string ConvertProfiler(string source, string folderimage, bool SortTitle, string TagField, bool OnlyFile) { //string destFile = Path.GetTempPath()+@"AntTempFile.xml"; //string destFile = source.Substring(0, source.Length - 4) + "_tmp.xml"; @@ -90,6 +90,9 @@ { if (nodeNotes.InnerText.IndexOf("<File>") != -1) File = nodeNotes.InnerText.Substring(nodeNotes.InnerText.IndexOf("<File>") + 6, nodeNotes.InnerText.IndexOf("</File>") - nodeNotes.InnerText.IndexOf("<File>") - 6); + else + if (OnlyFile) + File = nodeNotes.InnerText.Trim(); if (nodeNotes.InnerText.IndexOf("<Country>") != -1) Country = nodeNotes.InnerText.Substring(nodeNotes.InnerText.IndexOf("<Country>") + 9, nodeNotes.InnerText.IndexOf("</Country>") - nodeNotes.InnerText.IndexOf("<Country>") - 9); } Modified: trunk/plugins/MyFilms/Configuration.cs =================================================================== --- trunk/plugins/MyFilms/Configuration.cs 2007-11-30 16:37:26 UTC (rev 1113) +++ trunk/plugins/MyFilms/Configuration.cs 2007-12-01 16:54:02 UTC (rev 1114) @@ -64,11 +64,12 @@ break; } bool SortTitle = false; - if (xmlreader.GetValueAsString(CurrentConfig, "SortTitle", "False") == "True") - SortTitle = true; + bool OnlyFile = false; + SortTitle = xmlreader.GetValueAsBool(CurrentConfig, "SortTitle", false); + OnlyFile = xmlreader.GetValueAsBool(CurrentConfig, "OnlyFile", false); string TagField = xmlreader.GetValueAsString(CurrentConfig, "DVDPTagField", ""); CatalogConverter cv = new CatalogConverter(TagField); - StrFileXml = cv.ConvertProfiler(StrFileXml, StrPathImg, SortTitle, TagField); + StrFileXml = cv.ConvertProfiler(StrFileXml, StrPathImg, SortTitle, TagField,OnlyFile); } else StrFileXml = xmlreader.GetValueAsString(CurrentConfig, "AntCatalogTemp", ""); @@ -96,6 +97,12 @@ StrViewDfltText = xmlreader.GetValueAsString(CurrentConfig, "ViewDfltText", ""); TitleDelim = xmlreader.GetValueAsString(CurrentConfig, "TitleDelim", "."); DefaultCover = xmlreader.GetValueAsString(CurrentConfig, "DefaultCover", ""); + CmdExe = xmlreader.GetValueAsString(CurrentConfig, "CmdExe", ""); + if (CmdExe == "(none)") + CmdExe = ""; + CmdPar = xmlreader.GetValueAsString(CurrentConfig, "CmdPar", ""); + if (CmdPar == "(none)") + CmdPar = ""; AlwaysDefaultView = xmlreader.GetValueAsBool(CurrentConfig, "AlwaysDefaultView", false); if (AlwaysDefaultView) { @@ -424,6 +431,18 @@ get { return defaultcover; } set { defaultcover = value; } } + private string cmdExe = string.Empty; + public string CmdExe + { + get { return cmdExe; } + set { cmdExe = value; } + } + private string cmdPar = string.Empty; + public string CmdPar + { + get { return cmdPar; } + set { cmdPar = value; } + } private int strLayOut = int.MinValue; public int StrLayOut { Modified: trunk/plugins/MyFilms/MesFilms.cs =================================================================== --- trunk/plugins/MyFilms/MesFilms.cs 2007-11-30 16:37:26 UTC (rev 1113) +++ trunk/plugins/MyFilms/MesFilms.cs 2007-12-01 16:54:02 UTC (rev 1114) @@ -220,11 +220,6 @@ if (GetPrevFilmList()) return; - //if (((actionType.wID == Action.ActionType.ACTION_MOVE_RIGHT) || (actionType.wID == Action.ActionType.ACTION_MOVE_LEFT)) - // && ((facadeView.SelectedListItem.ItemId > -1) && (!facadeView.SelectedListItem.IsFolder))) - // affichage_Lstdetail(facadeView.SelectedListItem.ItemId, true, facadeView.SelectedListItem.Label); - - base.OnAction(actionType); } //--------------------------------------------------------------------------------------- @@ -264,8 +259,6 @@ Configuration.SaveConfiguration(Configuration.CurrentConfig, -1, ""); else Configuration.SaveConfiguration(Configuration.CurrentConfig, facadeView.SelectedListItem.ItemId, facadeView.SelectedListItem.Label); - //mydivx.Clear(); - //mydivx.Dispose(); facadeView.Clear(); facadeView.FreeResources(); return true; // fall through to call base class? @@ -339,7 +332,6 @@ { if (control_searchText(keyboard.Text)) { - //Change_LayOut(0); conf.WStrSort = "ACTORS"; conf.Wselectedlabel = ""; conf.WStrSortSens = " ASC"; @@ -643,7 +635,6 @@ conf.FileImage = conf.DefaultCover; item.ThumbnailImage = conf.FileImage; item.IconImage = conf.FileImage; -// item.IconImageBig = conf.FileImage; item.ItemId = number; try { @@ -692,7 +683,10 @@ } if ((conf.StrIndex > facadeView.Count - 1) || (conf.StrIndex < 0)) conf.StrIndex = 0; - + if (facadeView.Count == 0) + GUIControl.ShowControl(GetID, 34); + else + GUIControl.HideControl(GetID, 34); GUIPropertyManager.SetProperty("#nbobjects", facadeView.Count.ToString() + " " + GUILocalizeStrings.Get(127)); GUIControl.SelectItemControl(GetID, (int)Controls.CTRL_List, (int)conf.StrIndex); if (facadeView.Count == 1 && item.IsFolder) @@ -731,7 +725,6 @@ //---------------------------------------------------------------------------------------- private void affichage_Lstdetail(int ItemId, bool wrep, string wlabel)//wrep = false display only image { - // DataRow[] r = BaseMesFilms.LectureDonn\xE9es("Number = " + ItemId.ToString(), "", "", ""); DataRow[] r = BaseMesFilms.LectureDonn\xE9es(conf.StrDfltSelect, conf.StrFilmSelect, conf.StrSort, conf.StrSortSens); if (ItemId > r.Length) { @@ -742,20 +735,14 @@ GUIControl.HideControl(GetID, 34); try { - //if (!(conf.FileImage == conf.StrPathImg + "\\" + r[ItemId]["Picture"].ToString() || conf.FileImage == r[ItemId]["Picture"].ToString())) - //{ - //if (conf.FileImage != "9999") - // ImgLstFilm.FreeResources(); - // ImgLstFilm2.FreeResources(); - if (r[ItemId]["Picture"].ToString().IndexOf(":\\") == -1) - conf.FileImage = conf.StrPathImg + "\\" + r[ItemId]["Picture"].ToString(); - else - conf.FileImage = r[ItemId]["Picture"].ToString(); - if (!System.IO.File.Exists(conf.FileImage)) - conf.FileImage = conf.DefaultCover; - ImgLstFilm.SetFileName(conf.FileImage); - ImgLstFilm2.SetFileName(conf.FileImage); - //} + if (r[ItemId]["Picture"].ToString().IndexOf(":\\") == -1) + conf.FileImage = conf.StrPathImg + "\\" + r[ItemId]["Picture"].ToString(); + else + conf.FileImage = r[ItemId]["Picture"].ToString(); + if (!System.IO.File.Exists(conf.FileImage)) + conf.FileImage = conf.DefaultCover; + ImgLstFilm.SetFileName(conf.FileImage); + ImgLstFilm2.SetFileName(conf.FileImage); } catch { @@ -804,7 +791,6 @@ if (!conf.Boolselect) GetFilmList(); else - //getSelectFromDivx(conf.StrTitle1.ToString() + " not like ''", conf.WStrSort, conf.StrSortSens, "*", true, ""); getSelectFromDivx(conf.StrSelect, conf.WStrSort, conf.StrSortSens, conf.Wstar, true, ""); return; } @@ -820,7 +806,6 @@ } if (item.IsFolder) filmstrip.InfoImageFileName = item.ThumbnailImage; - // else filmstrip.InfoImageFileName = MediaPortal.Util.Utils.ConvertToLargeCoverArt(item.ThumbnailImage); else filmstrip.InfoImageFileName = item.ThumbnailImage; } @@ -906,15 +891,10 @@ BtnSrtBy.Label = GUILocalizeStrings.Get(103); conf.Boolselect = true; conf.Wselectedlabel = ""; - //conf.StrActors = ""; - // boolreturn = true; if (ClearIndex) conf.StrIndex = 0; - //facadeView.FreeResources(); Change_LayOut(0); facadeView.Clear(); - - //foreach (DataRow enr in LectureDonn\xE9es(WstrSelect, WStrSort, WStrSortSens)) foreach (DataRow enr in BaseMesFilms.LectureDonn\xE9es(conf.StrDfltSelect, WstrSelect, WStrSort, WStrSortSens)) { if ((WStrSort == "Date") || (WStrSort == "DateAdded")) @@ -947,7 +927,6 @@ for (wi = 0; wi != w_tableau.Count; wi++) { champselect = w_tableau[wi].ToString(); -// if ((Wnb_enr > 0) && (string.Compare(champselect.ToString(), wchampselect.ToString(), true) == 0)) if (string.Compare(champselect.ToString(), wchampselect.ToString(), true) == 0) Wnb_enr++; else @@ -965,18 +944,6 @@ Wnb_enr = 1; wchampselect = champselect.ToString(); } - //else - //{ - // if ((Wnb_enr > 0) && (wchampselect.Length > 0)) - // { - // item = new GUIListItem(); - // item.Label = wchampselect.ToString(); - // item.Label2 = Wnb_enr.ToString(); - // facadeView.Add(item); - // if (SelItem != "" && item.Label == SelItem) conf.StrIndex = facadeView.Count - 1; //test if this item is one to select - // Wnb_enr = 0; - // } - //} } } @@ -997,7 +964,10 @@ if ((conf.StrIndex > facadeView.Count - 1) || (conf.StrIndex < 0)) //check index within bounds, will be unless xml file heavily edited conf.StrIndex = 0; - GUIControl.ShowControl(GetID, 34); + if (facadeView.Count == 0) + GUIControl.HideControl(GetID, 34); + else + GUIControl.ShowControl(GetID, 34); GUIPropertyManager.SetProperty("#nbobjects", facadeView.Count.ToString() + " " + GUILocalizeStrings.Get(127)); GUIControl.SelectItemControl(GetID, (int)Controls.CTRL_List, (int)conf.StrIndex); } @@ -1035,7 +1005,6 @@ { //chargement des films BaseMesFilms.LoadFilm(conf.StrFileXml); -// conf = new Configuration(Configuration.CurrentConfig, false); } Layout = conf.StrLayOut; @@ -1051,7 +1020,6 @@ BtnSrtBy.SortChanged += new SortEventHandler(SortChanged); if (conf.Boolselect) { - //Change_LayOut(0); getSelectFromDivx(conf.StrSelect, conf.WStrSort, conf.StrSortSens, conf.Wstar, false, ""); // preserve index from last time } else @@ -1066,7 +1034,6 @@ conf.StrSelect = conf.StrTitle1.ToString() + " not like ''"; TxtSelect.Label = conf.StrTxtSelect = ""; conf.Boolselect = false; - //StrIndex = -1; if (conf.StrSortSens == " ASC") BtnSrtBy.IsAscending = true; else @@ -1091,7 +1058,6 @@ conf.Boolselect = false; conf.Boolreturn = true; conf.WStrSort = conf.StrViewDfltItem; - //conf.Wselectedlabel = ""; if (conf.StrViewDfltItem == "DateAdded") conf.StrSelect = "Date" + " like '" + DateTime.Parse(conf.StrViewDfltText).ToShortDateString() + "'"; else @@ -1157,7 +1123,6 @@ if (choice_view.ToLower() == "year") { // Change View by Year - //Change_LayOut(0); conf.WStrSort = "YEAR"; conf.WStrSortSens = " DESC"; BtnSrtBy.IsAscending = false; @@ -1167,7 +1132,6 @@ if (choice_view.ToLower() == "category") { // Change View by "Category": - //Change_LayOut(0); conf.WStrSort = "CATEGORY"; conf.WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1177,7 +1141,6 @@ if (choice_view.ToLower() == "country") { // Change View by "Country": - //Change_LayOut(0); conf.WStrSort = "COUNTRY"; conf.WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1204,7 +1167,6 @@ if ((choice_view.ToLower() == "view1") || (choice_view.ToLower() == conf.StrViewItem1.ToLower())) { // Change View by "View1": - //Change_LayOut(0); conf.WStrSort = conf.StrViewItem1; // specific user View1 conf.WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1217,7 +1179,6 @@ if ((choice_view.ToLower() == "view2") || (choice_view.ToLower() == conf.StrViewItem2.ToLower())) { // Change View by "View2": - //Change_LayOut(0); conf.WStrSort = conf.StrViewItem2; conf.WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1231,9 +1192,8 @@ { string newConfig = Configuration.Choice_Config(GetID); newConfig = Configuration.Control_Access_Config(newConfig, GetID); - + if (newConfig != "") // if user escapes dialog or bad value leave system unchanged - //if (newConfig != "" && newConfig != Configuration.CurrentConfig) // if user escapes dialog or bad value leave system unchanged { //Change "Config": Configuration.SaveConfiguration(Configuration.CurrentConfig, facadeView.SelectedListItem.ItemId, facadeView.SelectedListItem.Label); Modified: trunk/plugins/MyFilms/MesFilms.csproj =================================================================== --- trunk/plugins/MyFilms/MesFilms.csproj 2007-11-30 16:37:26 UTC (rev 1113) +++ trunk/plugins/MyFilms/MesFilms.csproj 2007-12-01 16:54:02 UTC (rev 1114) @@ -30,26 +30,26 @@ <DebugSymbols>true</DebugSymbols> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Core, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Rc3\Core.DLL</HintPath> + <HintPath>..\..\mediaportal_plugin\MesFilms\Core_v0.2.3 SVN\Core.dll</HintPath> </Reference> - <Reference Include="Databases, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Databases, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Rc3\Databases.DLL</HintPath> + <HintPath>..\..\mediaportal_plugin\MesFilms\Core_v0.2.3 SVN\Databases.dll</HintPath> </Reference> - <Reference Include="Dialogs, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Dialogs, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Rc3\Dialogs.DLL</HintPath> + <HintPath>..\..\mediaportal_plugin\MesFilms\Core_v0.2.3 SVN\Dialogs.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> - <Reference Include="Utils, Version=2.2.2.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Utils, Version=2.2.2.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Rc3\Utils.DLL</HintPath> + <HintPath>..\..\mediaportal_plugin\MesFilms\Core_v0.2.3 SVN\Utils.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/MyFilms/MesFilmsDetail.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-11-30 16:37:26 UTC (rev 1113) +++ trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-12-01 16:54:02 UTC (rev 1114) @@ -27,11 +27,12 @@ using System.Collections; using System.Windows.Forms; using System.Text.RegularExpressions; -using MediaPortal.Util; using System.Data; +using System.Diagnostics; -using MediaPortal.Playlists; using System.IO; +using MediaPortal.Util; +using MediaPortal.Playlists; using MediaPortal.Dialogs; using MediaPortal.Player; using MediaPortal.Video.Database; @@ -39,7 +40,6 @@ using MediaPortal.GUI.Library; using SQLite.NET; using MediaPortal.Configuration; -using Core.Util; using NewStringLib; namespace MesFilms @@ -156,7 +156,6 @@ // Windows Init //--------------------------------------------------------------------------------------- g_Player.PlayBackStarted += new MediaPortal.Player.g_Player.StartedHandler(OnPlayBackStarted); - //g_Player.PlayBackEnded += new MediaPortal.Player.g_Player.EndedHandler(OnPlayBackEnded); m_directory.SetExtensions(Utils.VideoExtensions); base.OnMessage(messageType); @@ -252,15 +251,6 @@ base.OnMessage(messageType); return true; } - ////------------------------------------------------------------------------------------------- - //// Load the XML data. - ////------------------------------------------------------------------------------------------- - //private DataRow[] LectureDonn\xE9es(string StrFilmSelect, string StrSort, string StrSortSens) - //{ - // r = BaseMesFilms.LectureDonn\xE9es(StrFilmSelect, StrSort, StrSortSens); - // StrMax = (int)r.Length; - // return r; - //} //-------------------------------------------------------------------------------------------- // Update specifics Infos //-------------------------------------------------------------------------------------------- @@ -413,7 +403,6 @@ //------------------------------------------------------------------------------------------- private string control_searchNum(string stext) { - //Regex maRegexp = new Regex("^[0-9]{1,2}[\\.,][0-9]{1}$"); Regex maRegexp = new Regex("^[0-9]{1,2}[\\.,]?[0-9]?$"); if (!maRegexp.IsMatch(stext)) { @@ -442,7 +431,6 @@ // selects records and sets StrIndex based on ItemId (leaves unchanged if ItemId=-1). private void afficher_init(int ItemId) { - // r = BaseMesFilms.LectureDonn\xE9es(MesFilms.conf.StrDfltSelect, MesFilms.conf.StrSelect, MesFilms.conf.StrSort, MesFilms.conf.StrSortSens); r = BaseMesFilms.LectureDonn\xE9es(MesFilms.conf.StrDfltSelect, MesFilms.conf.StrFilmSelect, MesFilms.conf.StrSort, MesFilms.conf.StrSortSens); StrMax = r.Length; } @@ -632,6 +620,9 @@ // Play Movie //------------------------------------------------------------------------------------------- { + // Run externaly Program before Playing if defined in setup + if ((MesFilms.conf.CmdPar.Length > 0) && (MesFilms.conf.CmdPar != "(none)")) + RunProgram(MesFilms.conf.CmdExe, r[MesFilms.conf.StrIndex][MesFilms.conf.CmdPar].ToString()); if (g_Player.Playing) g_Player.Stop(); string fileName = null; @@ -784,11 +775,6 @@ VideoDatabase.SetMovieDuration(idFile, movieDuration); } } - //private void OnPlayBackEnded(MediaPortal.Player.g_Player.MediaType type, string filename) - //{ - // System.Windows.Forms.MessageBox.Show("OnPlayBackEnded"); - - //} private void AddFileToDatabase(string strFile,int select_item) { if (!Utils.IsVideo(strFile)) return; @@ -887,7 +873,7 @@ dlgOk.SetLine(2, "'" + MesFilms.conf.StrIdentItem.ToString() + "' = " + r[select_item][MesFilms.conf.StrIdentItem].ToString());//ANT Item Identification for Media else dlgOk.SetLine(2, "' disc n\xB0 = " + r[select_item]["Number"].ToString());//ANT Number for Identification Media - dlgOk.SetLine(3, wfile);//ANT File Name + dlgOk.SetLine(3, file);//ANT File Name dlgOk.DoModal(GetID); PlayMovie_Divx(filename, select_item, false); // try a second time. Maybe disc mounted return; @@ -994,7 +980,6 @@ } // play movie... - PlayMovieFromPlayList(NoResumeMovie, wselectedFileIndex - 1); } } @@ -1065,13 +1050,9 @@ { movieDetails.Year = 0; } string strThumb = MediaPortal.Util.Utils.GetCoverArtName(Thumbs.MovieTitle, movieDetails.Title); string LargeThumb = MediaPortal.Util.Utils.GetLargeCoverArtName(Thumbs.MovieTitle, movieDetails.Title); - + try { - //if (r1[select_item]["Picture"].ToString().IndexOf(":\\") == -1) - // File.Copy(MesFilms.conf.StrPathImg + "\\" + r1[select_item]["Picture"].ToString(), LargeThumb, true); - //else - // File.Copy(r1[select_item]["Picture"].ToString(), LargeThumb, true); string wImage; if (r1[select_item]["Picture"].ToString().IndexOf(":\\") == -1) wImage = MesFilms.conf.StrPathImg + "\\" + r1[select_item]["Picture"].ToString(); @@ -1079,9 +1060,18 @@ wImage = r1[select_item]["Picture"].ToString(); if (!System.IO.File.Exists(wImage)) wImage = Config.Dir.Skin + "\\media\\Films_No_Cover.png"; - - MediaPortal.Util.Picture.CreateThumbnail(wImage, strThumb, 128, 128, 0); - MediaPortal.Util.Picture.CreateThumbnail(wImage, LargeThumb, 512, 512, 0); + if (!System.IO.File.Exists(strThumb)) + { + if (System.IO.File.Exists(wImage)) + { + // CreateThumbnail Version 0.2.3 + SVN + if (Picture.CreateThumbnail(wImage, strThumb, (int)Thumbs.ThumbResolution, (int)Thumbs.ThumbResolution, 0, Thumbs.SpeedThumbsSmall)) + Picture.CreateThumbnail(wImage, LargeThumb, (int)Thumbs.ThumbLargeResolution, (int)Thumbs.ThumbLargeResolution, 0, Thumbs.SpeedThumbsLarge); + //// CreateThumbnail Version 0.2.3 Stable + //if (Picture.CreateThumbnail(wImage, strThumb, (int)Thumbs.ThumbResolution, (int)Thumbs.ThumbResolution, 0)) + // Picture.CreateThumbnail(wImage, LargeThumb, (int)Thumbs.ThumbLargeResolution, (int)Thumbs.ThumbLargeResolution, 0); + } + } } catch { @@ -1218,11 +1208,16 @@ file = file.Replace("\xEF", "[i\xEF]"); file = file.Replace("\xE7", "[c\xE7]"); oRegex = new System.Text.RegularExpressions.Regex(file); + string wpath; foreach (string path in SearchDir) { - if (System.IO.Directory.Exists(path)) + if (!(path.LastIndexOf(@"\") == path.Length - 1)) + wpath = path + "\\"; + else + wpath = path; + if (System.IO.Directory.Exists(wpath)) { - DirectoryInfo dirsInf = new DirectoryInfo(path); + DirectoryInfo dirsInf = new DirectoryInfo(wpath); //On retourne une liste d'informations sur les fichiers contenus dans le r\xE9pertoire FileSystemInfo[] filesInf = dirsInf.GetFileSystemInfos(); @@ -1234,22 +1229,12 @@ foreach (System.Text.RegularExpressions.Match oMatch in oMatches) { if (MediaPortal.Util.Utils.IsVideo(fi.Name) || VirtualDirectory.IsImageFile(System.IO.Path.GetExtension(fi.Name))) - if (path.LastIndexOf(@"\") + 1 == path.Length) - result.Add(path + fi.Name); - else - result.Add(path + "\\" + fi.Name); + result.Add(wpath + fi.Name); else { if (fi.Attributes.ToString() == "Directory") - if (path.LastIndexOf(@"\") + 1 == path.Length) - { - if (System.IO.File.Exists(path.Trim() + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO")) - result.Add(path.Trim() + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO"); - } - else - if (System.IO.File.Exists(path.Trim() + "\\" + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO")) - result.Add(path.Trim() + "\\" + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO"); - + if (System.IO.File.Exists(path.Trim() + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO")) + result.Add(wpath.Trim() + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO"); } } } @@ -1307,35 +1292,18 @@ else { string file = filename.Substring(filename.LastIndexOf(@"\") + 1); - string wdirstor = StrDirStor; - if (wdirstor.Length > 0) + System.Text.RegularExpressions.Regex oRegex; + oRegex = new System.Text.RegularExpressions.Regex(";"); + string[] SearchDir = oRegex.Split(StrDirStor); + string wpath; + foreach (string path in SearchDir) { - int start = 0; - int end = wdirstor.Length; - int at = 0; - int count; - while ((start <= end) && (at > -1)) - { - count = end - start; - at = wdirstor.IndexOf(";", start, count); - if (at == -1) - { - if (wdirstor.Substring(end - start - 1, 1).Trim() == "\\") - if (System.IO.File.Exists(wdirstor.Substring(start, end - start).Trim().ToString() + file)) - return (wdirstor.Substring(start, end - start).Trim().ToString() + file); - else - if (System.IO.File.Exists(wdirstor.Substring(start, end - start).Trim().ToString() + "\\" + file)) - return (wdirstor.Substring(start, end - start).Trim().ToString() + "\\" + file); - break; - } - if (wdirstor.Substring(at - start - 1, 1).Trim() == "\\") - if (System.IO.File.Exists(wdirstor.Substring(start, at - start).Trim().ToString() + file)) - return (wdirstor.Substring(start, at - start).Trim().ToString() + file); - else - if (System.IO.File.Exists(wdirstor.Substring(start, at - start).Trim().ToString() + "\\" + file)) - return (wdirstor.Substring(start, at - start).Trim().ToString() + "\\" + file); - start = at + 1; - } + if (!(path.LastIndexOf(@"\") == path.Length - 1)) + wpath = path + "\\"; + else + wpath = path; + if (System.IO.File.Exists(wpath + file)) + return (wpath + file); } string[] drives = Environment.GetLogicalDrives(); foreach (string drive in drives) @@ -1345,9 +1313,7 @@ string driverLetter = drive.Substring(0, 1); filename = String.Format(@"{0}:\", driverLetter) + file; if (System.IO.File.Exists(filename)) - { return filename; - } } } return "false"; @@ -1486,6 +1452,29 @@ return DaemonTools.IsMounted(file); } + private void RunProgram(string exeName, string argsLine) + { + if (exeName.Length > 0) + { + ProcessStartInfo psI = new ProcessStartInfo(exeName, argsLine); + Process newProcess = new Process(); + + try + { + newProcess.StartInfo.FileName = exeName; + newProcess.StartInfo.Arguments = argsLine; + newProcess.StartInfo.UseShellExecute = true; + newProcess.StartInfo.CreateNoWindow = true; + newProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + newProcess.Start(); + } + + catch (Exception e) + { + throw e; + } + } + } } } #endregion Modified: trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-11-30 16:37:26 UTC (rev 1113) +++ trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-12-01 16:54:02 UTC (rev 1114) @@ -139,6 +139,9 @@ this.MesFilmsCat = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.groupBox12 = new System.Windows.Forms.GroupBox(); + this.CmdPar = new System.Windows.Forms.ComboBox(); + this.CmdExe = new System.Windows.Forms.TextBox(); this.groupBox6 = new System.Windows.Forms.GroupBox(); this.AntSort = new System.Windows.Forms.ComboBox(); this.AntTSort = new System.Windows.Forms.TextBox(); @@ -190,12 +193,15 @@ this.ButSave = new System.Windows.Forms.Button(); this.Config_Dflt = new System.Windows.Forms.CheckBox(); this.Config_Menu = new System.Windows.Forms.CheckBox(); + this.groupBox13 = new System.Windows.Forms.GroupBox(); + this.OnlyFile = new System.Windows.Forms.CheckBox(); this.General.SuspendLayout(); this.tabPage1.SuspendLayout(); this.groupBox11.SuspendLayout(); this.groupBox7.SuspendLayout(); this.groupBox5.SuspendLayout(); this.tabPage2.SuspendLayout(); + this.groupBox12.SuspendLayout(); this.groupBox6.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -205,6 +211,7 @@ this.tabPage3.SuspendLayout(); this.groupBox10.SuspendLayout(); this.groupBox9.SuspendLayout(); + this.groupBox13.SuspendLayout(); this.SuspendLayout(); // // label10 @@ -214,7 +221,7 @@ this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(69, 13); this.label10.TabIndex = 34; - this.label10.Text = "Version 4.3.1"; + this.label10.Text = "Version 4.3.2"; // // textBox1 // @@ -260,7 +267,7 @@ this.General.Location = new System.Drawing.Point(12, 66); this.General.Name = "General"; this.General.SelectedIndex = 0; - this.General.Size = new System.Drawing.Size(755, 349); + this.General.Size = new System.Drawing.Size(755, 380); this.General.TabIndex = 46; // // tabPage1 @@ -279,7 +286,7 @@ this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(747, 323); + this.tabPage1.Size = new System.Drawing.Size(747, 354); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "General"; this.tabPage1.UseVisualStyleBackColor = true; @@ -614,6 +621,7 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.groupBox12); this.tabPage2.Controls.Add(this.groupBox6); this.tabPage2.Controls.Add(this.groupBox4); this.tabPage2.Controls.Add(this.groupBox2); @@ -623,16 +631,42 @@ this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(747, 323); + this.tabPage2.Size = new System.Drawing.Size(747, 354); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "Optional"; this.tabPage2.UseVisualStyleBackColor = true; // + // groupBox12 + // + this.groupBox12.Controls.Add(this.CmdPar); + this.groupBox12.Controls.Add(this.CmdExe); + this.groupBox12.Location = new System.Drawing.Point(369, 296); + this.groupBox12.Name = "groupBox12"; + this.groupBox12.Size = new System.Drawing.Size(370, 48); + this.groupBox12.TabIndex = 30; + this.groupBox12.TabStop = false; + this.groupBox12.Text = "Pre-Launching Command"; + // + // CmdPar + // + this.CmdPar.FormattingEnabled = true; + this.CmdPar.Location = new System.Drawing.Point(229, 17); + this.CmdPar.Name = "CmdPar"; + this.CmdPar.Size = new System.Drawing.Size(129, 21); + this.CmdPar.TabIndex = 36; + // + // CmdExe + // + this.CmdExe.Location = new System.Drawing.Point(10, 18); + this.CmdExe.Name = "CmdExe"; + this.CmdExe.Size = new System.Drawing.Size(213, 20); + this.CmdExe.TabIndex = 37; + // // groupBox6 // this.groupBox6.Controls.Add(this.AntSort); this.groupBox6.Controls.Add(this.AntTSort); - this.groupBox6.Location = new System.Drawing.Point(371, 22); + this.groupBox6.Location = new System.Drawing.Point(371, 18); this.groupBox6.Name = "groupBox6"; this.groupBox6.Size = new System.Drawing.Size(370, 48); this.groupBox6.TabIndex = 29; @@ -662,7 +696,7 @@ this.groupBox4.Controls.Add(this.AntUpdText2); this.groupBox4.Controls.Add(this.AntUpdItem1); this.groupBox4.Controls.Add(this.AntUpdText1); - this.groupBox4.Location = new System.Drawing.Point(369, 229); + this.groupBox4.Location = new System.Drawing.Point(369, 217); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(372, 70); this.groupBox4.TabIndex = 28; @@ -724,9 +758,9 @@ this.groupBox2.Controls.Add(this.AntFilterText2); this.groupBox2.Controls.Add(this.AntFilterItem1); this.groupBox2.Controls.Add(this.AntFilterText1); - this.groupBox2.Location = new System.Drawing.Point(371, 82); + this.groupBox2.Location = new System.Drawing.Point(371, 72); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(370, 141); + this.groupBox2.Size = new System.Drawing.Size(370, 139); this.groupBox2.TabIndex = 27; this.groupBox2.TabStop = false; this.groupBox2.Text = "Ant Selected Enreg."; @@ -751,7 +785,7 @@ this.Selected_Enreg.Name = "Selected_Enreg"; this.Selected_Enreg.ReadOnly = true; this.Selected_Enreg.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.Selected_Enreg.Size = new System.Drawing.Size(355, 49); + this.Selected_Enreg.Size = new System.Drawing.Size(355, 43); this.Selected_Enreg.TabIndex = 28; this.Selected_Enreg.TabStop = false; // @@ -837,7 +871,7 @@ this.groupBox8.Controls.Add(this.LayOut); this.groupBox8.Controls.Add(this.View_Dflt_Item); this.groupBox8.Controls.Add(this.View_Dflt_Text); - this.groupBox8.Location = new System.Drawing.Point(12, 221); + this.groupBox8.Location = new System.Drawing.Point(12, 216); this.groupBox8.Name = "groupBox8"; this.groupBox8.Size = new System.Drawing.Size(347, 96); this.groupBox8.TabIndex = 26; @@ -898,7 +932,7 @@ this.groupBox3.Controls.Add(this.AntViewText1); this.groupBox3.Controls.Add(this.AntViewItem2); this.groupBox3.Controls.Add(this.AntViewItem1); - this.groupBox3.Location = new System.Drawing.Point(12, 147); + this.groupBox3.Location = new System.Drawing.Point(12, 142); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(347, 68); this.groupBox3.TabIndex = 24; @@ -944,7 +978,7 @@ this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.AntLabel1); this.groupBox1.Controls.Add(this.AntItem1); - this.groupBox1.Location = new System.Drawing.Point(12, 22); + this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(347, 119); this.groupBox1.TabIndex = 22; @@ -1011,12 +1045,13 @@ // // tabPage3 // + this.tabPage3.Controls.Add(this.groupBox13); this.tabPage3.Controls.Add(this.groupBox10); this.tabPage3.Controls.Add(this.groupBox9); this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(747, 323); + this.tabPage3.Size = new System.Drawing.Size(747, 354); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "DVDProfiler"; this.tabPage3.UseVisualStyleBackColor = true; @@ -1024,7 +1059,7 @@ // groupBox10 // this.groupBox10.Controls.Add(this.SortTitle); - this.groupBox10.Location = new System.Drawing.Point(56, 144); + this.groupBox10.Location = new System.Drawing.Point(56, 119); this.groupBox10.Name = "groupBox10"; this.groupBox10.Size = new System.Drawing.Size(327, 65); this.groupBox10.TabIndex = 1; @@ -1048,7 +1083,7 @@ this.groupBox9.Controls.Add(this.DVDPTagField); this.groupBox9.Location = new System.Drawing.Point(56, 32); this.groupBox9.Name = "groupBox9"; - this.groupBox9.Size = new System.Drawing.Size(327, 89); + this.groupBox9.Size = new System.Drawing.Size(327, 81); this.groupBox9.TabIndex = 0; this.groupBox9.TabStop = false; this.groupBox9.Text = "Use Tags"; @@ -1085,7 +1120,7 @@ // // ButQuit // - this.ButQuit.Location = new System.Drawing.Point(679, 421); + this.ButQuit.Location = new System.Drawing.Point(679, 452); this.ButQuit.Name = "ButQuit"; this.ButQuit.Size = new System.Drawing.Size(64, 31); this.ButQuit.TabIndex = 40; @@ -1095,7 +1130,7 @@ // // ButDelet // - this.ButDelet.Location = new System.Drawing.Point(599, 421); + this.ButDelet.Location = new System.Drawing.Point(599, 452); this.ButDelet.Name = "ButDelet"; this.ButDelet.Size = new System.Drawing.Size(64, 31); this.ButDelet.TabIndex = 39; @@ -1105,7 +1140,7 @@ // // ButSave // - this.ButSave.Location = new System.Drawing.Point(529, 421); + this.ButSave.Location = new System.Drawing.Point(529, 452); this.ButSave.Name = "ButSave"; this.ButSave.Size = new System.Drawing.Size(64, 31); this.ButSave.TabIndex = 47; @@ -1133,11 +1168,31 @@ this.Config_Menu.Text = "Display Always Configuration\'s Menu (if no Default Config)"; this.Config_Menu.UseVisualStyleBackColor = true; // + // groupBox13 + // + this.groupBox13.Controls.Add(this.OnlyFile); + this.groupBox13.Location = new System.Drawing.Point(56, 190); + this.groupBox13.Name = "groupBox13"; + this.groupBox13.Size = new System.Drawing.Size(327, 65); + this.groupBox13.TabIndex = 2; + this.groupBox13.TabStop = false; + this.groupBox13.Text = "Notes Field"; + // + // OnlyFile + // + this.OnlyFile.AutoSize = true; + this.OnlyFile.Location = new System.Drawing.Point(24, 28); + this.OnlyFile.Name = "OnlyFile"; + this.OnlyFile.Size = new System.Drawing.Size(221, 17); + this.OnlyFile.TabIndex = 0; + this.OnlyFile.Text = "Notes Field contains only Movie Filename"; + this.OnlyFile.UseVisualStyleBackColor = true; + // // MesFilmsSetup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(780, 476); + this.ClientSize = new System.Drawing.Size(795, 495); this.Controls.Add(this.Config_Menu); this.Controls.Add(this.ButSave); this.Controls.Add(this.Config_Dflt); @@ -1163,6 +1218,8 @@ this.groupBox5.ResumeLayout(false); this.groupBox5.PerformLayout(); this.tabPage2.ResumeLayout(false); + this.groupBox12.ResumeLayout(false); + this.groupBox12.PerformLayout(); this.groupBox6.ResumeLayout(false); this.groupBox6.PerformLayout(); this.groupBox4.ResumeLayout(false); @@ -1180,6 +1237,8 @@ this.groupBox10.PerformLayout(); this.groupBox9.ResumeLayout(false); this.groupBox9.PerformLayout(); + this.groupBox13.ResumeLayout(false); + this.groupBox13.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -1280,6 +1339,11 @@ private TextBox DefaultCover; private Label label19; private CheckBox AlwaysDefaultView; + private GroupBox groupBox12; + private ComboBox CmdPar; + private TextBox CmdExe; + private GroupBox groupBox13; + private CheckBox OnlyFile; } } \ No newline at end of file Modified: trunk/plugins/MyFilms/MesFilmsSetup.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-11-30 16:37:26 UTC (rev 1113) +++ trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-12-01 16:54:02 UTC (rev 1114) @@ -62,6 +62,7 @@ ToolTip1.SetToolTip(this.ButQuit, "No comments..."); ToolTip1.SetToolTip(this.groupBox9, "With those options, you can use specifics Tags DVDP's Fields" + "\n" + "and store either with Genre field either in another field" + "\n" + "of the generated DB."); ToolTip1.SetToolTip(this.groupBox10, "With that option, you can store either the DVDP's Sorted field" + "\n" + "either the Original Title of the generated DB."); + ToolTip1.SetToolTip(this.groupBox12, "Tou can define here a Command and the ANT field item containing" + "\n" + "the parameter value to be launch before playing a movie."); textBox1.Text = MyFilms_xmlreader.GetValueAsString("MyFilms", "PluginName", "Films"); MesFilms_nb_config = MyFilms_xmlreader.GetValueAsInt("MyFilms", "NbConfig", -1); for (int i = 0; i < (int)MesFilms_nb_config; i++) @@ -90,6 +91,7 @@ AntItem1.Items.Add("(none)"); AntItem2.Items.Add("(none)"); AntItem3.Items.Add("(none)"); + CmdPar.Items.Add("(none)"); CatalogType.SelectedIndex = 0; foreach (DataColumn dc in ds.Movie.Columns) { @@ -104,6 +106,7 @@ AntTitle2.Items.Add(dc.ColumnName); AntFilterItem1.Items.Add(dc.ColumnName); AntFilterItem2.Items.Add(dc.ColumnName); + CmdPar.Items.Add(dc.ColumnName); if (!(dc.ColumnName == "Rating") & !(dc.ColumnName == "Date") & !(dc.ColumnName == "Year") & !(dc.ColumnName == "Category") & !(dc.ColumnName == "Country") && !(dc.ColumnName == "TranslatedTitle") && !(dc.ColumnName == "OriginalTitle") && !(dc.ColumnName == "FormattedTitle") && !(dc.ColumnName == "Description") && !(dc.ColumnName == "Comments")) { AntViewItem1.Items.Add(dc.ColumnName); @@ -130,7 +133,6 @@ { MesFilmsCat.Text = openFileDialog1.FileName; MesFilmsImg.Text = MesFilmsCat.Text.Substring(0, MesFilmsCat.Text.LastIndexOf(@"\")); - PathStorage.Text = MesFilmsCat.Text.Substring(0, MesFilmsCat.Text.LastIndexOf(@"\")); } } @@ -311,44 +313,9 @@ return; } Selected_Enreg_TextChanged(); -// StrDfltSelect = ""; -// string wAntFilterSign; -// if (AntFilterSign1.Text == "#") -// wAntFilterSign = "<>"; -// else -// wAntFilterSign = AntFilterSign1.Text; -// if ((AntFilterItem1.Text.Length > 0) && !(AntFilterItem1.Text == "(none)")) -// if (AntFilterItem1.Text == "DateAdded") -//// StrDfltSelect = "(" + AntFilterItem1.Text + " " + wAntFilterSign + " #" + Convert.ToDateTime(AntFilterText1.Text) + "# or " + AntFilterItem1.Text + " is null) "; -// StrDfltSelect = "(" + AntFilterItem1.Text + " " + wAntFilterSign + " #" + Convert.ToDateTime(AntFilterText1.Text) + "# ) "; -// else -//// StrDfltSelect = "(" + AntFilterItem1.Text + " " + wAntFilterSign + " '" + AntFilterText1.Text + "' or " + AntFilterItem1.Text + " is null) "; -// StrDfltSelect = "(" + AntFilterItem1.Text + " " + wAntFilterSign + " '" + AntFilterText1.Text + "') "; -// if ((AntFilterComb.Text == "or") && (StrDfltSelect.Length > 0)) -// StrDfltSelect = StrDfltSelect + " OR "; -// else -// if (StrDfltSelect.Length > 0) -// StrDfltSelect = StrDfltSelect + " AND "; -// if (AntFilterSign2.Text == "#") -// wAntFilterSign = "<>"; -// else -// wAntFilterSign = AntFilterSign2.Text; -// if ((AntFilterItem2.Text.Length > 0) && !(AntFilterItem2.Text == "(none)")) -// if (AntFilterItem2.Text == "DateAdded") -//// StrDfltSelect = "(" + StrDfltSelect + "(" + AntFilterItem2.Text + " " + wAntFilterSign + " #" + Convert.ToDateTime(AntFilterText2.Text) + "# or " + AntFilterItem2.Text + " is null)) AND "; -// StrDfltSelect = "(" + StrDfltSelect + "(" + AntFilterItem2.Text + " " + wAntFilterSign + " #" + Convert.ToDateTime(AntFilterText2.Text) + "# )) AND "; -// else -//// StrDfltSelect = "(" + StrDfltSelect + "(" + AntFilterItem2.Text + " " + wAntFilterSign + " '" + AntFilterText2.Text + "' or " + AntFilterItem2.Text + " is null)) AND "; -// StrDfltSelect = "(" + StrDfltSelect + "(" + AntFilterItem2.Text + " " + wAntFilterSign + " '" + AntFilterText2.Text + "' )) AND "; if (View_Dflt_Item.Text.Length == 0) View_Dflt_Item.Text = "(none)"; Verify_Config(); - //string currentLanguage = String.Empty; - //using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) - //{ - // currentLanguage = xmlreader.GetValueAsString("skin", "language", "English"); - //} - //string LanguageDirectory = Config.GetFolder(Config.Dir.Language); int WLayOut = 0; if (LayOut.Text == "Small Icons") WLayOut = 1; @@ -422,9 +389,12 @@ MyFilms_xmlwriter.SetValueAsBool(Config_Name.Text.ToString(), "AlwaysDefaultView", AlwaysDefaultView.Checked); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "ItemSearchFileName", ItemSearchFileName.Text); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "DefaultCover", DefaultCover.Text); + MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "CmdExe", CmdExe.Text); + MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "CmdPar", CmdPar.Text); if (CatalogType.SelectedIndex == 1) { - MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "SortTitle", SortTitle.Checked); + MyFilms_xmlwriter.SetValueAsBool(Config_Name.Text.ToString(), "SortTitle", SortTitle.Checked); + MyFilms_xmlwriter.SetValueAsBool(Config_Name.Text.ToString(), "OnlyFile", OnlyFile.Checked); if (radioButton1.Checked) MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "DVDPTagField", "Category"); else @@ -437,16 +407,19 @@ Config_Name.Items.Remove(Config_Name.Text); Config_Name.Items.Add(w_Config_Name); Config_Name.Text = w_Config_Name; -// Config_Name.ResetText(); -// Refresh_Items(false); - } private void butPath_Click(object sender, EventArgs e) { if (folderBrowserDialog1.ShowDialog(this) == DialogResult.OK) { - PathStorage.Text = PathStorage.Text + ";" + folderBrowserDialog1.SelectedPath; + if (!(folderBrowserDialog1.SelectedPath.LastIndexOf(@"\") == folderBrowserDialog1.SelectedPath.Length - 1)) + folderBrowserDialog1.SelectedPath = folderBrowserDialog1.SelectedPath + "\\"; + + if (PathStorage.Text.Length == 0) + PathStorage.Text = folderBrowserDialog1.SelectedPath; + else + PathStorage.Text = PathStorage.Text + ";" + folderBrowserDialog1.SelectedPath; } } @@ -504,8 +477,10 @@ AntLabel2.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "AntLabel2", ""); AntItem2.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "AntItem2", ""); AntItem3.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "AntItem3", ""); + CmdPar.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "CmdPar", "(none)"); + CmdExe.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "CmdExe", ""); TitleDelim.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "TitleDelim", "\\"); - Dwp.Text = crypto.Decrypter(MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "Dwp", "")); + Dwp.Text = crypto.Decrypter(MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "Dwp", "")); Rpt_Dwp.Text = Dwp.Text; if (MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "SearchFileName", "False") == "True") SearchFileName.Checked = true; @@ -523,10 +498,12 @@ radioButton2.Checked = true; DVDPTagField.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "DVDPTagField", ""); } - if (MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "SortTitle", "False") == "True") - SortTitle.Checked = true; - else - SortTitle.Checked = false; + //if (MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "SortTitle", "False") == "True") + // SortTitle.Checked = true; + //else + // SortTitle.Checked = false; + SortTitle.Checked = MyFilms_xmlreader.GetValueAsBool(Config_Name.Text.ToString(), "SortTitle", false); + OnlyFile.Checked = MyFilms_xmlreader.GetValueAsBool(Config_Name.Text.ToString(), "OnlyFile", false); ItemSearchFileName.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "ItemSearchFileName", ""); DefaultCover.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "DefaultCover", ""); View_Dflt_Item.Items.Remove(View_Dflt_Item.Text); @@ -603,12 +580,15 @@ DefaultCover.ResetText(); Dwp.ResetText(); Rpt_Dwp.ResetText(); + CmdExe.ResetText(); + CmdPar.ResetText(); ItemSearchFileName.ResetText(); SearchFileName.Checked = false; radioButton1.Checked = false; radioButton2.Checked = false; DVDPTagField.ResetText(); SortTitle.Checked = false; + OnlyFile.Checked = false; AlwaysDefaultView.Checked = false; } @@ -703,14 +683,16 @@ MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "LastID"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "Dwp"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "SortTitle"); + MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "OnlyFile"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "DVDPTagField"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "DefaultCover"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text,... [truncated message content] |