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
, CDirectoryNode
* pParent
)
18 : CDirectoryNode(NODE_TYPE_RECENTLY_ADDED_MOVIES
, strName
, pParent
)
23 bool CDirectoryNodeRecentlyAddedMovies::GetContent(CFileItemList
& items
) const
25 CVideoDatabase videodatabase
;
26 if (!videodatabase
.Open())
29 int details
= items
.HasProperty("set_videodb_details")
30 ? items
.GetProperty("set_videodb_details").asInteger32()
32 bool bSuccess
= videodatabase
.GetRecentlyAddedMoviesNav(BuildPath(), items
, 0, details
);
34 videodatabase
.Close();