Change status.xml to default xml-style with only one element/tag per line

Change status.xml to default xml-style with only one element/tag per line.
Makes it a lot more easier to parse the file.
This commit is contained in:
CSchlipp 2013-05-22 09:49:33 +02:00
parent 29f715f685
commit dcbfd1425a

View file

@ -1,6 +1,6 @@
/*
* tvheadend, WEBUI / HTML user interface
* Copyright (C) 2008 Andreas Öman
* Copyright (C) 2008 Andreas <EFBFBD>man
*
* 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
@ -422,20 +422,20 @@ page_status(http_connection_t *hc,
html_escape(buf, lang_str_get(de->de_title, NULL), sizeof(buf));
htsbuf_qprintf(hq,
"<recording>"
"<start>"
"<date>%d/%02d/%02d</date>"
"<time>%02d:%02d</time>"
"<unixtime>%"PRItime_t"</unixtime>"
"<extra_start>%"PRItime_t"</extra_start>"
"</start>"
"<stop>"
"<date>%d/%02d/%02d</date>"
"<time>%02d:%02d</time>"
"<unixtime>%"PRItime_t"</unixtime>"
"<extra_stop>%"PRItime_t"</extra_stop>"
"</stop>"
"<title>%s</title>",
"<recording>\n"
"<start>\n"
"<date>%d/%02d/%02d</date>\n"
"<time>%02d:%02d</time>\n"
"<unixtime>%"PRItime_t"</unixtime>\n"
"<extra_start>%"PRItime_t"</extra_start>\n"
"</start>\n"
"<stop>\n"
"<date>%d/%02d/%02d</date>\n"
"<time>%02d:%02d</time>\n"
"<unixtime>%"PRItime_t"</unixtime>\n"
"<extra_stop>%"PRItime_t"</extra_stop>\n"
"</stop>\n"
"<title>%s</title>\n",
a.tm_year + 1900, a.tm_mon + 1, a.tm_mday,
a.tm_hour, a.tm_min,
de->de_start,
@ -448,14 +448,14 @@ page_status(http_connection_t *hc,
rstatus = val2str(de->de_sched_state, recstatustxt);
html_escape(buf, rstatus, sizeof(buf));
htsbuf_qprintf(hq, "<status>%s</status></recording>\n", buf);
htsbuf_qprintf(hq, "<status>%s</status>\n</recording>\n", buf);
cc++;
timeleft = -1;
}
}
if ((cc==0) && (timeleft < INT_MAX)) {
htsbuf_qprintf(hq, "<recording><next>%d</next></recording>\n",timeleft);
htsbuf_qprintf(hq, "<recording>\n<next>%d</next>\n</recording>\n",timeleft);
}
dvr_query_free(&dqr);