Merge pull request #26273 from 78andyp/blurayfixes2
[xbmc.git] / xbmc / video / dialogs / GUIDialogVideoManagerExtras.h
blob6cb1e6459e3330685c24d1b6b8e59c1b88375af9
1 /*
2 * Copyright (C) 2023 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 "video/dialogs/GUIDialogVideoManager.h"
13 #include <memory>
14 #include <string>
16 class CFileItem;
18 enum class VideoAssetType;
20 class CGUIDialogVideoManagerExtras : public CGUIDialogVideoManager
22 public:
23 CGUIDialogVideoManagerExtras();
24 ~CGUIDialogVideoManagerExtras() override = default;
26 void SetVideoAsset(const std::shared_ptr<CFileItem>& item) override;
27 /*!
28 * \brief Open the Manage Extras dialog for a video
29 * \param item video to manage
30 * \return true: the video or another item was modified, a containing list should be refreshed.
31 * false: no changes
33 static bool ManageVideoExtras(const std::shared_ptr<CFileItem>& item);
34 static std::string GenerateVideoExtra(const std::string& extrasRoot,
35 const std::string& extrasPath);
37 protected:
38 bool OnMessage(CGUIMessage& message) override;
40 VideoAssetType GetVideoAssetType() override;
41 int GetHeadingId() override { return 40025; } // Extras:
43 void UpdateButtons() override;
45 private:
46 /*!
47 * \brief Add an extra to the video, using GUI user-provided information.
48 * \return true if an extra was added, false otherwise.
50 bool AddVideoExtra();
51 static std::string GenerateVideoExtra(const std::string& extrasPath);