From: <pop...@us...> - 2015-02-08 12:30:59
|
Revision: 4942 http://sourceforge.net/p/mp-plugins/code/4942 Author: popy2007 Date: 2015-02-08 12:30:49 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Initial Folder commit Added Paths: ----------- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Configuration/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/language/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug/TempPE/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release/TempPE/ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/Resources/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pop...@us...> - 2015-02-08 12:32:20
|
Revision: 4943 http://sourceforge.net/p/mp-plugins/code/4943 Author: popy2007 Date: 2015-02-08 12:32:12 +0000 (Sun, 08 Feb 2015) Log Message: ----------- svn ignores Property Changed: ---------------- trunk/plugins/CentralizedDatabase/Trunk/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Configuration/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/language/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug/TempPE/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release/ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release/TempPE/ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/Resources/ Index: trunk/plugins/CentralizedDatabase/Trunk =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Configuration =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Configuration 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Configuration 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Configuration ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/language =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/language 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/language 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/language ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug/TempPE =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug/TempPE 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug/TempPE 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Debug/TempPE ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release/TempPE =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release/TempPE 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release/TempPE 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/obj/Release/TempPE ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* Index: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/Resources =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/Resources 2015-02-08 12:30:49 UTC (rev 4942) +++ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/Resources 2015-02-08 12:32:12 UTC (rev 4943) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/Resources ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pop...@us...> - 2015-02-08 12:35:52
|
Revision: 4945 http://sourceforge.net/p/mp-plugins/code/4945 Author: popy2007 Date: 2015-02-08 12:35:39 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Added Paths: ----------- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalDatabaseFactory.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalMovingPicturesDatabase.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalMovingPicturesDatabaseSQLite.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalTVSeriesDatabase.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalTVSeriesDatabaseSQLite.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalVideoDatabase.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalVideoDatabaseSQLite.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabase.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabase.csproj trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabaseConfig.Designer.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabaseConfig.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabaseConfig.resx trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes/EnumUtil.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes/FolderSync.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes/TaskCompletionSourceExtensions.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes/TaskExtrasExtensions.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Classes/UNCTools.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Configuration/Utils.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/AssemblyInfo.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/Resources.Designer.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/Resources.resx trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/CentralizedDatabaseDisabled.png trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/CentralizedDatabaseEnabled.png trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/language/de.xml trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Resources/language/en-US.xml trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/SQLiteResultCacheItem.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Translation.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase.sln trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase.suo trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase.xmp2 trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.3.mpe1 trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/Resources/MPEI_install_header.png trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/Resources/MPEI_left_picture.PNG trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/update.xml trunk/plugins/CentralizedDatabase/Trunk/license.gpl Property Changed: ---------------- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/ Index: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase 2015-02-08 12:33:37 UTC (rev 4944) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase 2015-02-08 12:35:39 UTC (rev 4945) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase ___________________________________________________________________ Modified: svn:ignore ## -1,2 +1,3 ## */bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* bin +obj Added: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalDatabaseFactory.cs =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalDatabaseFactory.cs (rev 0) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalDatabaseFactory.cs 2015-02-08 12:35:39 UTC (rev 4945) @@ -0,0 +1,60 @@ +#region GPL License + +//Mediaportal (http://www.team-mediaportal.com/) Plugin - CentralizedDatabase +//Copyright (C) 2015 Max Wimmelbacher +// +//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 +//of the License, 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 this program; if not, write to the Free Software +//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using MediaPortal.Video.Database; + +namespace CentralizedDatabase +{ + /// <summary> + /// The class CentralizedDatabase.AdditionalDatabaseFactory is providing static methods to get database objects. + /// These returned objects are mapped to the database residing on the path provided in the input parameter strDatabaseFile. + /// </summary> + class AdditionalDatabaseFactory + { + + #region Public Methods + + public static IVideoDatabase GetVideoDatabase(string strDatabaseFile) + { + var objAdditionalDatabase = new AdditionalVideoDatabaseSQLite(strDatabaseFile); + return objAdditionalDatabase.Instance; + } + + public static AdditionalTVSeriesDatabaseSQLite GetTVSeriesDatabase(string strDataBaseFile) + { + var objAdditionalDatabase = new AdditionalTVSeriesDatabaseSQLite(strDataBaseFile); + return objAdditionalDatabase; + } + + public static AdditionalMovingPicturesDatabaseSQLite GetMovingPicturesDatabase(string strDataBaseFile) + { + var objAdditionalDatabase = new AdditionalMovingPicturesDatabaseSQLite(strDataBaseFile); + return objAdditionalDatabase; + } + + #endregion + + } +} \ No newline at end of file Added: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalMovingPicturesDatabase.cs =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalMovingPicturesDatabase.cs (rev 0) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalMovingPicturesDatabase.cs 2015-02-08 12:35:39 UTC (rev 4945) @@ -0,0 +1,104 @@ +#region GPL License + +//Mediaportal (http://www.team-mediaportal.com/) Plugin - CentralizedDatabase +//Copyright (C) 2015 Max Wimmelbacher +// +//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 +//of the License, 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 this program; if not, write to the Free Software +//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using MediaPortal.GUI.Library; + +namespace CentralizedDatabase +{ + + /// <summary> + /// The class CentralizedDatabase.AdditionalMovingPicturesDatabase provides all necessary properties/methods to interact with a moving pictures database. + /// </summary> + + class AdditionalMovingPicturesDatabase + { + #region Declaration + + private string mDatabaseFile; + private AdditionalMovingPicturesDatabaseSQLite mDatabase; + + #endregion Declaration; + + #region Constructors + + public AdditionalMovingPicturesDatabase(string strDatabaseFile) + { + mDatabaseFile = strDatabaseFile; + mDatabase = AdditionalDatabaseFactory.GetMovingPicturesDatabase(mDatabaseFile); + } + + #endregion + + #region Properties + + public string DatabaseName + { + get + { + if (mDatabase != null) + { + return mDatabase.DatabaseName; + } + return string.Empty; + } + } + + #endregion + + #region Public methods + + public void ReOpen() + { + Dispose(); + mDatabase = AdditionalDatabaseFactory.GetMovingPicturesDatabase(mDatabaseFile); + } + + public void Dispose() + { + if (mDatabase != null) + { + mDatabase.Dispose(); + Log.Info("CentralizedDatabase: MovingPictures database closed."); + } + mDatabase = null; + } + + //UpdateDBUserMovieSettings, set the current watch state + public int UpdateDBUserMovieSettings(int? intnullID, int? intnullUserID, int? intnullUserRating, int intWatched, int intResumePart, int intResumeTime, byte[] bteResumeData, int intResume_BDTitle) + { + return mDatabase.UpdateDBUserMovieSettings(intnullID, intnullUserID, intnullUserRating, intWatched, intResumePart, intResumeTime, bteResumeData, intResume_BDTitle); + } + + //InsertDBWatchedHistory, insert an watch history entry into the database + public int InsertDBWatchedHistory(int? intnullUserID, int? intnullMovieID, DateTime dtDateWatched) + { + return mDatabase.InsertDBWatchedHistory(intnullUserID, intnullMovieID, dtDateWatched); + } + + #endregion + + } +} Added: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalMovingPicturesDatabaseSQLite.cs =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalMovingPicturesDatabaseSQLite.cs (rev 0) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalMovingPicturesDatabaseSQLite.cs 2015-02-08 12:35:39 UTC (rev 4945) @@ -0,0 +1,233 @@ +#region GPL License + +//Mediaportal (http://www.team-mediaportal.com/) Plugin - CentralizedDatabase +//Copyright (C) 2015 Max Wimmelbacher +// +//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 +//of the License, 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 this program; if not, write to the Free Software +//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using MediaPortal.GUI.Library; +using MediaPortal.Database; +using SQLite.NET; +using WindowPlugins.GUITVSeries; +using System.Globalization; +using Cornerstone.Database.CustomTypes; +using System.Reflection; + +namespace CentralizedDatabase +{ + + /// <summary> + /// The class CentralizedDatabase.AdditionalMovingPicturesDatabaseSQLite provides all necessary properties/methods which do the real communication with a moving pictures database. + /// Objects created from this class are returned by calls to methods of the class AdditionalDatabaseFactory, + /// </summary> + + class AdditionalMovingPicturesDatabaseSQLite : IDisposable + { + + #region Declaration + + private Dictionary<string, SQLiteResultCacheItem> mCache; + private SQLiteClient mDatabase; + private string mDatabaseFile; + + #endregion + + #region Constructors + + public AdditionalMovingPicturesDatabaseSQLite(string strDatabaseFile) + { + mDatabaseFile = strDatabaseFile; + Open(); + } + + #endregion + + #region Properties + + public string DatabaseName + { + get + { + return mDatabaseFile; + } + } + + #endregion Properties + + #region Public methods + + public void Dispose() + { + mDatabase.Close(); + mDatabase = null; + } + + //UpdateDBUserMovieSettings, set the current watch state + public int UpdateDBUserMovieSettings(int? intnullID, int? intnullUserID, int? intnullUserRating, int intWatched, int intResumePart, int intResumeTime, byte[] bteResumeData, int intResume_BDTitle) + { + string strID = "0"; + string strUserID = "1"; + string strUserRating= "NULL"; + string strSQL; + try + { + //Check if we have the id from the row we want to update + if (intnullID == null) + { + return -1; + }else{ + strID = intnullID.ToString(); + } + + //Check if we have a userID int value, otherwise use the default value of "1" (multiuser support isnt implemented in MovingPictures) + if (intnullUserID != null) strUserID = intnullUserID.ToString(); + + //Check if we have a UserRating int value, otherwise use the default value of "NULL" + if (intnullUserRating != null) strUserRating = intnullUserRating.ToString(); + + //Convert bteResumeData to CornerStone ByteArray and then to string + ByteArray ResumeData = new ByteArray(bteResumeData); + if (ResumeData.ToString() == "") + { + strSQL = String.Format("UPDATE user_movie_settings SET user = {0}, user_rating = {1}, watched = {2}, resume_part = {3}, resume_time = {4}, resume_data = NULL, resume_titlebd = {5} WHERE id = '{6}'", strUserID, strUserRating, intWatched.ToString(), intResumePart.ToString(), intResumeTime.ToString(), intResume_BDTitle.ToString(), strID); + } + else + { + strSQL = String.Format("UPDATE user_movie_settings SET user = {0}, user_rating = {1}, watched = {2}, resume_part = {3}, resume_time = {4}, resume_data = '{5}', resume_titlebd = {6} WHERE id = '{7}'", strUserID, strUserRating, intWatched.ToString(), intResumePart.ToString(), intResumeTime.ToString(), ResumeData.ToString(), intResume_BDTitle.ToString(), strID); + } + + Log.Debug("CentralizedDatabase: (UpdateDBUserMovieSettings) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: UpdateDBUserMovieSettings: MovingPictures database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + return -2; + } + + //OK + return 1; + } + + //InsertDBWatchedHistory, insert an watch history entry into the database + public int InsertDBWatchedHistory(int? intnullUserID, int? intnullMovieID, DateTime dtDateWatched) + { + string strUserID = "1"; + string strMovieID = "0"; + string strSQL; + try + { + //Check if we have a userID int value, otherwise use the default value of "1" (multiuser support isnt implemented in MovingPictures) + if (intnullUserID != null) strUserID = intnullUserID.ToString(); + + //Check if we have a Movie id, if not -> error return + if (intnullMovieID == null) + { + return -1; + } + else + { + strMovieID = intnullMovieID.ToString(); + } + + strSQL = String.Format("INSERT INTO watched_history VALUES (NULL, {0}, {1}, '{2}Z')", strUserID, strMovieID, TimeZone.CurrentTimeZone.ToUniversalTime(dtDateWatched).ToString("yyyy-MM-dd HH:mm:ss")); + Log.Debug("CentralizedDatabase: (InsertDBWatchedHistory) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + + //insert id of movie and watchhistory in table movie_info__watched_history + strSQL = String.Format("INSERT INTO movie_info__watched_history VALUES (NULL, {0}, {1})", strMovieID, mDatabase.LastInsertID().ToString()); + Log.Debug("CentralizedDatabase: (InsertDBWatchedHistory) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: InsertDBWatchedHistory: MovingPictures database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + return -2; + } + + //OK + return 1; + } + + #endregion + + #region Private methods + + private void Open() + { + mCache = new Dictionary<string, SQLiteResultCacheItem>(); + Log.Info("CentralizedDatabase: Opening MovingPictures database " + mDatabaseFile); + try + { + if (mDatabase != null) + { + Log.Info("CentralizedDatabase: MovingPictures database already opened."); + return; + } + mDatabase = new SQLiteClient(mDatabaseFile); + DatabaseUtility.SetPragmas(mDatabase); + Log.Info("CentralizedDatabase: MovingPictures database opened."); + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: MovingPictures database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + private bool CheckCache(string strTableName, string strKey, string strField, ref string strValue) + { + if (mCache.ContainsKey(strTableName) == true) + { + if (mCache[strTableName].Key == strKey && mCache[strTableName].IsDirty == false) + { + if (strValue == string.Empty) + { + strValue = (string)DatabaseUtility.Get(mCache[strTableName].ResultSet, 0, strField); + return true; + } + else if (strValue == (string)DatabaseUtility.Get(mCache[strTableName].ResultSet, 0, strField)) + { + return true; + } + else + { + mCache[strTableName].IsDirty = true; + } + } + } + return false; + } + + private void AddToCache(string strTableName, string strKey, SQLiteResultSet objResultSet) + { + if (mCache.ContainsKey(strTableName) == true) + { + mCache.Remove(strTableName); + } + SQLiteResultCacheItem objCacheItem = new SQLiteResultCacheItem(strKey, objResultSet); + mCache.Add(strTableName, objCacheItem); + } + + #endregion + + } +} \ No newline at end of file Added: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalTVSeriesDatabase.cs =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalTVSeriesDatabase.cs (rev 0) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalTVSeriesDatabase.cs 2015-02-08 12:35:39 UTC (rev 4945) @@ -0,0 +1,211 @@ +#region GPL License + +//Mediaportal (http://www.team-mediaportal.com/) Plugin - CentralizedDatabase +//Copyright (C) 2015 Max Wimmelbacher +// +//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 +//of the License, 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 this program; if not, write to the Free Software +//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using MediaPortal.GUI.Library; + +namespace CentralizedDatabase +{ + + /// <summary> + /// The class CentralizedDatabase.AdditionalTVSeriesDatabase provides all necessary properties/methods to interact with a tvseries database. + /// </summary> + + class AdditionalTVSeriesDatabase + { + #region Declaration + + private string mDatabaseFile; + private AdditionalTVSeriesDatabaseSQLite mDatabase; + + #endregion Declaration; + + #region Constructors + + public AdditionalTVSeriesDatabase(string strDatabaseFile) + { + mDatabaseFile = strDatabaseFile; + mDatabase = AdditionalDatabaseFactory.GetTVSeriesDatabase(mDatabaseFile); + } + + #endregion + + #region Properties + + public string DatabaseName + { + get + { + if (mDatabase != null) + { + return mDatabase.DatabaseName; + } + return string.Empty; + } + } + + #endregion + + #region Public methods + + public void ReOpen() + { + Dispose(); + mDatabase = AdditionalDatabaseFactory.GetTVSeriesDatabase(mDatabaseFile); + } + + public void Dispose() + { + if (mDatabase != null) + { + mDatabase.Dispose(); + Log.Info("CentralizedDatabase: Tv series database closed."); + } + mDatabase = null; + } + + //Gets the CompositeId (unique key to identify an episode) based on the path and filename. + + public string GetCompositeId(string strFilenameAndPath) + { + return mDatabase.GetCompositeId(strFilenameAndPath); + } + + //Gets the CompositeId2 based on the CompositeId if a media file contains two episodes. Seems currently unused. + + public void GetCompositeIdsForEpisode(string strCompositeId, ref ArrayList alsCompositeIds) + { + string strCompositeId2 = mDatabase.GetCompositeId2(strCompositeId); + if (strCompositeId2 == string.Empty) + { + alsCompositeIds.Add(strCompositeId); + } + else + { + mDatabase.GetCompositeIds(strCompositeId2, ref alsCompositeIds); + } + } + + //Sets the StopTime of the episode if it wasn't watched to the end. + + public void SetEpisodeStopTime(string strCompositeId, int intStopTime) + { + mDatabase.SetEpisodeStopTime(strCompositeId, intStopTime); + } + + //Gets the WatchedStatus of the episode. + + public void GetEpisodeWatchedStatus(string strCompositeId, out bool bolWatched, out string strWatchedDate, out int intStopTime) + { + bolWatched = mDatabase.GetEpisodeWatchedStatus(strCompositeId); + strWatchedDate = mDatabase.GetEpisodeWatchedDate(strCompositeId); + intStopTime = mDatabase.GetEpisodeStopTime(strCompositeId); + } + + //Sets the WatchedStatus of the episode. + + public void SetEpisodeWatchedStatus(string strCompositeId, bool bolWatched, string strWatchedDate, int intStopTime, bool bolFirstWatched = false) + { + if (bolWatched == true && bolFirstWatched == true) + { + mDatabase.SetEpisodeFirstWatchedDate(strCompositeId, strWatchedDate); + mDatabase.SetEpisodeLastWatchedDate(strCompositeId, strWatchedDate); + } + else if (bolWatched == true) + { + mDatabase.SetEpisodeLastWatchedDate(strCompositeId, strWatchedDate); + } + mDatabase.SetEpisodeWatchedStatus(strCompositeId, bolWatched); + mDatabase.SetEpisodeWatchedDate(strCompositeId, strWatchedDate); + mDatabase.SetEpisodeStopTime(strCompositeId, intStopTime); + } + + //Gets WatchedStatus of the season. + + public void GetSeasonWatchedStatus(string strCompositeId, out string strSeasonId, out bool bolSeasonWatched) + { + strSeasonId = mDatabase.GetSeasonId(strCompositeId); + bolSeasonWatched = mDatabase.GetSeasonWatchedStatus(strSeasonId); + } + + //Gets the WatchedStatus of the series. + + public void GetSeriesWatchedStatus(string strCompositeId, out string strSeriesId, out bool bolSeasonWatched) + { + strSeriesId = mDatabase.GetSeriesId(strCompositeId); + bolSeasonWatched = mDatabase.GetSeriesWatchedStatus(strSeriesId); + } + + //Increases the number of the episode plays considering if it was not toggled watched in the MediaPortal menu. + + public void EpisodePlayCountIncrease(string strCompositeId, bool bolToggledEpisode = false) + { + int intEpisodePlayCount = mDatabase.GetEpisodePlayCount(strCompositeId); + if (bolToggledEpisode && intEpisodePlayCount > 0) + { + mDatabase.SetEpisodePlayCount(strCompositeId, intEpisodePlayCount); + } + else + { + mDatabase.SetEpisodePlayCount(strCompositeId, intEpisodePlayCount + 1); + } + } + + //Decreases the number of the unwatched episodes of a season. + + public void SeasonUnWatchedCountDecrease(string strSeasonId) + { + int intUnwatchedEpisodes = mDatabase.GetSeasonUnwatchedEpisodes(strSeasonId); + if (intUnwatchedEpisodes == 1) + { + mDatabase.SetSeasonUnwatchedEpisodes(strSeasonId, 0); + mDatabase.SetSeasonWatchedStatus(strSeasonId, true); + } + else + { + mDatabase.SetSeasonUnwatchedEpisodes(strSeasonId, intUnwatchedEpisodes - 1); + } + } + + //Decreases the number of the unwatched episodes of a series. + + public void SeriesUnWatchedCountDecrease(string strSeriesId) + { + int intUnwatchedEpisodes = mDatabase.GetSeriesUnwatchedEpisodes(strSeriesId); + if (intUnwatchedEpisodes == 1) + { + mDatabase.SetSeriesUnwatchedEpisodes(strSeriesId, 0); + mDatabase.SetSeriesWatchedStatus(strSeriesId, true); + } + else + { + mDatabase.SetSeriesUnwatchedEpisodes(strSeriesId, intUnwatchedEpisodes - 1); + } + } + + #endregion + + } +} Added: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalTVSeriesDatabaseSQLite.cs =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalTVSeriesDatabaseSQLite.cs (rev 0) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalTVSeriesDatabaseSQLite.cs 2015-02-08 12:35:39 UTC (rev 4945) @@ -0,0 +1,729 @@ +#region GPL License + +//Mediaportal (http://www.team-mediaportal.com/) Plugin - CentralizedDatabase +//Copyright (C) 2015 Max Wimmelbacher +// +//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 +//of the License, 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 this program; if not, write to the Free Software +//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using MediaPortal.GUI.Library; +using MediaPortal.Database; +using SQLite.NET; +using WindowPlugins.GUITVSeries; + +namespace CentralizedDatabase +{ + + /// <summary> + /// The class CentralizedDatabase.AdditionalTVSeriesDatabaseSQLite provides all necessary properties/methods which do the real communication with a tvseries database. + /// Objects created from this class are returned by calls to methods of the class AdditionalDatabaseFactory, + /// </summary> + + class AdditionalTVSeriesDatabaseSQLite : IDisposable + { + + #region Declaration + + private Dictionary<string, SQLiteResultCacheItem> mCache; + private SQLiteClient mDatabase; + private string mDatabaseFile; + + #endregion + + #region Constructors + + public AdditionalTVSeriesDatabaseSQLite(string strDatabaseFile) + { + mDatabaseFile = strDatabaseFile; + Open(); + } + + #endregion + + #region Properties + + public string DatabaseName + { + get + { + return mDatabaseFile; + } + } + + #endregion Properties + + #region Public methods + + public void Dispose() + { + mDatabase.Close(); + mDatabase = null; + } + + public string GetCompositeId(string strFilenameAndPath) + { + try + { + string strCompositeID = string.Empty; + strFilenameAndPath = strFilenameAndPath.Trim(); + DatabaseUtility.RemoveInvalidChars(ref strFilenameAndPath); + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBEpisode.cTableName, DBEpisode.cFilename, strFilenameAndPath); + Log.Debug("CentralizedDatabase: (GetCompositeId) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strCompositeID = DatabaseUtility.Get(objResults, 0, DBEpisode.cCompositeID); + AddToCache(DBEpisode.cTableName, strCompositeID, objResults); + } + return strCompositeID; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return string.Empty; + } + + public void GetCompositeIds(string strCompositeId2, ref ArrayList alsCompositeIds) + { + try + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBEpisode.cTableName, DBEpisode.cCompositeID2, strCompositeId2); + Log.Debug("CentralizedDatabase: (GetCompositeIds) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count == 0) + { + return; + } + for (int intLoop = 0; intLoop < objResults.Rows.Count; ++intLoop) + { + string strFile = DatabaseUtility.Get(objResults, intLoop, DBEpisode.cCompositeID); + alsCompositeIds.Add(strFile); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public string GetCompositeId2(string strCompositeId) + { + try + { + string strCompositeId2 = string.Empty; + if (CheckCache(DBEpisode.cTableName, strCompositeId, DBEpisode.cCompositeID2, ref strCompositeId2) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBEpisode.cTableName, DBEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetCompositeId2) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strCompositeId2 = DatabaseUtility.Get(objResults, 0, DBEpisode.cCompositeID2); + AddToCache(DBEpisode.cTableName, strCompositeId, objResults); + } + } + return strCompositeId2; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return string.Empty; + } + + public int GetEpisodeStopTime(string strCompositeId) + { + try + { + string strEpisodeStopTime = string.Empty; + if (CheckCache(DBEpisode.cTableName, strCompositeId, DBEpisode.cStopTime, ref strEpisodeStopTime) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBEpisode.cTableName, DBEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetEpisodeStopTime) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strEpisodeStopTime = DatabaseUtility.Get(objResults, 0, DBEpisode.cStopTime); + AddToCache(DBEpisode.cTableName, strCompositeId, objResults); + } + } + int intStopTime; + Int32.TryParse(strEpisodeStopTime, out intStopTime); + return intStopTime; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return 0; + } + + public void SetEpisodeStopTime(string strCompositeId, int intStopTime) + { + try + { + string strEpisodeStopTime = intStopTime.ToString(); + if (CheckCache(DBEpisode.cTableName, strCompositeId, DBEpisode.cStopTime, ref strEpisodeStopTime) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = {2} WHERE {3} = '{4}'", DBEpisode.cTableName, DBEpisode.cStopTime, intStopTime, DBEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (SetEpisodeStopTime) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public bool GetEpisodeWatchedStatus(string strCompositeId) + { + try + { + string strEpisodeWatchedStatus = string.Empty; + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cWatched, ref strEpisodeWatchedStatus) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetEpisodeWatchedStatus) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strEpisodeWatchedStatus = DatabaseUtility.Get(objResults, 0, DBOnlineEpisode.cWatched); + AddToCache(DBOnlineEpisode.cTableName, strCompositeId, objResults); + } + } + return (strEpisodeWatchedStatus == "1"); + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return true; + } + + public void SetEpisodeWatchedStatus(string strCompositeId, bool bolWatchedStatus) + { + try + { + int intWatchedStatus; + if (bolWatchedStatus == true) + { + intWatchedStatus = 1; + } + else + { + intWatchedStatus = 0; + } + string strEpisodeWatchedStatus = intWatchedStatus.ToString(); + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cWatched, ref strEpisodeWatchedStatus) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = {2} WHERE {3} = '{4}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cWatched, intWatchedStatus, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (SetEpisodeWatchedStatus) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public int GetEpisodePlayCount(string strCompositeId) + { + try + { + string strEpisodePlayCount = string.Empty; + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cPlayCount, ref strEpisodePlayCount) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetEpisodePlayCount) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strEpisodePlayCount = DatabaseUtility.Get(objResults, 0, DBOnlineEpisode.cPlayCount); + AddToCache(DBOnlineEpisode.cTableName, strCompositeId, objResults); + } + } + int intUnwatchedEpisodes; + Int32.TryParse(strEpisodePlayCount, out intUnwatchedEpisodes); + return intUnwatchedEpisodes; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return 0; + } + + public void SetEpisodePlayCount(string strCompositeId, int intPlayCount) + { + try + { + string strPlayCount = intPlayCount.ToString(); + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cPlayCount, ref strPlayCount) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = '{2}' WHERE {3} = '{4}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cPlayCount, strPlayCount, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (SetEpisodePlayCount) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public string GetEpisodeWatchedDate(string strCompositeId) + { + try + { + string strEpisodeWatchedDate = string.Empty; + if (CheckCache(DBEpisode.cTableName, strCompositeId, DBEpisode.cDateWatched, ref strEpisodeWatchedDate) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBEpisode.cTableName, DBEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetEpisodeWatchedDate) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strEpisodeWatchedDate = DatabaseUtility.Get(objResults, 0, DBEpisode.cDateWatched); + AddToCache(DBEpisode.cTableName, strCompositeId, objResults); + } + } + return strEpisodeWatchedDate; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return string.Empty; + } + + public void SetEpisodeWatchedDate(string strCompositeId, string strWatchedDate) + { + try + { + if (CheckCache(DBEpisode.cTableName, strCompositeId, DBEpisode.cDateWatched, ref strWatchedDate) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = '{2}' WHERE {3} = '{4}'", DBEpisode.cTableName, DBEpisode.cDateWatched, strWatchedDate, DBEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (SetEpisodeWatchedDate) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public string GetEpisodeFirstWatchedDate(string strCompositeId) + { + try + { + string strEpisodeFirstWatchedDate = string.Empty; + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cFirstWatchedDate, ref strEpisodeFirstWatchedDate) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetEpisodeWatchedDate) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strEpisodeFirstWatchedDate = DatabaseUtility.Get(objResults, 0, DBOnlineEpisode.cFirstWatchedDate); + AddToCache(DBOnlineEpisode.cTableName, strCompositeId, objResults); + } + } + return strEpisodeFirstWatchedDate; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return string.Empty; + } + + public void SetEpisodeFirstWatchedDate(string strCompositeId, string strFirstWatchedDate) + { + try + { + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cFirstWatchedDate, ref strFirstWatchedDate) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = '{2}' WHERE {3} = '{4}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cFirstWatchedDate, strFirstWatchedDate, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (SetEpisodeWatchedDate) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public string GetEpisodeLastWatchedDate(string strCompositeId) + { + try + { + string strEpisodeLastWatchedDate = string.Empty; + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cLastWatchedDate, ref strEpisodeLastWatchedDate) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetEpisodeWatchedDate) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strEpisodeLastWatchedDate = DatabaseUtility.Get(objResults, 0, DBOnlineEpisode.cLastWatchedDate); + AddToCache(DBOnlineEpisode.cTableName, strCompositeId, objResults); + } + } + return strEpisodeLastWatchedDate; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return string.Empty; + } + + public void SetEpisodeLastWatchedDate(string strCompositeId, string strLastWatchedDate) + { + try + { + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cLastWatchedDate, ref strLastWatchedDate) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = '{2}' WHERE {3} = '{4}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cLastWatchedDate, strLastWatchedDate, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (SetEpisodeWatchedDate) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public string GetSeasonId(string strCompositeId) + { + try + { + string strSeriesId = string.Empty; + string strSeasonId = string.Empty; + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cSeriesID, ref strSeriesId) == false || CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cSeasonIndex, ref strSeasonId)) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetSeasonId) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strSeriesId = (string)DatabaseUtility.Get(objResults, 0, DBOnlineEpisode.cSeriesID); + strSeasonId = (string)DatabaseUtility.Get(objResults, 0, DBOnlineEpisode.cSeasonIndex); + AddToCache(DBOnlineEpisode.cTableName, strCompositeId, objResults); + } + } + return (strSeriesId + "_s" + strSeasonId); + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return string.Empty; + } + + public bool GetSeasonWatchedStatus(string strSeasonId) + { + try + { + string strSeasonWatchedStatus = string.Empty; + if (CheckCache(DBSeason.cTableName, strSeasonId, DBSeason.cUnwatchedItems, ref strSeasonWatchedStatus) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBSeason.cTableName, DBSeason.cID, strSeasonId); + Log.Debug("CentralizedDatabase: (GetSeasonWatchedStatus) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strSeasonWatchedStatus = DatabaseUtility.Get(objResults, 0, DBSeason.cUnwatchedItems); + AddToCache(DBSeason.cTableName, strSeasonId, objResults); + } + } + return (strSeasonWatchedStatus == "0"); + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return true; + } + + public void SetSeasonWatchedStatus(string strSeasonId, bool bolWatchedStatus) + { + try + { + int intUnwatchedItems; + if (bolWatchedStatus == true) + { + intUnwatchedItems = 0; + } + else + { + intUnwatchedItems = 1; + } + string strSeasonWatchedStatus = intUnwatchedItems.ToString(); + if (CheckCache(DBSeason.cTableName, strSeasonId, DBSeason.cUnwatchedItems, ref strSeasonWatchedStatus) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = {2} WHERE {3} = '{4}'", DBSeason.cTableName, DBSeason.cUnwatchedItems, intUnwatchedItems, DBSeason.cID, strSeasonId); + Log.Debug("CentralizedDatabase: (SetSeasonWatchedStatus) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public int GetSeasonUnwatchedEpisodes(string strSeasonId) + { + try + { + string strSeasonUnwatchedEpisodes = string.Empty; + if (CheckCache(DBSeason.cTableName, strSeasonId, DBSeason.cEpisodesUnWatched, ref strSeasonUnwatchedEpisodes) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBSeason.cTableName, DBSeason.cID, strSeasonId); + Log.Debug("CentralizedDatabase: (GetSeasonUnwatchedEpisodes) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strSeasonUnwatchedEpisodes = DatabaseUtility.Get(objResults, 0, DBSeason.cEpisodesUnWatched); + AddToCache(DBSeason.cTableName, strSeasonId, objResults); + } + } + int intUnwatchedEpisodes; + Int32.TryParse(strSeasonUnwatchedEpisodes, out intUnwatchedEpisodes); + return intUnwatchedEpisodes; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return 0; + } + + public void SetSeasonUnwatchedEpisodes(string strSeasonId, int intUnwatchedEpisodes) + { + try + { + string strSeasonUnwatchedEpisodes = intUnwatchedEpisodes.ToString(); + if (CheckCache(DBSeason.cTableName, strSeasonId, DBSeason.cEpisodesUnWatched, ref strSeasonUnwatchedEpisodes) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = {2} WHERE {3} = '{4}'", DBSeason.cTableName, DBSeason.cEpisodesUnWatched, intUnwatchedEpisodes, DBSeason.cID, strSeasonId); + Log.Debug("CentralizedDatabase: (SetSeasonUnwatchedEpisodes) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public string GetSeriesId(string strCompositeId) + { + try + { + string strSeriesId = string.Empty; + if (CheckCache(DBOnlineEpisode.cTableName, strCompositeId, DBOnlineEpisode.cSeriesID, ref strSeriesId) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBOnlineEpisode.cTableName, DBOnlineEpisode.cCompositeID, strCompositeId); + Log.Debug("CentralizedDatabase: (GetSeriesId) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strSeriesId = DatabaseUtility.Get(objResults, 0, DBOnlineEpisode.cSeriesID); + AddToCache(DBOnlineEpisode.cTableName, strCompositeId, objResults); + } + } + return strSeriesId; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return string.Empty; + } + + public bool GetSeriesWatchedStatus(string strSeriesId) + { + try + { + string strSeriesWatchedStatus = string.Empty; + if (CheckCache(DBOnlineSeries.cTableName, strSeriesId, DBOnlineSeries.cUnwatchedItems, ref strSeriesWatchedStatus) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBOnlineSeries.cTableName, DBOnlineSeries.cID, strSeriesId); + Log.Debug("CentralizedDatabase: (GetSeriesWatchedStatus) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strSeriesWatchedStatus = DatabaseUtility.Get(objResults, 0, DBOnlineSeries.cUnwatchedItems); + AddToCache(DBOnlineSeries.cTableName, strSeriesId, objResults); + } + } + return (strSeriesWatchedStatus == "0"); + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return true; + } + + public void SetSeriesWatchedStatus(string strSeriesId, bool bolWatchedStatus) + { + try + { + int intUnwatchedItems; + if (bolWatchedStatus == true) + { + intUnwatchedItems = 0; + } + else + { + intUnwatchedItems = 1; + } + string strSeriesWatchedStatus = intUnwatchedItems.ToString(); + if (CheckCache(DBOnlineSeries.cTableName, strSeriesId, DBOnlineSeries.cUnwatchedItems, ref strSeriesWatchedStatus) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = {2} WHERE {3} = '{4}'", DBOnlineSeries.cTableName, DBOnlineSeries.cUnwatchedItems, intUnwatchedItems, DBOnlineSeries.cID, strSeriesId); + Log.Debug("CentralizedDatabase: (SetSeriesWatchedStatus) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public int GetSeriesUnwatchedEpisodes(string strSeriesId) + { + try + { + string strSeriesUnwatchedEpisodes = string.Empty; + if (CheckCache(DBOnlineSeries.cTableName, strSeriesId, DBOnlineSeries.cEpisodesUnWatched, ref strSeriesUnwatchedEpisodes) == false) + { + string strSQL = String.Format("SELECT * FROM {0} WHERE {1} = '{2}'", DBOnlineSeries.cTableName, DBOnlineSeries.cID, strSeriesId); + Log.Debug("CentralizedDatabase: (GetSeriesUnwatchedEpisodes) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + SQLiteResultSet objResults = mDatabase.Execute(strSQL); + if (objResults.Rows.Count > 0) + { + strSeriesUnwatchedEpisodes = DatabaseUtility.Get(objResults, 0, DBOnlineSeries.cEpisodesUnWatched); + AddToCache(DBOnlineSeries.cTableName, strSeriesId, objResults); + } + } + int intUnwatchedEpisodes; + Int32.TryParse(strSeriesUnwatchedEpisodes, out intUnwatchedEpisodes); + return intUnwatchedEpisodes; + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + return 0; + } + + public void SetSeriesUnwatchedEpisodes(string strSeriesId, int intUnwatchedEpisodes) + { + try + { + string strSeriesUnwatchedEpisodes = intUnwatchedEpisodes.ToString(); + if (CheckCache(DBOnlineSeries.cTableName, strSeriesId, DBOnlineSeries.cEpisodesUnWatched, ref strSeriesUnwatchedEpisodes) == false) + { + string strSQL = String.Format("UPDATE {0} SET {1} = {2} WHERE {3} = '{4}'", DBOnlineSeries.cTableName, DBOnlineSeries.cEpisodesUnWatched, intUnwatchedEpisodes, DBOnlineSeries.cID, strSeriesId); + Log.Debug("CentralizedDatabase: (SetSeriesUnwatchedEpisodes) SQL statement '" + strSQL + "' is going to be executed in database '" + mDatabase.DatabaseName + "'."); + mDatabase.Execute(strSQL); + } + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: TVSeries database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + #endregion + + #region Private methods + + private void Open() + { + mCache = new Dictionary<string, SQLiteResultCacheItem>(); + Log.Info("CentralizedDatabase: Opening tv series database " + mDatabaseFile); + try + { + if (mDatabase != null) + { + Log.Info("CentralizedDatabase: Tv series database already opened."); + return; + } + mDatabase = new SQLiteClient(mDatabaseFile); + DatabaseUtility.SetPragmas(mDatabase); + Log.Info("CentralizedDatabase: Tv series database opened."); + } + catch (Exception ex) + { + Log.Error("CentralizedDatabase: Tv series database exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + private bool CheckCache(string strTableName, string strKey, string strField, ref string strValue) + { + if (mCache.ContainsKey(strTableName) == true) + { + if (mCache[strTableName].Key == strKey && mCache[strTableName].IsDirty == false) + { + if (strValue == string.Empty) + { + strValue = (string)DatabaseUtility.Get(mCache[strTableName].ResultSet, 0, strField); + return true; + } + else if (strValue == (string)DatabaseUtility.Get(mCache[strTableName].ResultSet, 0, strField)) + { + return true; + } + else + { + mCache[strTableName].IsDirty = true; + } + } + } + return false; + } + + private void AddToCache(string strTableName, string strKey, SQLiteResultSet objResultSet) + { + if (mCache.ContainsKey(strTableName) == true) + { + mCache.Remove(strTableName); + } + SQLiteResultCacheItem objCacheItem = new SQLiteResultCacheItem(strKey, objResultSet); + mCache.Add(strTableName, objCacheItem); + } + + #endregion + + } +} \ No newline at end of file Added: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalVideoDatabase.cs =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalVideoDatabase.cs (rev 0) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/AdditionalVideoDatabase.cs 2015-02-08 12:35:39 UTC (rev 4945) @@ -0,0 +1,198 @@ +#region GPL License + +//Mediaportal (http://www.team-mediaportal.com/) Plugin - CentralizedDatabase +//Copyright (C) 2015 Max Wimmelbacher +// +//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 +//of the License, 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 this program; if not, write to the Free Software +//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using MediaPortal.GUI.Library; +usin... [truncated message content] |
From: <pop...@us...> - 2015-02-08 18:46:26
|
Revision: 4950 http://sourceforge.net/p/mp-plugins/code/4950 Author: popy2007 Date: 2015-02-08 18:46:23 +0000 (Sun, 08 Feb 2015) Log Message: ----------- added how it works files (word & graphics) Added Paths: ----------- trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/ trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.docx trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.png trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.docx trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.png Added: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.docx =================================================================== (Binary files differ) Index: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.docx =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.docx 2015-02-08 13:01:02 UTC (rev 4949) +++ trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.docx 2015-02-08 18:46:23 UTC (rev 4950) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.docx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.png =================================================================== (Binary files differ) Index: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.png =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.png 2015-02-08 13:01:02 UTC (rev 4949) +++ trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.png 2015-02-08 18:46:23 UTC (rev 4950) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/de_how_it_works.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.docx =================================================================== (Binary files differ) Index: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.docx =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.docx 2015-02-08 13:01:02 UTC (rev 4949) +++ trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.docx 2015-02-08 18:46:23 UTC (rev 4950) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.docx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.png =================================================================== (Binary files differ) Index: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.png =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.png 2015-02-08 13:01:02 UTC (rev 4949) +++ trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.png 2015-02-08 18:46:23 UTC (rev 4950) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/HowItWowks-Files/en_how_it_works.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pop...@us...> - 2015-02-14 13:35:13
|
Revision: 4953 http://sourceforge.net/p/mp-plugins/code/4953 Author: popy2007 Date: 2015-02-14 13:35:04 +0000 (Sat, 14 Feb 2015) Log Message: ----------- 0.6.0.4: Fixed -> Synronization of events was not done if an media ended Modified Paths: -------------- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabase.cs trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/AssemblyInfo.cs trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/update.xml Added Paths: ----------- trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.mpe1 trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.xmp2 Modified: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabase.cs =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabase.cs 2015-02-12 21:48:17 UTC (rev 4952) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/CentralizedDatabase.cs 2015-02-14 13:35:04 UTC (rev 4953) @@ -613,7 +613,7 @@ Log.Debug("CentralizedDatabase: 'g_Player.PlayBackEnded' event with SyncObjectType '" + CurrentSyncObjectType.ToString() + "' occured for file '" + strFileName + "'."); //Add nedded Watched Event data - curEvent.EventType = EventType.StopOrChanged; + curEvent.EventType = EventType.Ended; curEvent.SyncObject.SyncObjectType = CurrentSyncObjectType; curEvent.strFileName = strFileName; curEvent.intResumeTime = 0; Modified: trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/AssemblyInfo.cs 2015-02-12 21:48:17 UTC (rev 4952) +++ trunk/plugins/CentralizedDatabase/Trunk/CentralizedDatabase/Properties/AssemblyInfo.cs 2015-02-14 13:35:04 UTC (rev 4953) @@ -45,5 +45,5 @@ [assembly: Guid("b298ce34-f556-44cc-a131-83ec57fd6a50")] -[assembly: AssemblyVersion("0.6.0.3")] -[assembly: AssemblyFileVersion("0.6.0.3")] +[assembly: AssemblyVersion("0.6.0.4")] +[assembly: AssemblyFileVersion("0.6.0.4")] Added: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.mpe1 =================================================================== (Binary files differ) Index: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.mpe1 =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.mpe1 2015-02-12 21:48:17 UTC (rev 4952) +++ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.mpe1 2015-02-14 13:35:04 UTC (rev 4953) Property changes on: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.mpe1 ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.xmp2 =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.xmp2 (rev 0) +++ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.xmp2 2015-02-14 13:35:04 UTC (rev 4953) @@ -0,0 +1,324 @@ +<?xml version="1.0" encoding="utf-8"?> +<PackageClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <ParentGroup /> + <DisplayName>CentralizedDatabase</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>CentralizedDatabase</Description> + <Files> + <Items> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\CentralizedDatabase\bin\Release\CentralizedDatabase.dll</LocalFileName> + <ZipFileName>Installer{CopyFile}\{da0f64fa-9f30-4943-bb24-3bd49d5e4314}-CentralizedDatabase.dll</ZipFileName> + <DestinationFilename>%Plugins%\Windows\CentralizedDatabase.dll</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\CentralizedDatabase\Resources\language\de.xml</LocalFileName> + <ZipFileName>Installer{CopyFile}\{fead985d-e0aa-4793-a5f4-c523305918b0}-de.xml</ZipFileName> + <DestinationFilename>%Language%\CentralizedDatabase\de.xml</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\CentralizedDatabase\Resources\language\en-US.xml</LocalFileName> + <ZipFileName>Installer{CopyFile}\{a8eeb57c-826d-43ae-8be2-c0679c697b77}-en-US.xml</ZipFileName> + <DestinationFilename>%Language%\CentralizedDatabase\en-US.xml</DestinationFilename> + </FileItem> + </Items> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items> + <SectionItem Guid="2fc8148e-7fed-4aac-86ee-8c019f3ca34e" Name="Welcome Screen" ConditionGroup=""> + <Params> + <Items> + <SectionParam Name="Header text"> + <Value>Welcome to the Extension Installer for [Name]</Value> + <ValueType>String</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Description"> + <Value>This will install [Name] version [Version] on your computer. +It is recommended that you close all other applications before continuing. +Click Next to continue or Cancel to exit Setup.</Value> + <ValueType>String</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Left part image"> + <Value>Resources\MPEI_left_picture.PNG</Value> + <ValueType>File</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Header image"> + <Value /> + <ValueType>File</ValueType> + <Description>Image in upper right part</Description> + </SectionParam> + </Items> + </Params> + <Actions> + <Items /> + </Actions> + <IncludedGroups /> + <PanelName>Welcome Screen</PanelName> + <WizardButtonsEnum>NextCancel</WizardButtonsEnum> + </SectionItem> + <SectionItem Guid="ef355144-4232-4a91-8f1d-cb0740d9f871" Name="Install Section" ConditionGroup=""> + <Params> + <Items> + <SectionParam Name="Header Title"> + <Value /> + <ValueType>String</ValueType> + <Description>Header title</Description> + </SectionParam> + <SectionParam Name="Header description"> + <Value /> + <ValueType>String</ValueType> + <Description>Description of section, shown in under section title</Description> + </SectionParam> + <SectionParam Name="Header image"> + <Value>..\CentralizedDatabase\Resources\CentralizedDatabaseEnabled.png</Value> + <ValueType>File</ValueType> + <Description>Image in upper right part</Description> + </SectionParam> + </Items> + </Params> + <Actions> + <Items> + <ActionItem Name="InstallFiles" ActionType="InstallFiles" ConditionGroup=""> + <Params> + <Items /> + </Params> + <ExecuteLocation>AfterPanelShow</ExecuteLocation> + </ActionItem> + </Items> + </Actions> + <IncludedGroups /> + <PanelName>Install Section</PanelName> + <WizardButtonsEnum>Next</WizardButtonsEnum> + </SectionItem> + <SectionItem Guid="94cdc129-3719-417c-be39-fa972599ddd3" Name="Setup Complete" ConditionGroup=""> + <Params> + <Items> + <SectionParam Name="Header text"> + <Value>The Extension Installer Wizard has successfully installed [Name].</Value> + <ValueType>String</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Left part image"> + <Value>Resources\MPEI_left_picture.PNG</Value> + <ValueType>File</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Show radio buttons"> + <Value /> + <ValueType>Bool</ValueType> + <Description>Use radiobutton in place of combobox</Description> + </SectionParam> + <SectionParam Name="Header image"> + <Value /> + <ValueType>File</ValueType> + <Description>Image in upper right part</Description> + </SectionParam> + </Items> + </Params> + <Actions> + <Items /> + </Actions> + <IncludedGroups /> + <PanelName>Setup Complete</PanelName> + <WizardButtonsEnum>Finish</WizardButtonsEnum> + </SectionItem> + </Items> + </Sections> + <Dependencies> + <Items> + <DependencyItem> + <Type>MediaPortal</Type> + <Id /> + <MinVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MinVersion> + <MaxVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MaxVersion> + <WarnOnly>false</WarnOnly> + <Message>requires MediaPortal version 1.1.6.27644 to 1.1.6.27644.</Message> + <Name>MediaPortal</Name> + </DependencyItem> + </Items> + </Dependencies> + <PluginDependencies> + <Items> + <PluginDependencyItem AssemblyName="CentralizedDatabase.dll"> + <CompatibleVersion> + <Items> + <CompatibleVersionItem> + <MinRequiredVersion>1.6.0.0</MinRequiredVersion> + <DesignedForVersion>1.7.0.0</DesignedForVersion> + </CompatibleVersionItem> + </Items> + </CompatibleVersion> + <SubSystemsUsed> + <Items> + <SubSystemItem Name="MP" /> + <SubSystemItem Name="MP.Config" /> + <SubSystemItem Name="MP.DB.Videos" /> + <SubSystemItem Name="MP.Externals.SQLite" /> + <SubSystemItem Name="MP.Players" /> + <SubSystemItem Name="MP.Plugins" /> + </Items> + </SubSystemsUsed> + </PluginDependencyItem> + </Items> + </PluginDependencies> + <GeneralInfo> + <Name>CentralizedDatabase</Name> + <Id>a592a9b1-6ab8-4f87-86d0-3a78d609bc44</Id> + <Author>antihero05, pOpY</Author> + <HomePage>http://www.team-mediaportal.com/extensions/utilities/centralizeddatabase</HomePage> + <ForumPage>http://forum.team-mediaportal.com/threads/centralizeddatabase.129630/</ForumPage> + <UpdateUrl>http://svn.code.sf.net/p/mp-plugins/code/trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/update.xml</UpdateUrl> + <Version> + <Major>0</Major> + <Minor>6</Minor> + <Build>0</Build> + <Revision>4</Revision> + </Version> + <ExtensionDescription>CentralizedDatabase is a window plugin that synchronizes several informations across your MediaPortal databases/folders. As the plugin name suggest the plugin focuses on synchronizing the watched status of your media and folders (thumbs) accross several clients.This includes extended information like the time you stopped the playback. This is responsible for the watched percentage displayed in MediaPortal. + +This plugin is intended for setups that have a centrally stored master database and multiple clients with their own databases. It is recommended to configure the master database as an database to be synchronized from each client. If you watch some media on one of the clients the watched status gets synchronized to the master database and is available for all other clients as well. Also there is a feature "Copy at startup" which copies the database/folders on MP client start from the centralized storage to your client. So anytime you start you client all databases are immediately in sync. + +As a result it does not matter on which client you watch some media since the status is always synchronized across other databases. You keep consistent track of what you already watched and have centralized place (server) where you can add movies & series. + +Currently supported Objects for synchronizing: + +MPVideo database +MPTVSeries database +MovingPictures database +Folders +Folders with deletions</ExtensionDescription> + <VersionDescription>0.6.0.4: Fixed -> Synronization of events was not done if an media ended +0.6.0.3: New icon and initial release +0.6.0.2: hotfix for dns reverse lookup. CopyAtStartup feature should work now. Sorry it was my mistake! +0.6.0.1: +* translation support: German and English for now +* improved host online check for copy database/folders at startup. Before ~2sec timeout, now ~1sec (just when host is offline) +* support for folder mirroring: + In the config section of the plugin you can now set "SyncFolder" and "SyncFolder (with deletions)". + Ir does the following: + + - copy files/folder from src to dst, when it dont exist in dst + - copy files from src to dst, when the size differs + - delete files/folder from dst when it dont exist in src (just when"SyncFolder (with deletions)" is selected)</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>http://svn.code.sf.net/p/mp-plugins/code/trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.mpe1</OnlineLocation> + <ReleaseDate>2015-02-14T14:04:23</ReleaseDate> + <Tags>multiple,several,database,databases,synchronize,watched,status</Tags> + <Location>D:\Mediaportal\CentralizedDatabase\Extension_MPEI\CentralizedDatabase_0.6.0.4.mpe1</Location> + <Params> + <Items> + <SectionParam Name="Icon"> + <Value>..\CentralizedDatabase\Resources\CentralizedDatabaseEnabled.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 it has .exe extension the will be executed. + If it has .dll extension it's started 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> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\CentralizedDatabase\bin\Release\CentralizedDatabase.dll</LocalFileName> + <ZipFileName>Installer{CopyFile}\{da0f64fa-9f30-4943-bb24-3bd49d5e4314}-CentralizedDatabase.dll</ZipFileName> + <DestinationFilename>%Plugins%\Windows\CentralizedDatabase.dll</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\CentralizedDatabase\Resources\language\de.xml</LocalFileName> + <ZipFileName>Installer{CopyFile}\{fead985d-e0aa-4793-a5f4-c523305918b0}-de.xml</ZipFileName> + <DestinationFilename>%Language%\CentralizedDatabase\de.xml</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\CentralizedDatabase\Resources\language\en-US.xml</LocalFileName> + <ZipFileName>Installer{CopyFile}\{a8eeb57c-826d-43ae-8be2-c0679c697b77}-en-US.xml</ZipFileName> + <DestinationFilename>%Language%\CentralizedDatabase\en-US.xml</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="true" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>Resources\MPEI_left_picture.PNG</LocalFileName> + <ZipFileName>Installer{CopyFile}\{2a86d2ea-5d65-4708-bc2a-3899b72c3f23}-MPEI_left_picture.PNG</ZipFileName> + <DestinationFilename /> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="true" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\CentralizedDatabase\Resources\CentralizedDatabaseEnabled.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{61110cae-26c8-4216-a2d9-6151d03809d1}-CentralizedDatabaseEnabled.png</ZipFileName> + <DestinationFilename /> + </FileItem> + </Items> + </UniqueFileList> + <ProjectSettings> + <FolderGroups> + <FolderGroup InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName /> + <ZipFileName>Installer{CopyFile}\{8b1930c0-904f-4c0e-9499-6a3cd50d4a5e}-</ZipFileName> + <DestinationFilename>%Language%\CentralizedDatabase</DestinationFilename> + <Folder>CentralizedDatabase\Resources\language</Folder> + <Group>Default</Group> + <Recursive>true</Recursive> + </FolderGroup> + </FolderGroups> + <ProjectFilename>CentralizedDatabase_0.6.0.4.xmp2</ProjectFilename> + <UpdatePath1>update.xml</UpdatePath1> + <UpdatePath2 /> + <UpdatePath3 /> + </ProjectSettings> + <IsSkin>false</IsSkin> +</PackageClass> \ No newline at end of file Modified: trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/update.xml =================================================================== --- trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/update.xml 2015-02-12 21:48:17 UTC (rev 4952) +++ trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/update.xml 2015-02-14 13:35:04 UTC (rev 4953) @@ -143,5 +143,148 @@ </ProjectSettings> <IsSkin>false</IsSkin> </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> + <DependencyItem> + <Type>MediaPortal</Type> + <Id /> + <MinVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MinVersion> + <MaxVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MaxVersion> + <WarnOnly>false</WarnOnly> + <Message>requires MediaPortal version 1.1.6.27644 to 1.1.6.27644.</Message> + <Name>MediaPortal</Name> + </DependencyItem> + </Items> + </Dependencies> + <PluginDependencies> + <Items> + <PluginDependencyItem AssemblyName="CentralizedDatabase.dll"> + <CompatibleVersion> + <Items> + <CompatibleVersionItem> + <MinRequiredVersion>1.6.0.0</MinRequiredVersion> + <DesignedForVersion>1.7.0.0</DesignedForVersion> + </CompatibleVersionItem> + </Items> + </CompatibleVersion> + <SubSystemsUsed> + <Items> + <SubSystemItem Name="MP" /> + <SubSystemItem Name="MP.Config" /> + <SubSystemItem Name="MP.DB.Videos" /> + <SubSystemItem Name="MP.Externals.SQLite" /> + <SubSystemItem Name="MP.Players" /> + <SubSystemItem Name="MP.Plugins" /> + </Items> + </SubSystemsUsed> + </PluginDependencyItem> + </Items> + </PluginDependencies> + <GeneralInfo> + <Name>CentralizedDatabase</Name> + <Id>a592a9b1-6ab8-4f87-86d0-3a78d609bc44</Id> + <Author>antihero05, pOpY</Author> + <HomePage>http://www.team-mediaportal.com/extensions/utilities/centralizeddatabase</HomePage> + <ForumPage>http://forum.team-mediaportal.com/threads/centralizeddatabase.129630/</ForumPage> + <UpdateUrl>http://svn.code.sf.net/p/mp-plugins/code/trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/update.xml</UpdateUrl> + <Version> + <Major>0</Major> + <Minor>6</Minor> + <Build>0</Build> + <Revision>4</Revision> + </Version> + <ExtensionDescription>CentralizedDatabase is a window plugin that synchronizes several informations across your MediaPortal databases/folders. As the plugin name suggest the plugin focuses on synchronizing the watched status of your media and folders (thumbs) accross several clients.This includes extended information like the time you stopped the playback. This is responsible for the watched percentage displayed in MediaPortal. + +This plugin is intended for setups that have a centrally stored master database and multiple clients with their own databases. It is recommended to configure the master database as an database to be synchronized from each client. If you watch some media on one of the clients the watched status gets synchronized to the master database and is available for all other clients as well. Also there is a feature "Copy at startup" which copies the database/folders on MP client start from the centralized storage to your client. So anytime you start you client all databases are immediately in sync. + +As a result it does not matter on which client you watch some media since the status is always synchronized across other databases. You keep consistent track of what you already watched and have centralized place (server) where you can add movies & series. + +Currently supported Objects for synchronizing: + +MPVideo database +MPTVSeries database +MovingPictures database +Folders +Folders with deletions</ExtensionDescription> + <VersionDescription>0.6.0.4: Fixed -> Synronization of events was not done if an media ended +0.6.0.3: New icon and initial release +0.6.0.2: hotfix for dns reverse lookup. CopyAtStartup feature should work now. Sorry it was my mistake! +0.6.0.1: +* translation support: German and English for now +* improved host online check for copy database/folders at startup. Before ~2sec timeout, now ~1sec (just when host is offline) +* support for folder mirroring: + In the config section of the plugin you can now set "SyncFolder" and "SyncFolder (with deletions)". + Ir does the following: + + - copy files/folder from src to dst, when it dont exist in dst + - copy files from src to dst, when the size differs + - delete files/folder from dst when it dont exist in src (just when"SyncFolder (with deletions)" is selected)</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>http://svn.code.sf.net/p/mp-plugins/code/trunk/plugins/CentralizedDatabase/Trunk/Extension_MPEI/CentralizedDatabase_0.6.0.4.mpe1</OnlineLocation> + <ReleaseDate>2015-02-14T14:04:23</ReleaseDate> + <Tags>multiple,several,database,databases,synchronize,watched,status</Tags> + <Location>D:\Mediaportal\CentralizedDatabase\Extension_MPEI\CentralizedDatabase_0.6.0.4.mpe1</Location> + <Params> + <Items> + <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 it has .exe extension the will be executed. + If it has .dll extension it's started 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> + <IsSkin>false</IsSkin> + </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. |