Hello
I like to enhance the video list that it shows the unwatched items only. E.g. I select in the main menu the item ‘videos’ and select ‘files’ and go into a folder. Now i get all video files. Some are marked watched or partially watched.
I looked into the code and found the bool CGUIMediaWindow::GetDirectory(const std::string &strDirectory, CFileItemList &items) in GUIMediaWindow.cpp.
It seems the right entry point. In this function the items are filtered from the advanced config by a regex.
if (iWindow == WINDOW_VIDEO_NAV)
regexps = g_advancedSettings.m_videoExcludeFromListingRegExps;
if (iWindow == WINDOW_MUSIC_NAV)
regexps = g_advancedSettings.m_audioExcludeFromListingRegExps;
if (iWindow == WINDOW_PICTURES)
regexps = g_advancedSettings.m_pictureExcludeFromListingRegExps;
if (regexps.size())
{
for (int i=0; i < items.Size();)
{
if (CUtil::ExcludeFileOrFolder(items[i]->GetPath(), regexps))
items.Remove(i);
else
i++;
}
}
I thought i could use this to remove the items i want. So i looked into the object items but i found no property watched or something else that points to a played time.
Can someone please point me to the function or explain short how i could remove watched items.
It would be nice so i can get a deeper understanding of the code.