mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-22 21:46:15 +02:00
Add control_script to stream sources
New parameter "control_script", starting a script on stream start. Parameters "--snapcast-port" and "--stream" are passed to the script
This commit is contained in:
parent
ec73bfb6d6
commit
2e64d81f79
25 changed files with 265 additions and 95 deletions
|
@ -1,6 +1,6 @@
|
|||
/***
|
||||
This file is part of snapcast
|
||||
Copyright (C) 2014-2020 Johannes Pohl
|
||||
Copyright (C) 2014-2021 Johannes Pohl
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -16,8 +16,8 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#ifndef STRING_UTILS_H
|
||||
#define STRING_UTILS_H
|
||||
#ifndef STRING_UTILS_HPP
|
||||
#define STRING_UTILS_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
@ -172,6 +172,20 @@ static std::map<std::string, std::string> split_pairs(const std::string& s, char
|
|||
}
|
||||
|
||||
|
||||
static inline std::string& tolower(std::string& s)
|
||||
{
|
||||
std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c) { return static_cast<char>(std::tolower(c)); });
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
static inline std::string tolower_copy(const std::string& s)
|
||||
{
|
||||
std::string str(s);
|
||||
return tolower(str);
|
||||
}
|
||||
|
||||
|
||||
} // namespace string
|
||||
} // namespace utils
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue