diff --git a/src/TagAny.cxx b/src/TagAny.cxx index 4ba3dfaee8..cbe99e87c0 100644 --- a/src/TagAny.cxx +++ b/src/TagAny.cxx @@ -48,6 +48,9 @@ TagScanFile(const Path path_fs, TagHandler &handler) static std::string ResolveUri(std::string_view base, const char *relative) { + if (uri_has_scheme(relative)) { + return std::string(relative); + } while (true) { const char *rest = StringAfterPrefix(relative, "../"); if (rest == nullptr) diff --git a/src/db/plugins/upnp/Directory.cxx b/src/db/plugins/upnp/Directory.cxx index a0b2f957cf..efac59f6ee 100644 --- a/src/db/plugins/upnp/Directory.cxx +++ b/src/db/plugins/upnp/Directory.cxx @@ -156,6 +156,8 @@ class UPnPDirParser final : public CommonExpatParser { if (duration != nullptr) tag.SetDuration(ParseDuration(duration)); + object.url.clear(); + state = RES; } @@ -205,7 +207,7 @@ class UPnPDirParser final : public CommonExpatParser { break; case RES: - object.url.assign(s); + object.url.append(s); break; case CLASS: diff --git a/src/lib/upnp/ContentDirectoryService.cxx b/src/lib/upnp/ContentDirectoryService.cxx index 6fb83adfc1..3c9d8cdb73 100644 --- a/src/lib/upnp/ContentDirectoryService.cxx +++ b/src/lib/upnp/ContentDirectoryService.cxx @@ -13,7 +13,7 @@ using std::string_view_literals::operator""sv; ContentDirectoryService::ContentDirectoryService(const UPnPDevice &device, const UPnPService &service) noexcept - :m_actionURL(uri_apply_base(service.controlURL, device.URLBase)), + :m_actionURL(uri_apply_relative(service.controlURL, device.URLBase)), m_serviceType(service.serviceType), m_deviceId(device.UDN), m_friendlyName(device.friendlyName),