Changed the 'path' property for the video element to consider the value set even if it points to a non-existing file

This commit is contained in:
Leon Styhre 2023-08-13 11:17:59 +02:00
parent 8e1b3455aa
commit fd955d5a6e
2 changed files with 3 additions and 2 deletions

View file

@ -1014,7 +1014,7 @@ void SystemView::updateGameSelectors()
for (auto& video : mSystemElements[cursor].videoComponents) { for (auto& video : mSystemElements[cursor].videoComponents) {
// If a static video has been set, then don't attempt to find a gameselector entry. // If a static video has been set, then don't attempt to find a gameselector entry.
if (video->hasStaticVideo()) if (video->hasStaticVideo() || video->getThemeGameSelector() == ":none:")
continue; continue;
GameSelectorComponent* gameSelector {nullptr}; GameSelectorComponent* gameSelector {nullptr};
if (multipleSelectors) { if (multipleSelectors) {
@ -1055,7 +1055,7 @@ void SystemView::updateGameSelectors()
} }
for (auto& video : mSystemElements[cursor].videoComponents) { for (auto& video : mSystemElements[cursor].videoComponents) {
if (video->hasStaticVideo() || if (video->hasStaticVideo() || video->getThemeGameSelector() == ":none:" ||
(video->getThemeImageTypes().size() == 0 && video->getDefaultImage() == "")) (video->getThemeImageTypes().size() == 0 && video->getDefaultImage() == ""))
continue; continue;
GameSelectorComponent* gameSelector {nullptr}; GameSelectorComponent* gameSelector {nullptr};

View file

@ -229,6 +229,7 @@ void VideoComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
mConfig.staticVideoPath = staticPath; mConfig.staticVideoPath = staticPath;
} }
else { else {
mThemeGameSelector = ":none:";
LOG(LogWarning) << "VideoComponent: File defined for property \"path\" for element \"" LOG(LogWarning) << "VideoComponent: File defined for property \"path\" for element \""
<< element.substr(6) << "\" does not exist: \"" << staticPath << "\""; << element.substr(6) << "\" does not exist: \"" << staticPath << "\"";
} }