- Update to 1.12.1:

* Debug options for specialized messages
  * Configure offset of lastPlayedPosition (aka Samsung bookmark)
  * Calling null IOHandler
  * Encoding of ticks ' as ' for Bose
  * ffmpeg and transcoding in docker container
  * Tests failing on openSuSE > 15.3 and others
- Drop 2759.patch

OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/gerbera?expand=0&rev=46
This commit is contained in:
Paolo Stivanin 2023-01-06 08:08:21 +00:00 committed by Git OBS Bridge
parent 43a3d27364
commit 766153fd17
5 changed files with 17 additions and 133 deletions

View File

@ -1,126 +0,0 @@
From aa0d7bb8fff560734fc80369728740df46dc33bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karl=20Strau=C3=9Fberger?= <k_straussberger@netzland.net>
Date: Thu, 1 Dec 2022 19:09:41 +0100
Subject: [PATCH] openSuSE: Fix test and inits
---
doc/config-import.rst | 15 ++++++++++-----
src/util/grb_net.cc | 23 +++++++++++++++++------
test/core/test_searchhandler.cc | 2 +-
3 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/doc/config-import.rst b/doc/config-import.rst
index 3278383c4..f6aca38d8 100644
--- a/doc/config-import.rst
+++ b/doc/config-import.rst
@@ -668,11 +668,11 @@ You can set up your correct fanart file by yourself, if no image is embedded in
::
- <container location="image" parentCount="2" minDepth="2"/>
+ <container location="images" parentCount="2" minDepth="2"/>
* Optional
- Set up container images. Drop your artists' images or logos for default containers here and they are displayed as thumbnail when browsing with a compatible client.
+ Set up container images. The fanart of a media file is added automatically as a thumbnail to the container (e.g. the album container).
::
@@ -681,7 +681,8 @@ You can set up your correct fanart file by yourself, if no image is embedded in
* Optional
Path to the directory containing the images to load. Relative paths are assumed to be under the server's home.
- If the image is not found in that location, it is also searched in the physical folder itself
+ Drop your artists' images or logos for default containers here and they are displayed as thumbnail when browsing with a compatible client.
+ If the image is not found in that location, it is also searched in the physical folder itself.
::
@@ -689,7 +690,10 @@ You can set up your correct fanart file by yourself, if no image is embedded in
* Optional
- Number of level which the fanart of a media file can be propagated upwards.
+ This setting allows to increase the number of levels which the fanart of a media file can be propagated upwards (examples refer to basic layout /Root/Audio/Artist/Album/song).
+ A value of 1 adds the fanart only to the direct parent container when a media file is added (e.g. the Album container).
+ A value of 2 means you propagate that image to the parent container as well (e.g. the Artist container).
+ A value of 0 blocks propagation completely.
::
@@ -697,7 +701,8 @@ You can set up your correct fanart file by yourself, if no image is embedded in
* Optional
- Minimum number of path elements for container using fanart from media files.
+ Depending on the virtual layout propagating thumbnails can reach containers like Video or Audio. This settings forces a minimal depth for propagation to apply.
+ It is setting the minimum number of path elements for container using fanart from media files (e.g. /Root/Audio/Artist has level 3 so the image can be set).
``add-file``
diff --git a/src/util/grb_net.cc b/src/util/grb_net.cc
index 3ea5fefd4..b1c2a018f 100644
--- a/src/util/grb_net.cc
+++ b/src/util/grb_net.cc
@@ -145,22 +145,33 @@ std::string GrbNet::getHostName()
return hostName;
auto addr = reinterpret_cast<const struct sockaddr*>(&sockAddr);
- char hoststr[NI_MAXHOST];
- char portstr[NI_MAXSERV];
+ char hoststr[NI_MAXHOST] = "";
+ char portstr[NI_MAXSERV] = "";
int len = addr->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in);
int ret = getnameinfo(addr, len, hoststr, sizeof(hoststr), portstr, sizeof(portstr), NI_NOFQDN);
if (ret != 0) {
- log_debug("could not determine getnameinfo: {}", std::strerror(errno));
+ log_warning("Could not determine getnameinfo: {}", std::strerror(errno));
+ hoststr[0] = '\0';
}
hostName = hoststr;
+ if (hostName.empty()) {
+ ret = getnameinfo(addr, len, hoststr, sizeof(hoststr), portstr, sizeof(portstr), NI_NUMERICHOST);
+ if (ret != 0) {
+ log_warning("Could not determine getnameinfo: {}", std::strerror(errno));
+ hoststr[0] = '\0';
+ return hostName;
+ }
+ hostName = hoststr;
+ }
+
return hoststr;
}
std::string GrbNet::getNameInfo(bool withPort) const
{
auto addr = reinterpret_cast<const struct sockaddr*>(&sockAddr);
- char hoststr[NI_MAXHOST];
- char portstr[NI_MAXSERV];
+ char hoststr[NI_MAXHOST] = "";
+ char portstr[NI_MAXSERV] = "";
int len = addr->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in);
int ret = getnameinfo(addr, len, hoststr, sizeof(hoststr), portstr, sizeof(portstr), NI_NUMERICHOST | NI_NUMERICSERV);
if (ret != 0) {
@@ -181,7 +192,7 @@ std::string GrbNet::ipToInterface(std::string_view ip)
struct ifaddrs* ifaddr;
int family, s;
- char host[NI_MAXHOST];
+ char host[NI_MAXHOST] = "";
if (getifaddrs(&ifaddr) == -1) {
log_error("Could not getifaddrs: {}", std::strerror(errno));
diff --git a/test/core/test_searchhandler.cc b/test/core/test_searchhandler.cc
index 836c6c49c..85467457f 100644
--- a/test/core/test_searchhandler.cc
+++ b/test/core/test_searchhandler.cc
@@ -505,7 +505,7 @@ TEST_F(ParserTest, SortCriteriaError)
TEST_F(ParserTest, SortTrackNumber)
{
- EXPECT_EQ(OTN, "unknown");
+ EXPECT_TRUE(OTN == "unknown" || OTN == "upnp:originalTrackNumber");
EXPECT_EQ(otn, "upnp:originalTrackNumber");
EXPECT_EQ(MetadataHandler::getMetaFieldName(M_TRACKNUMBER), "upnp:originalTrackNumber");
EXPECT_TRUE(executeSortParserTest("+upnp:originalTrackNumber",

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb04a4e4432b8ae149bdd5ea7f33f3af39cb226d3d52ec0aed3f8273023f1edd
size 4363130

3
gerbera-1.12.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2144a7c4a13e8b43aa0c911fbeae65f05e2c42254ddd03be5c41f5fcf103a93c
size 4368573

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Jan 6 08:07:12 UTC 2023 - Paolo Stivanin <info@paolostivanin.com>
- Update to 1.12.1:
* Debug options for specialized messages
* Configure offset of lastPlayedPosition (aka Samsung bookmark)
* Calling null IOHandler
* Encoding of ticks ' as &apos; for Bose
* ffmpeg and transcoding in docker container
* Tests failing on openSuSE > 15.3 and others
- Drop 2759.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Dec 5 08:25:00 UTC 2022 - Paolo Stivanin <info@paolostivanin.com> Mon Dec 5 08:25:00 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package gerbera # spec file for package gerbera
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: gerbera Name: gerbera
Version: 1.12.0 Version: 1.12.1
Release: 0 Release: 0
Summary: UPnP Media Server Summary: UPnP Media Server
License: GPL-2.0-only License: GPL-2.0-only
@ -27,8 +27,6 @@ Source0: https://github.com/gerbera/gerbera/archive/v%{version}.tar.gz#/%
Source1: config.xml Source1: config.xml
Source2: gerbera.sysusers.in Source2: gerbera.sysusers.in
Patch0: harden_gerbera.service.patch Patch0: harden_gerbera.service.patch
# PATCH-FIX-UPSTREAM https://github.com/gerbera/gerbera/pull/2759
Patch1: 2759.patch
BuildRequires: ccache BuildRequires: ccache
BuildRequires: cmake >= 3.13 BuildRequires: cmake >= 3.13
BuildRequires: fdupes BuildRequires: fdupes