aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-01-21 12:27:15 -0800
committerScott Jackson <daneren2005@gmail.com>2015-01-21 12:27:15 -0800
commit1a1ea416f66dadb146d93b230ab6234003ed5ee8 (patch)
treee0178ab9ceb85e2133d160414d036542f631cb30 /src
parent5c6a4951f623a7b8d01892f2622353b1529ad25c (diff)
downloaddsub-1a1ea416f66dadb146d93b230ab6234003ed5ee8.tar.gz
dsub-1a1ea416f66dadb146d93b230ab6234003ed5ee8.tar.bz2
dsub-1a1ea416f66dadb146d93b230ab6234003ed5ee8.zip
Also check to make sure that the server support REL_TIME seeking
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/DLNAController.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/service/DLNAController.java b/src/github/daneren2005/dsub/service/DLNAController.java
index 24cd3030..6a288e8a 100644
--- a/src/github/daneren2005/dsub/service/DLNAController.java
+++ b/src/github/daneren2005/dsub/service/DLNAController.java
@@ -27,6 +27,7 @@ import org.fourthline.cling.model.gena.GENASubscription;
import org.fourthline.cling.model.message.UpnpResponse;
import org.fourthline.cling.model.meta.Action;
import org.fourthline.cling.model.meta.Service;
+import org.fourthline.cling.model.meta.StateVariable;
import org.fourthline.cling.model.state.StateVariableValue;
import org.fourthline.cling.model.types.ServiceType;
import org.fourthline.cling.support.avtransport.callback.GetPositionInfo;
@@ -107,10 +108,13 @@ public class DLNAController extends RemoteController {
@Override
protected void established(GENASubscription genaSubscription) {
- Action[] actions = genaSubscription.getService().getActions();
- for(Action action: actions) {
- if("Seek".equals(action.getName())) {
- supportsSeek = true;
+ Action seekAction = genaSubscription.getService().getAction("Seek");
+ if(seekAction != null) {
+ StateVariable seekMode = genaSubscription.getService().getStateVariable("A_ARG_TYPE_SeekMode");
+ for(String allowedValue: seekMode.getTypeDetails().getAllowedValues()) {
+ if("REL_TIME".equals(allowedValue)) {
+ supportsSeek = true;
+ }
}
}