aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvdrfan <vdrfan@svn>2010-06-08 14:56:36 +0000
committervdrfan <vdrfan@svn>2010-06-08 14:56:36 +0000
commite8b6f14bac1ceb83eeead82e85445be431ff90b2 (patch)
tree613ab877ae68db3fcbe5cbcf481e1ae8210a4d91
parent412b8a5243c32373b46a7bfcef1ba3408b4928c1 (diff)
added: advancedsettings option <importwatchedstate> to import previously exported playdate and playcount from .nfo files (defaults to false)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30969 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--xbmc/AdvancedSettings.cpp2
-rw-r--r--xbmc/AdvancedSettings.h1
-rw-r--r--xbmc/VideoInfoScanner.cpp4
3 files changed, 7 insertions, 0 deletions
diff --git a/xbmc/AdvancedSettings.cpp b/xbmc/AdvancedSettings.cpp
index 42080ffd40..27b3b5677c 100644
--- a/xbmc/AdvancedSettings.cpp
+++ b/xbmc/AdvancedSettings.cpp
@@ -202,6 +202,7 @@ void CAdvancedSettings::Initialize()
m_bVideoLibraryCleanOnUpdate = false;
m_bVideoLibraryExportAutoThumbs = false;
m_bVideoLibraryMyMoviesCategoriesToGenres = false;
+ m_bVideoLibraryImportWatchedState = false;
m_bUseEvilB = true;
@@ -433,6 +434,7 @@ bool CAdvancedSettings::Load()
XMLUtils::GetBoolean(pElement, "cleanonupdate", m_bVideoLibraryCleanOnUpdate);
XMLUtils::GetString(pElement, "itemseparator", m_videoItemSeparator);
XMLUtils::GetBoolean(pElement, "exportautothumbs", m_bVideoLibraryExportAutoThumbs);
+ XMLUtils::GetBoolean(pElement, "importwatchedstate", m_bVideoLibraryImportWatchedState);
TiXmlElement* pMyMovies = pElement->FirstChildElement("mymovies");
if (pMyMovies)
diff --git a/xbmc/AdvancedSettings.h b/xbmc/AdvancedSettings.h
index cd0882e8b4..b1b4a154f2 100644
--- a/xbmc/AdvancedSettings.h
+++ b/xbmc/AdvancedSettings.h
@@ -195,6 +195,7 @@ class CAdvancedSettings
bool m_bVideoLibraryCleanOnUpdate;
bool m_bVideoLibraryExportAutoThumbs;
bool m_bVideoLibraryMyMoviesCategoriesToGenres;
+ bool m_bVideoLibraryImportWatchedState;
bool m_bUseEvilB;
std::vector<CStdString> m_vecTokens; // cleaning strings tied to language
diff --git a/xbmc/VideoInfoScanner.cpp b/xbmc/VideoInfoScanner.cpp
index 5a6bef63fc..888348885a 100644
--- a/xbmc/VideoInfoScanner.cpp
+++ b/xbmc/VideoInfoScanner.cpp
@@ -1048,6 +1048,10 @@ namespace VIDEO
{
lResult = m_database.SetDetailsForMusicVideo(pItem->m_strPath, movieDetails);
}
+
+ if (g_advancedSettings.m_bVideoLibraryImportWatchedState)
+ m_database.SetPlayCount(*pItem, movieDetails.m_playCount, movieDetails.m_lastPlayed);
+
m_database.Close();
return lResult;
}