fixed: videos stored in archives were added with a wrong dateAdded value (1970-01...
authorvdrfan <vdrfan-nospam-@xbmc.org>
Sun, 17 Jun 2012 08:37:31 +0000 (10:37 +0200)
committervdrfan <vdrfan-nospam-@xbmc.org>
Sun, 17 Jun 2012 08:54:12 +0000 (10:54 +0200)
This commit fixes the wrong dateAdded value for archived videos. In order to get a valid dateAdded
time we have to grab the actual archive path instead of the vfs wrapped path inside the archive.

xbmc/video/VideoDatabase.cpp

index 26818ec..af6a538 100644 (file)
@@ -696,6 +696,9 @@ void CVideoDatabase::UpdateFileDateAdded(int idFile, const CStdString& strFileNa
     if (URIUtils::IsStack(strFileNameAndPath))
       file = CStackDirectory::GetFirstStackedFile(strFileNameAndPath);
 
+    if (URIUtils::IsInArchive(file))
+      file = CURL(file).GetHostName();
+
     CDateTime dateAdded;
     // Skip looking at the files ctime/mtime if defined by the user through as.xml
     if (g_advancedSettings.m_iVideoLibraryDateAdded > 0)