diff options
-rw-r--r-- | xbmc/AdvancedSettings.cpp | 2 | ||||
-rw-r--r-- | xbmc/AdvancedSettings.h | 1 | ||||
-rw-r--r-- | xbmc/VideoInfoScanner.cpp | 4 |
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; } |