mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-30 17:36:16 +02:00
getQuery convenience function
This commit is contained in:
parent
54e8eb2dcc
commit
f6e3c57ee5
3 changed files with 13 additions and 4 deletions
|
@ -122,4 +122,13 @@ json StreamUri::toJson() const
|
|||
std::string StreamUri::id() const
|
||||
{
|
||||
return id_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string StreamUri::getQuery(const std::string& key, const std::string& def) const
|
||||
{
|
||||
auto iter = query.find(key);
|
||||
if (iter != query.end())
|
||||
return iter->second;
|
||||
return def;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue