Skip to content

Commit

Permalink
Config: Add required BoxLayout values from default
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlStraussberger committed Dec 27, 2023
1 parent c93e600 commit 6202974
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ sudo make install
| [libebml] | | 1.4.2 | 1.4.5 | Optional | requird by [libmatroska] | Enabled |
| ffmpeg/libav | | | | Optional | File metadata | Disabled |
| libexif | | | | Optional | JPEG Exif metadata | Enabled |
| [libexiv2] | v0.26 | v0.27.7 | v0.27.7 | Optional | Exif, IPTC, XMP metadata | Disabled |
| [libexiv2] | v0.26 | v0.27.7 | v0.28.1 | Optional | Exif, IPTC, XMP metadata | Disabled |
| [lastfmlib] | 0.4.0 | 0.4.0 | 0.4.0 | Optional | Enables scrobbling | Disabled |
| [ffmpegthumbnailer] | | 2.2.0 | 2.2.2 | Optional | Generate video thumbnails | Disabled |
| inotify | | | | Optional | Efficient file monitoring | Enabled |
Expand Down
2 changes: 1 addition & 1 deletion ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ them to the new `<box-layout ../>`. Run gerbera with `--create-config` to get th
### Code Improvements

- Update Javascript libraries
- Update versions of googletest (1.14), pupnp (1.14.18), libexiv2 (v0.27.7), libebml (1.4.5), fmt (10.1.1), pugixml (1.14), spdlog (1.12.0) and taglib (1.13.1)
- Update versions of googletest (1.14), pupnp (1.14.18), libexiv2 (v0.28.1), libebml (1.4.5), fmt (10.1.1), pugixml (1.14), spdlog (1.12.0) and taglib (1.13.1)
- Compatibility with gcc14

## v1.12.1
Expand Down
Empty file modified scripts/install-libexiv2.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions scripts/versions.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ else

DUKTAPE="2.7.0"
EBML="1.4.5"
EXIV2="v0.28.1"
EXIV2="v0.27.7"
FFMPEGTHUMBNAILER="2.2.2"
FMT="10.1.1"
Expand Down
10 changes: 10 additions & 0 deletions src/config/setup/config_setup_boxlayout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ bool ConfigBoxLayoutSetup::createOptionFromNode(const pugi::xml_node& element, c
if (!element)
return true;

std::vector<std::string> allKeys;
auto&& ccs = ConfigDefinition::findConfigSetup<ConfigSetup>(option);
for (auto&& it : ccs->getXmlTree(element)) {
const pugi::xml_node& child = it.node();
Expand All @@ -50,11 +51,20 @@ bool ConfigBoxLayoutSetup::createOptionFromNode(const pugi::xml_node& element, c
auto box = std::make_shared<BoxLayout>(key, title, objClass, enabled, size);
try {
result->add(box);
allKeys.push_back(key);
log_debug("Created BoxLayout key={}, title={}, objClass={}, enabled={}, size={}", key, title, objClass, enabled, size);
} catch (const std::runtime_error& e) {
throw_std_runtime_error("Could not add {} boxlayout: {}", key, e.what());
}
}
for (auto&& defEntry : defaultEntries) {
if (std::find(allKeys.begin(), allKeys.end(), defEntry.getKey()) == allKeys.end()) {
auto box = std::make_shared<BoxLayout>(defEntry.getKey(), defEntry.getTitle(), defEntry.getClass(), defEntry.getEnabled(), defEntry.getSize());
log_info("Created default BoxLayout key={}, title={}, objClass={}, enabled={}, size={}", defEntry.getKey(), defEntry.getTitle(), defEntry.getClass(), defEntry.getEnabled(), defEntry.getSize());
result->add(box);
allKeys.push_back(defEntry.getKey());
}
}

return true;
}
Expand Down

0 comments on commit 6202974

Please sign in to comment.