helpers: fix default now playing song format and validation of user-specified one
This commit is contained in:
@@ -43,7 +43,7 @@ bool ConnectToMPD()
|
|||||||
void ParseArgv(int argc, char **argv)
|
void ParseArgv(int argc, char **argv)
|
||||||
{
|
{
|
||||||
bool quit = 0;
|
bool quit = 0;
|
||||||
std::string now_playing_format = "{{(%l) }{{%a - }%t}}|{%f}}";
|
std::string now_playing_format = "{{{(%l) }{{%a - }%t}}|{%f}}";
|
||||||
|
|
||||||
for (int i = 1; i < argc; ++i)
|
for (int i = 1; i < argc; ++i)
|
||||||
{
|
{
|
||||||
@@ -147,7 +147,7 @@ void ParseArgv(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if (argc > ++i)
|
if (argc > ++i)
|
||||||
{
|
{
|
||||||
if (MPD::Song::isFormatOk("now-playing format", now_playing_format))
|
if (MPD::Song::isFormatOk("now-playing format", argv[i]))
|
||||||
{
|
{
|
||||||
// apply additional pair of braces
|
// apply additional pair of braces
|
||||||
now_playing_format = "{";
|
now_playing_format = "{";
|
||||||
|
|||||||
Reference in New Issue
Block a user