mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 06:05:56 -05:00
display parse errors in web interface
This commit is contained in:
parent
c7233f0947
commit
839386f86e
@ -31,7 +31,40 @@ function pl_errormsg(msg) {
|
||||
}
|
||||
}
|
||||
|
||||
function pl_displayresults(xmldoc) {
|
||||
function pl_displayresults(xmldoc,query) {
|
||||
var status_string;
|
||||
var status;
|
||||
|
||||
if(!xmldoc) {
|
||||
pl_errormsg("No xmldoc!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!xmldoc.getElementsByTagName("dmap.status")) {
|
||||
pl_errormsg("No dmap.status??");
|
||||
return;
|
||||
}
|
||||
|
||||
status = xmldoc.getElementsByTagName("dmap.status")[0].firstChild.nodeValue;
|
||||
|
||||
if(!status)
|
||||
return;
|
||||
|
||||
status = status * 1;
|
||||
|
||||
if(status != 200) {
|
||||
status_string = "Error " + status + ": ";
|
||||
|
||||
if(xmldoc.getElementsByTagName("dmap.statusstring")) {
|
||||
status_string = status_string + xmldoc.getElementsByTagName("dmap.statusstring")[0].firstChild.nodeValue;
|
||||
} else {
|
||||
status_string = status_string + "Unspecified error";
|
||||
}
|
||||
|
||||
pl_errormsg(status_string);
|
||||
} else {
|
||||
pl_errormsg("Success");
|
||||
}
|
||||
}
|
||||
|
||||
function pl_update() {
|
||||
@ -50,7 +83,9 @@ function pl_update() {
|
||||
var url='/databases/1/containers/edit?output=xml&dmap.itemid=' + id + '&dmap.itemname=' + name + '&org.mt-daapd.smart-playlist-spec=' + spec;
|
||||
result = pl_exec(url,false);
|
||||
}
|
||||
|
||||
|
||||
pl_displayresults(req.responseXML);
|
||||
|
||||
init();
|
||||
pl_editor_state(false);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ AC_CANONICAL_HOST
|
||||
AM_CONDITIONAL(COND_REND_OSX,false)
|
||||
|
||||
rend_posix=true
|
||||
db_sqlite=true
|
||||
db_sqlite=false
|
||||
db_sqlite3=false
|
||||
|
||||
STATIC_LIBS=no
|
||||
@ -88,6 +88,11 @@ if test x$db_sqlite = xtrue -o x$db_sqlite3 = xtrue; then
|
||||
AM_CONDITIONAL(COND_SQL,true)
|
||||
fi
|
||||
|
||||
if test x$db_sqlite = xfalse -a x$db_sqlite3 = xfalse; then
|
||||
echo "Must use either --enable-sqlite or --enable-sqlite3"
|
||||
exit;
|
||||
fi
|
||||
|
||||
dnl Darwin's stupid cpp preprocessor....
|
||||
echo Host type is $host
|
||||
CPPFLAGS="$CPPFLAGS -DHOST='\"$host\"'"
|
||||
|
Loading…
Reference in New Issue
Block a user