Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 2abe3ec6f2c9a333e712a8753ef3a50b2c9d663b Mon Sep 17 00:00:00 2001
- From: montellese <montellese@xbmc.org>
- Date: Sat, 16 Jun 2012 21:58:17 +0200
- Subject: [PATCH] dateadded: more debug logging
- ---
- xbmc/video/VideoDatabase.cpp | 13 +++++++++++++
- 1 files changed, 13 insertions(+), 0 deletions(-)
- diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
- index 6ada8ad..19e7737 100644
- --- a/xbmc/video/VideoDatabase.cpp
- +++ b/xbmc/video/VideoDatabase.cpp
- @@ -705,6 +705,13 @@ void CVideoDatabase::UpdateFileDateAdded(int idFile, const CStdString& strFileNa
- if (CFile::Stat(file, &buffer) == 0)
- {
- time_t now = time(NULL);
- +
- + CLog::Log(LOGDEBUG, "CFile::Stat(%s):", strFileNameAndPath.c_str());
- + CLog::Log(LOGDEBUG, " atime: %d", (int)buffer.st_atime);
- + CLog::Log(LOGDEBUG, " mtime: %d", (int)buffer.st_mtime);
- + CLog::Log(LOGDEBUG, " ctime: %d", (int)buffer.st_ctime);
- + CLog::Log(LOGDEBUG, " now: %d", (int)now);
- +
- time_t addedTime;
- // Prefer the modification time if it's valid
- if (g_advancedSettings.m_iVideoLibraryDateAdded == 1)
- @@ -723,6 +730,12 @@ void CVideoDatabase::UpdateFileDateAdded(int idFile, const CStdString& strFileNa
- CLog::Log(LOGWARNING, "invalid mtime %d for file %s; falling back to ctime", (int)buffer.st_mtime, strFileNameAndPath.c_str());
- addedTime = (time_t)buffer.st_ctime;
- + struct tm *cTime = localtime(&addedTime);
- + if (cTime)
- + {
- + CDateTime ctime = *cTime;
- + CLog::Log(LOGWARNING, "falling back to ctime %s (%d) for file %s", ctime.GetAsDBDateTime().c_str(), (int)addedTime, strFileNameAndPath.c_str());
- + }
- }
- }
- // Use the newer of the creation and modification time
- --
- 1.7.7.msysgit.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement