aboutsummaryrefslogtreecommitdiff
path: root/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/video/dialogs/GUIDialogVideoInfo.cpp')
-rw-r--r--xbmc/video/dialogs/GUIDialogVideoInfo.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
index 59daa631de..2585679c6e 100644
--- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
@@ -10,6 +10,7 @@
#include "ContextMenuManager.h"
#include "FileItem.h"
+#include "FileItemList.h"
#include "GUIPassword.h"
#include "GUIUserMessages.h"
#include "ServiceBroker.h"
@@ -51,6 +52,7 @@
#include "utils/URIUtils.h"
#include "utils/Variant.h"
#include "video/VideoDbUrl.h"
+#include "video/VideoFileItemClassify.h"
#include "video/VideoInfoScanner.h"
#include "video/VideoInfoTag.h"
#include "video/VideoItemArtworkHandler.h"
@@ -71,6 +73,7 @@
using namespace XFILE::VIDEODATABASEDIRECTORY;
using namespace XFILE;
using namespace KODI::MESSAGING;
+using namespace KODI::VIDEO;
#define CONTROL_IMAGE 3
#define CONTROL_TEXTAREA 4
@@ -279,7 +282,7 @@ void CGUIDialogVideoInfo::OnInitWindow()
CONTROL_DISABLE(CONTROL_BTN_REFRESH);
// @todo add support to edit video asset art. Until then edit art through Versions Manager.
- if (!VIDEO::IsVideoAssetFile(*m_movieItem))
+ if (!IsVideoAssetFile(*m_movieItem))
CONTROL_ENABLE_ON_CONDITION(
CONTROL_BTN_GET_THUMB,
(profileManager->GetCurrentProfile().canWriteDatabases() ||
@@ -1067,7 +1070,8 @@ std::string CGUIDialogVideoInfo::GetThumbnail() const
int CGUIDialogVideoInfo::ManageVideoItem(const std::shared_ptr<CFileItem>& item)
{
- if (item == nullptr || !item->IsVideoDb() || !item->HasVideoInfoTag() || item->GetVideoInfoTag()->m_iDbId < 0)
+ if (item == nullptr || !IsVideoDb(*item) || !item->HasVideoInfoTag() ||
+ item->GetVideoInfoTag()->m_iDbId < 0)
return -1;
CVideoDatabase database;
@@ -1078,18 +1082,18 @@ int CGUIDialogVideoInfo::ManageVideoItem(const std::shared_ptr<CFileItem>& item)
int dbId = item->GetVideoInfoTag()->m_iDbId;
CContextButtons buttons;
- if ((type == MediaTypeMovie && !VIDEO::IsVideoAssetFile(*item)) ||
- type == MediaTypeVideoCollection || type == MediaTypeTvShow || type == MediaTypeEpisode ||
+ if ((type == MediaTypeMovie && !IsVideoAssetFile(*item)) || type == MediaTypeVideoCollection ||
+ type == MediaTypeTvShow || type == MediaTypeEpisode ||
(type == MediaTypeSeason &&
item->GetVideoInfoTag()->m_iSeason > 0) || // seasons without "all seasons" and "specials"
type == MediaTypeMusicVideo)
buttons.Add(CONTEXT_BUTTON_EDIT, 16105);
- if ((type == MediaTypeMovie && !VIDEO::IsVideoAssetFile(*item)) || type == MediaTypeTvShow ||
+ if ((type == MediaTypeMovie && !IsVideoAssetFile(*item)) || type == MediaTypeTvShow ||
type == MediaTypeSeason)
buttons.Add(CONTEXT_BUTTON_EDIT_SORTTITLE, 16107);
- if (type == MediaTypeMovie && !VIDEO::IsVideoAssetFile(*item))
+ if (type == MediaTypeMovie && !IsVideoAssetFile(*item))
{
// only show link/unlink if there are tvshows available
if (database.HasContent(VideoDbContentType::TVSHOWS))
@@ -1113,9 +1117,8 @@ int CGUIDialogVideoInfo::ManageVideoItem(const std::shared_ptr<CFileItem>& item)
item->GetVideoInfoTag()->m_iBookmarkId > 0)
buttons.Add(CONTEXT_BUTTON_UNLINK_BOOKMARK, 20405);
- if (type == MediaTypeVideoCollection ||
- (type == MediaTypeMovie && !VIDEO::IsVideoAssetFile(*item)) || type == MediaTypeTvShow ||
- type == MediaTypeSeason || type == MediaTypeEpisode)
+ if (type == MediaTypeVideoCollection || (type == MediaTypeMovie && !IsVideoAssetFile(*item)) ||
+ type == MediaTypeTvShow || type == MediaTypeSeason || type == MediaTypeEpisode)
buttons.Add(CONTEXT_BUTTON_SET_ART, 13511);
// movie sets
@@ -1139,7 +1142,7 @@ int CGUIDialogVideoInfo::ManageVideoItem(const std::shared_ptr<CFileItem>& item)
}
}
- if (type != MediaTypeSeason && !VIDEO::IsVideoAssetFile(*item))
+ if (type != MediaTypeSeason && !IsVideoAssetFile(*item))
{
// Remove from library
buttons.Add(CONTEXT_BUTTON_DELETE, 646);