Support WebDAV - part 2
This commit is contained in:
parent
92c50f9780
commit
14423e2f9b
|
|
@ -39,7 +39,6 @@ dependencies {
|
||||||
implementation 'com.github.thegrizzlylabs:sardine-android:0.8'
|
implementation 'com.github.thegrizzlylabs:sardine-android:0.8'
|
||||||
implementation 'com.google.net.cronet:cronet-okhttp:0.1.0'
|
implementation 'com.google.net.cronet:cronet-okhttp:0.1.0'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.10'
|
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.10'
|
||||||
implementation 'androidx.annotation:annotation:1.5.0'
|
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
implementation 'cn.wanghaomiao:JsoupXpath:2.5.1'
|
implementation 'cn.wanghaomiao:JsoupXpath:2.5.1'
|
||||||
implementation 'com.google.zxing:core:3.4.1'
|
implementation 'com.google.zxing:core:3.4.1'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
package com.github.catvod.bean;
|
package com.github.catvod.bean;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
@ -156,7 +154,6 @@ public class Result {
|
||||||
return toString();
|
return toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new Gson().toJson(this);
|
return new Gson().toJson(this);
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ package com.github.catvod.bean.ali;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.github.catvod.utils.Prefers;
|
import com.github.catvod.utils.Prefers;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
@ -49,7 +47,6 @@ public class OAuth {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new Gson().toJson(this);
|
return new Gson().toJson(this);
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ package com.github.catvod.bean.ali;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.github.catvod.utils.Prefers;
|
import com.github.catvod.utils.Prefers;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
@ -61,7 +59,6 @@ public class User {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new Gson().toJson(this);
|
return new Gson().toJson(this);
|
||||||
|
|
|
||||||
|
|
@ -105,9 +105,9 @@ public class WebDAV extends Spider {
|
||||||
public String detailContent(List<String> ids) throws Exception {
|
public String detailContent(List<String> ids) throws Exception {
|
||||||
String id = ids.get(0);
|
String id = ids.get(0);
|
||||||
String key = id.contains("/") ? id.substring(0, id.indexOf("/")) : id;
|
String key = id.contains("/") ? id.substring(0, id.indexOf("/")) : id;
|
||||||
String name = id.substring(id.lastIndexOf("/") + 1);
|
|
||||||
String parent = id.substring(0, id.lastIndexOf("/"));
|
String parent = id.substring(0, id.lastIndexOf("/"));
|
||||||
String path = parent.contains("/") ? parent.substring(parent.indexOf("/")) + "/" : "";
|
String path = parent.contains("/") ? parent.substring(parent.indexOf("/")) + "/" : "";
|
||||||
|
String name = parent.substring(parent.lastIndexOf("/") + 1);
|
||||||
Drive drive = getDrive(key);
|
Drive drive = getDrive(key);
|
||||||
List<DavResource> parents = getList(drive, path, allExt);
|
List<DavResource> parents = getList(drive, path, allExt);
|
||||||
List<DavResource> subs = getSubs(parents);
|
List<DavResource> subs = getSubs(parents);
|
||||||
|
|
@ -119,8 +119,7 @@ public class WebDAV extends Spider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Vod vod = new Vod();
|
Vod vod = new Vod();
|
||||||
vod.setVodId(id);
|
vod.setVodId(name);
|
||||||
//TODO 資料夾名稱
|
|
||||||
vod.setVodName(name);
|
vod.setVodName(name);
|
||||||
vod.setVodPic(vodPic);
|
vod.setVodPic(vodPic);
|
||||||
vod.setVodPlayFrom(key);
|
vod.setVodPlayFrom(key);
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
fec1811bad085e87682f64be8bc9885a
|
962a1af0469ede7b575046c69c1f52d3
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue