[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / video / VideoUtils.h
blobc344072ffe4f9c104b121a26f56de706513ca1bb
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 #pragma once
11 #include <string>
13 class CFileItem;
15 namespace KODI::VIDEO::UTILS
17 /*!
18 \brief Check whether an item is an optical media folder or its parent.
19 This will return the non-empty path to the playable entry point of the media
20 one or two levels down (VIDEO_TS.IFO for DVDs or index.bdmv for BDs).
21 The returned path will be empty if folder does not meet this criterion.
22 \return non-empty string if item is optical media folder, empty otherwise.
24 std::string GetOpticalMediaPath(const CFileItem& item);
26 /*! \brief Check whether auto play next item is set for the media type of the given item.
27 \param item [in] the item to check
28 \return True if auto play next item is active, false otherwise.
30 bool IsAutoPlayNextItem(const CFileItem& item);
32 /*! \brief Check whether auto play next item is set for the given content type.
33 \param item [in] the content to check
34 \return True if auto play next item is active, false otherwise.
36 bool IsAutoPlayNextItem(const std::string& content);
38 struct ResumeInformation
40 bool isResumable{false}; // the playback of the item can be resumed
41 int64_t startOffset{0}; // a start offset
42 int partNumber{0}; // a part number
45 /*!
46 \brief Check whether playback of the given item can be resumed, get detailed information.
47 \param item The item to retrieve information for
48 \return The resume information.
50 ResumeInformation GetItemResumeInformation(const CFileItem& item);
52 /*!
53 \brief Get resume information for a part of a stack item.
54 \param item The stack item to retrieve information for
55 \param partNumber The number of the part
56 \return The resume information.
58 ResumeInformation GetStackPartResumeInformation(const CFileItem& item, unsigned int partNumber);
60 } // namespace KODI::VIDEO::UTILS