aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-05-19 18:00:21 -0700
committerScott Jackson <daneren2005@gmail.com>2016-05-19 18:00:21 -0700
commit61be7318e654aa25a0607ff56eb98b3a492d9a35 (patch)
tree2fc2dac8479a20cc5a90c9e7831c873f5a3b76b6 /app/src
parent3b95f554b3b99f77c99e5962291b1678fa2f1fd9 (diff)
downloaddsub-61be7318e654aa25a0607ff56eb98b3a492d9a35.tar.gz
dsub-61be7318e654aa25a0607ff56eb98b3a492d9a35.tar.bz2
dsub-61be7318e654aa25a0607ff56eb98b3a492d9a35.zip
Fixes #694: Stop sticking instance to rest2 if changed
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/parser/AbstractParser.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/parser/AbstractParser.java b/app/src/main/java/github/daneren2005/dsub/service/parser/AbstractParser.java
index 4ee37dad..d6e1a002 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/parser/AbstractParser.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/parser/AbstractParser.java
@@ -133,7 +133,16 @@ public abstract class AbstractParser {
}
protected int nextParseEvent() throws Exception {
- return parser.next();
+ try {
+ return parser.next();
+ } catch(Exception e) {
+ if(ServerInfo.isMadsonic6(context, instance)) {
+ ServerInfo overrideInfo = new ServerInfo();
+ overrideInfo.saveServerInfo(context, instance);
+ }
+
+ throw e;
+ }
}
protected String getElementName() {
@@ -162,6 +171,11 @@ public abstract class AbstractParser {
protected void validate() throws Exception {
if (!rootElementFound) {
+ if(ServerInfo.isMadsonic6(context, instance)) {
+ ServerInfo overrideInfo = new ServerInfo();
+ overrideInfo.saveServerInfo(context, instance);
+ }
+
throw new Exception(context.getResources().getString(R.string.background_task_parse_error));
}
}