]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Change status.xml to default xml-style with only one element/tag per line 275/head
authorCSchlipp <christian@schlipp.de>
Wed, 22 May 2013 07:49:33 +0000 (09:49 +0200)
committerCSchlipp <christian@schlipp.de>
Wed, 22 May 2013 07:49:33 +0000 (09:49 +0200)
Change status.xml to default xml-style with only one element/tag per line.
Makes it a lot more easier to parse the file.

src/webui/simpleui.c

index 30f8769911d692e51067bde20ebc08a4d52eff4f..c4fe3e2c98a69f90ac93c75f5645cdad0513ac3f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  tvheadend, WEBUI / HTML user interface
- *  Copyright (C) 2008 Andreas Öman
+ *  Copyright (C) 2008 Andreas 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);