2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
9 #include "DirectoryNodeRecentlyAddedMovies.h"
12 #include "FileItemList.h"
13 #include "video/VideoDatabase.h"
15 using namespace XFILE::VIDEODATABASEDIRECTORY
;
17 CDirectoryNodeRecentlyAddedMovies::CDirectoryNodeRecentlyAddedMovies(const std::string
& strName
,
18 CDirectoryNode
* pParent
)
19 : CDirectoryNode(NodeType::RECENTLY_ADDED_MOVIES
, strName
, pParent
)
24 bool CDirectoryNodeRecentlyAddedMovies::GetContent(CFileItemList
& items
) const
26 CVideoDatabase videodatabase
;
27 if (!videodatabase
.Open())
30 int details
= items
.HasProperty("set_videodb_details")
31 ? items
.GetProperty("set_videodb_details").asInteger32()
33 bool bSuccess
= videodatabase
.GetRecentlyAddedMoviesNav(BuildPath(), items
, 0, details
);
35 videodatabase
.Close();