[PVR][Estuary] Timer settings dialog: Show client name in timer type selection dialog...
[xbmc.git] / xbmc / utils / PlayerUtils.cpp
blob3fd6847b8cc324b32779a543d908940d2de3adb8
1 /*
2 * Copyright (C) 2022 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.
7 */
9 #include "PlayerUtils.h"
11 #include "FileItem.h"
12 #include "music/MusicUtils.h"
13 #include "utils/Variant.h"
14 #include "video/VideoUtils.h"
16 bool CPlayerUtils::IsItemPlayable(const CFileItem& itemIn)
18 const CFileItem item(itemIn.GetItemToPlay());
20 // General
21 if (item.IsParentFolder())
22 return false;
24 // Plugins
25 if (item.IsPlugin() && item.GetProperty("isplayable").asBoolean())
26 return true;
28 // Music
29 if (MUSIC_UTILS::IsItemPlayable(item))
30 return true;
32 // Movies / TV Shows / Music Videos
33 if (VIDEO_UTILS::IsItemPlayable(item))
34 return true;
36 //! @todo add more types on demand.
38 return false;