From: Chris koying Browet Date: Thu, 12 Sep 2013 10:12:21 +0000 (+0200) Subject: FIX: Do not remove internet files from video db only because they come from a disappe... X-Git-Tag: Gotham_alpha8~18^2 X-Git-Url: http://code.vuplus.com/gitweb/?a=commitdiff_plain;h=a256e535490031e87d329dbcea32e4d5b007a5ea;p=vuplus_xbmc FIX: Do not remove internet files from video db only because they come from a disappeared source --- diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index d770d79..22d4084 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -7969,9 +7969,6 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se int total = m_pDS->num_rows(); int current = 0; - bool bIsSource; - VECSOURCES *pShares = CMediaSourceSettings::Get().GetSources("video"); - while (!m_pDS->eof()) { CStdString path = m_pDS->fv("path.strPath").get_asString(); @@ -7983,19 +7980,9 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se if (URIUtils::IsStack(fullPath)) fullPath = CStackDirectory::GetFirstStackedFile(fullPath); - // check if we have a internet related file that is part of a media source - if (URIUtils::IsInternetStream(fullPath, true) && CUtil::GetMatchingSource(fullPath, *pShares, bIsSource) > -1) - { - if (!CFile::Exists(fullPath, false)) - filesToDelete += m_pDS->fv("files.idFile").get_asString() + ","; - } - else - { - // remove optical, internet related and non-existing files - // note: this will also remove entries from previously existing media sources - if (URIUtils::IsOnDVD(fullPath) || URIUtils::IsInternetStream(fullPath, true) || !CFile::Exists(fullPath, false)) - filesToDelete += m_pDS->fv("files.idFile").get_asString() + ","; - } + // remove optical, non-existing files + if (URIUtils::IsOnDVD(fullPath) || !CFile::Exists(fullPath, false)) + filesToDelete += m_pDS->fv("files.idFile").get_asString() + ","; if (!handle) {