Support WebDAV - part 2
This commit is contained in:
parent
d197c76efa
commit
d33ab02695
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;fec1811bad085e87682f64be8bc9885a",
|
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;962a1af0469ede7b575046c69c1f52d3",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;fec1811bad085e87682f64be8bc9885a",
|
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;962a1af0469ede7b575046c69c1f52d3",
|
||||||
"wallpaper": "http://饭太硬.ga/深色壁纸/api.php",
|
"wallpaper": "http://饭太硬.ga/深色壁纸/api.php",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
@ -12,6 +12,16 @@
|
||||||
"changeable": 0,
|
"changeable": 0,
|
||||||
"ext": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/alist.json"
|
"ext": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/alist.json"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"key": "WebDAV",
|
||||||
|
"name": "WebDAV",
|
||||||
|
"type": 3,
|
||||||
|
"api": "csp_WebDAV",
|
||||||
|
"searchable": 1,
|
||||||
|
"filterable": 1,
|
||||||
|
"changeable": 0,
|
||||||
|
"ext": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/webdav.json"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"key": "哔哩",
|
"key": "哔哩",
|
||||||
"name": "哔哩",
|
"name": "哔哩",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"vodPic": "https://avatars.githubusercontent.com/u/3471963?v=4",
|
||||||
|
"drives": [
|
||||||
|
{
|
||||||
|
"name": "七米藍",
|
||||||
|
"server": "https://al.chirmyram.com/dav",
|
||||||
|
"user": "alist",
|
||||||
|
"pass": "alist"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "影視庫",
|
||||||
|
"server": "https://esir.eu.org/dav",
|
||||||
|
"user": "alist",
|
||||||
|
"pass": "alist"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue