aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/skin.estuary/xml/Custom_1109_TopBarOverlay.xml4
-rw-r--r--addons/skin.estuary/xml/Timers.xml7
-rw-r--r--cmake/modules/buildtools/FindFlatC.cmake13
-rw-r--r--xbmc/addons/gui/skin/SkinTimerManager.cpp3
-rw-r--r--xbmc/video/VideoUtils.cpp39
5 files changed, 49 insertions, 17 deletions
diff --git a/addons/skin.estuary/xml/Custom_1109_TopBarOverlay.xml b/addons/skin.estuary/xml/Custom_1109_TopBarOverlay.xml
index 3f046338ee..9a5aed2d46 100644
--- a/addons/skin.estuary/xml/Custom_1109_TopBarOverlay.xml
+++ b/addons/skin.estuary/xml/Custom_1109_TopBarOverlay.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<window type="dialog" id="1109">
- <onload>Skin.TimerStart(1110_topbaroverlay)</onload>
+ <onload>Skin.TimerStart(1109_topbaroverlay)</onload>
<visible>Window.IsActive(fullscreenvideo) | Window.IsActive(visualisation)</visible>
<visible>Window.IsActive(seekbar) | Window.IsActive(pvrosdchannels) | Window.IsActive(pvrchannelguide)</visible>
<depth>DepthOSD</depth>
@@ -10,7 +10,7 @@
<control type="group">
<visible>![Player.ShowInfo | Window.IsActive(fullscreeninfo) | Player.ShowTime | Window.IsActive(videoosd) | Window.IsActive(musicosd) | Window.IsActive(playerprocessinfo) | Window.IsActive(pvrosdchannels) | Window.IsActive(pvrchannelguide)] + [!String.IsEmpty(Player.SeekNumeric) | Player.Seeking | Player.HasPerformedSeek(3) | Player.Forwarding | Player.Rewinding | Player.Paused] | !String.IsEmpty(PVR.ChannelNumberInput)</visible>
<animation effect="fade" start="0" end="100" time="300">VisibleChange</animation>
- <animation effect="slide" start="0,0" end="0,-80" time="300" condition="Player.Paused + Integer.IsGreaterOrEqual(Skin.TimerElapsedSecs(1110_topbaroverlay),5)">Conditional</animation>
+ <animation effect="slide" start="0,0" end="0,-80" time="300" condition="Player.Paused + Integer.IsGreaterOrEqual(Skin.TimerElapsedSecs(1109_topbaroverlay),5)">Conditional</animation>
<control type="image">
<left>0</left>
<top>0</top>
diff --git a/addons/skin.estuary/xml/Timers.xml b/addons/skin.estuary/xml/Timers.xml
index eb252a3a27..27b9e16e58 100644
--- a/addons/skin.estuary/xml/Timers.xml
+++ b/addons/skin.estuary/xml/Timers.xml
@@ -9,9 +9,10 @@
<onstop>Dialog.Close(videoosd)</onstop>
</timer>
<timer>
- <name>1110_topbaroverlay</name>
+ <name>1109_topbaroverlay</name>
<description>A timer that is activated when the topbaroverlay is loaded and stops automatically after 5 seconds (or playback is resumed)</description>
- <reset>[Player.Seeking | Player.Forwarding | Player.Rewinding | Player.HasPerformedSeek(1)]</reset>
- <stop>Integer.IsGreaterOrEqual(Skin.TimerElapsedSecs(1110_topbaroverlay),5)</stop>
+ <start reset="true">Window.IsActive(1109) + [Player.Seeking | Player.Forwarding | Player.Rewinding | Player.HasPerformedSeek(1)]</start>
+ <reset>Player.Seeking | Player.Forwarding | Player.Rewinding | Player.HasPerformedSeek(1)</reset>
+ <stop>Integer.IsGreaterOrEqual(Skin.TimerElapsedSecs(1109_topbaroverlay),5) | Player.Playing</stop>
</timer>
</timers>
diff --git a/cmake/modules/buildtools/FindFlatC.cmake b/cmake/modules/buildtools/FindFlatC.cmake
index e42c814635..bca17e8a05 100644
--- a/cmake/modules/buildtools/FindFlatC.cmake
+++ b/cmake/modules/buildtools/FindFlatC.cmake
@@ -25,14 +25,15 @@ if(NOT TARGET flatbuffers::flatc)
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX MATCH "[^\n]* version [^\n]*" FLATBUFFERS_FLATC_VERSION "${FLATBUFFERS_FLATC_VERSION}")
string(REGEX REPLACE ".* version (.*)" "\\1" FLATBUFFERS_FLATC_VERSION "${FLATBUFFERS_FLATC_VERSION}")
+ endif()
- else()
+ set(MODULE_LC flatbuffers)
+ # Duplicate URL may exist from FindFlatbuffers.cmake
+ # unset otherwise it thinks we are providing a local file location and incorrect concatenation happens
+ unset(FLATBUFFERS_URL)
+ SETUP_BUILD_VARS()
- set(MODULE_LC flatbuffers)
- # Duplicate URL may exist from FindFlatbuffers.cmake
- # unset otherwise it thinks we are providing a local file location and incorrect concatenation happens
- unset(FLATBUFFERS_URL)
- SETUP_BUILD_VARS()
+ if(NOT FLATBUFFERS_FLATC_EXECUTABLE OR (ENABLE_INTERNAL_FLATBUFFERS AND NOT "${FLATBUFFERS_FLATC_VERSION}" VERSION_EQUAL "${FLATBUFFERS_VER}"))
# Override build type detection and always build as release
set(FLATBUFFERS_BUILD_TYPE Release)
diff --git a/xbmc/addons/gui/skin/SkinTimerManager.cpp b/xbmc/addons/gui/skin/SkinTimerManager.cpp
index b29b05bec5..663f5aa7a3 100644
--- a/xbmc/addons/gui/skin/SkinTimerManager.cpp
+++ b/xbmc/addons/gui/skin/SkinTimerManager.cpp
@@ -73,7 +73,8 @@ void CSkinTimerManager::LoadTimerInternal(const TiXmlElement* node)
startInfo = CServiceBroker::GetGUI()->GetInfoManager().Register(
node->FirstChild("start")->FirstChild()->ValueStr());
// check if timer needs to be reset after start
- if (node->Attribute("reset") && StringUtils::EqualsNoCase(node->Attribute("reset"), "true"))
+ if (node->FirstChildElement("start")->Attribute("reset") &&
+ StringUtils::EqualsNoCase(node->FirstChildElement("start")->Attribute("reset"), "true"))
{
resetOnStart = true;
}
diff --git a/xbmc/video/VideoUtils.cpp b/xbmc/video/VideoUtils.cpp
index 5987238565..44609aa3c8 100644
--- a/xbmc/video/VideoUtils.cpp
+++ b/xbmc/video/VideoUtils.cpp
@@ -185,6 +185,20 @@ void CAsyncGetItemsForPlaylist::GetItemsForPlaylist(const std::shared_ptr<CFileI
items.Sort(sortDesc);
}
+ if (items.GetContent().empty() && !items.IsVideoDb() && !items.IsVirtualDirectoryRoot() &&
+ !items.IsSourcesPath() && !items.IsLibraryFolder())
+ {
+ CVideoDatabase db;
+ if (db.Open())
+ {
+ std::string content = db.GetContentForPath(items.GetPath());
+ if (content.empty() && !items.IsPlugin())
+ content = "files";
+
+ items.SetContent(content);
+ }
+ }
+
if (m_resume)
{
// put last played item at the begin of the playlist; add start offsets for videos
@@ -226,6 +240,7 @@ void CAsyncGetItemsForPlaylist::GetItemsForPlaylist(const std::shared_ptr<CFileI
const bool unwatchedOnly = watchedMode == WatchedModeUnwatched;
const bool watchedOnly = watchedMode == WatchedModeWatched;
+ bool fetchedPlayCounts = false;
for (const auto& i : items)
{
if (i->m_bIsFolder)
@@ -235,11 +250,25 @@ void CAsyncGetItemsForPlaylist::GetItemsForPlaylist(const std::shared_ptr<CFileI
if (StringUtils::EndsWithNoCase(path, "sample")) // skip sample folders
continue;
}
- else if (i->HasVideoInfoTag() &&
- ((unwatchedOnly && i->GetVideoInfoTag()->GetPlayCount() > 0) ||
- (watchedOnly && i->GetVideoInfoTag()->GetPlayCount() <= 0)))
- continue;
-
+ else
+ {
+ if (!fetchedPlayCounts &&
+ (!i->HasVideoInfoTag() || !i->GetVideoInfoTag()->IsPlayCountSet()))
+ {
+ CVideoDatabase db;
+ if (db.Open())
+ {
+ fetchedPlayCounts = true;
+ db.GetPlayCounts(items.GetPath(), items);
+ }
+ }
+ if (i->HasVideoInfoTag() && i->GetVideoInfoTag()->IsPlayCountSet())
+ {
+ const int playCount = i->GetVideoInfoTag()->GetPlayCount();
+ if ((unwatchedOnly && playCount > 0) || (watchedOnly && playCount <= 0))
+ continue;
+ }
+ }
GetItemsForPlaylist(i);
}
}