aboutsummaryrefslogtreecommitdiff
path: root/xbmc/video/windows/GUIWindowVideoBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/video/windows/GUIWindowVideoBase.cpp')
-rw-r--r--xbmc/video/windows/GUIWindowVideoBase.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/xbmc/video/windows/GUIWindowVideoBase.cpp b/xbmc/video/windows/GUIWindowVideoBase.cpp
index 50da6ba3b8..eded77d85d 100644
--- a/xbmc/video/windows/GUIWindowVideoBase.cpp
+++ b/xbmc/video/windows/GUIWindowVideoBase.cpp
@@ -102,8 +102,8 @@ bool CGUIWindowVideoBase::OnAction(const CAction &action)
return OnContextButton(m_viewControl.GetSelectedItem(),CONTEXT_BUTTON_SCAN);
else if (action.GetID() == ACTION_SHOW_PLAYLIST)
{
- if (CServiceBroker::GetPlaylistPlayer().GetCurrentPlaylist() == PLAYLIST::TYPE_VIDEO ||
- CServiceBroker::GetPlaylistPlayer().GetPlaylist(PLAYLIST::TYPE_VIDEO).size() > 0)
+ if (CServiceBroker::GetPlaylistPlayer().GetCurrentPlaylist() == PLAYLIST::Id::TYPE_VIDEO ||
+ CServiceBroker::GetPlaylistPlayer().GetPlaylist(PLAYLIST::Id::TYPE_VIDEO).size() > 0)
{
CServiceBroker::GetGUI()->GetWindowManager().ActivateWindow(WINDOW_VIDEO_PLAYLIST);
return true;
@@ -252,9 +252,7 @@ bool CGUIWindowVideoBase::OnItemInfo(const CFileItem& fileItem)
const ADDON::ScraperPtr scraper = m_database.GetScraperForPath(strDir, settings, foundDirectly);
if (!fileItem.HasVideoInfoTag() && !scraper && !(fileItem.IsPlugin() || fileItem.IsScript()) &&
- !(m_database.HasMovieInfo(fileItem.GetDynPath()) || m_database.HasTvShowInfo(strDir) ||
- m_database.HasEpisodeInfo(fileItem.GetDynPath()) ||
- m_database.HasMusicVideoInfo(fileItem.GetDynPath())))
+ !KODI::VIDEO::UTILS::HasItemVideoDbInformation(fileItem))
{
// We have no chance to fill a video info tag, neither scraper nor db data available.
HELPERS::ShowOKDialogText(CVariant{20176}, // Show video information
@@ -977,7 +975,7 @@ bool CGUIWindowVideoBase::OnPlayMedia(const std::shared_ptr<CFileItem>& pItem,
// Reset Playlistplayer, playback started now does
// not use the playlistplayer.
CServiceBroker::GetPlaylistPlayer().Reset();
- CServiceBroker::GetPlaylistPlayer().SetCurrentPlaylist(PLAYLIST::TYPE_NONE);
+ CServiceBroker::GetPlaylistPlayer().SetCurrentPlaylist(PLAYLIST::Id::TYPE_NONE);
auto itemCopy = std::make_shared<CFileItem>(*pItem);
@@ -988,7 +986,7 @@ bool CGUIWindowVideoBase::OnPlayMedia(const std::shared_ptr<CFileItem>& pItem,
}
CLog::Log(LOGDEBUG, "{} {}", __FUNCTION__, CURL::GetRedacted(itemCopy->GetPath()));
- itemCopy->SetProperty("playlist_type_hint", m_guiState->GetPlaylist());
+ itemCopy->SetProperty("playlist_type_hint", static_cast<int>(m_guiState->GetPlaylist()));
if (m_thumbLoader.IsLoading())
m_thumbLoader.StopAsync();
@@ -1015,7 +1013,7 @@ bool CGUIWindowVideoBase::OnPlayAndQueueMedia(const CFileItemPtr& item, const st
{
// Get the current playlist and make sure it is not shuffled
PLAYLIST::Id playlistId = m_guiState->GetPlaylist();
- if (playlistId != PLAYLIST::TYPE_NONE &&
+ if (playlistId != PLAYLIST::Id::TYPE_NONE &&
CServiceBroker::GetPlaylistPlayer().IsShuffled(playlistId))
{
CServiceBroker::GetPlaylistPlayer().SetShuffle(playlistId, false);
@@ -1147,10 +1145,10 @@ bool CGUIWindowVideoBase::PlayItem(const std::shared_ptr<CFileItem>& pItem,
CFileItemList queuedItems;
VIDEO::UTILS::GetItemsForPlayList(item, queuedItems);
- CServiceBroker::GetPlaylistPlayer().ClearPlaylist(PLAYLIST::TYPE_VIDEO);
+ CServiceBroker::GetPlaylistPlayer().ClearPlaylist(PLAYLIST::Id::TYPE_VIDEO);
CServiceBroker::GetPlaylistPlayer().Reset();
- CServiceBroker::GetPlaylistPlayer().Add(PLAYLIST::TYPE_VIDEO, queuedItems);
- CServiceBroker::GetPlaylistPlayer().SetCurrentPlaylist(PLAYLIST::TYPE_VIDEO);
+ CServiceBroker::GetPlaylistPlayer().Add(PLAYLIST::Id::TYPE_VIDEO, queuedItems);
+ CServiceBroker::GetPlaylistPlayer().SetCurrentPlaylist(PLAYLIST::Id::TYPE_VIDEO);
CServiceBroker::GetPlaylistPlayer().Play();
return true;
}
@@ -1159,7 +1157,7 @@ bool CGUIWindowVideoBase::PlayItem(const std::shared_ptr<CFileItem>& pItem,
// Note: strm files being somehow special playlists need to be handled in OnPlay*Media
// load the playlist the old way
- LoadPlayList(pItem->GetDynPath(), PLAYLIST::TYPE_VIDEO);
+ LoadPlayList(pItem->GetDynPath(), PLAYLIST::Id::TYPE_VIDEO);
return true;
}
else if (m_guiState.get() && m_guiState->AutoPlayNextItem() && !g_partyModeManager.IsEnabled())