全面移除视频,移除域名混淆加载,直接写死,移除展示类型(同步更新)

This commit is contained in:
chuzhongzai
2023-03-15 21:44:19 +08:00
parent 5d543868bf
commit 38267a076a
3 changed files with 26 additions and 446 deletions
+6 -54
View File
@@ -57,22 +57,6 @@
</tr>
</el-dialog>
<el-dialog title="查询视频" v-model="chosenVideo">
<table>
<tr>视频名字:{{chosenVideo.name}}</tr>
<tr>视频网站: <el-link :href="chosenVideo.website">{{chosenVideo.website}}</el-link> </tr>
<tr>视频链接: <el-link :href="chosenVideo.link">{{chosenVideo.link}}</el-link></tr>
<tr>视频状态:{{chosenVideo.status}}</tr>
<tr v-if="!chosenVideo.resolution">
目标分辨率: <el-select v-model="targetResolution">
<el-option v-for="(resolution) in chosenVideo.availableResolution" :value="resolution" :label="resolution"/>
</el-select>
</tr>
</table>
<el-button @click="postTask" v-if="!chosenVideo.resolution">下载</el-button>
<el-button @click="deleteVideo" v-if="chosenVideo.resolution">删除</el-button>
</el-dialog>
<el-dialog title="修改授权码" v-model="isAlterAuthCode">
<el-form>
<el-form-item>
@@ -129,16 +113,10 @@ let realAuthCode = computed(() => {
let chosenGallery = computed(() => {
return store.state.chosenGallery
})
let chosenVideo = computed(() => {
return store.state.chosenVideo
})
let loadComplete = computed(() => {
return store.state.loadComplete
})
let maskDomain = computed(() => {
return store.state.maskDomain
})
let weekUsed = computed(() => {
return store.state.weekUsed
})
@@ -173,11 +151,7 @@ function postTask(){
return
}
let tempLink = coverLink(param.value)
if(param.value.includes("hentai"))
store.dispatch("postGalleryTask", {link: tempLink, targetResolution: targetResolution.value})
else
store.dispatch("postVideoTask", {link: tempLink, targetResolution: targetResolution.value})
store.dispatch("postGalleryTask", {link: tempLink, targetResolution: targetResolution.value})
targetResolution.value = ""
}
@@ -188,10 +162,7 @@ function queryRemoteTask(){
return
}
let tempLink = coverLink(param.value)
if(param.value.includes("hentai"))
store.dispatch("queryGalleryTask", tempLink)
else
store.dispatch("queryVideoTask", tempLink)
store.dispatch("queryGalleryTask", tempLink)
}
function queryLocalTask(){
switch (type.value){
@@ -212,10 +183,6 @@ function resetLocalQuery(){
param.value = ""
}
//删除任务
function deleteVideo(){
store.dispatch("deleteVideo", chosenVideo.value.id)
}
function deleteGallery(){
store.dispatch("deleteGallery", chosenGallery.value.gid)
}
@@ -236,28 +203,13 @@ function validate(){
function validateLink(rawLink){
if(rawLink.trim() === "")
return false
if(rawLink.includes("hentai")){
if(rawLink.includes("hentai"))
return rawLink.includes("/g/")
}
else if(rawLink.includes("xvideos.com")){
return true
}
else if(rawLink.includes("pornhub.com")){
return rawLink.includes("view_video.php")
}
else if(rawLink.includes("xhamster") && rawLink.includes(".com")){
return true
}
else
return false
}
function coverLink(rawLink){
if(rawLink.includes("xhamster"))
rawLink = "https://zh.xhamster" + rawLink.substring(rawLink.indexOf(".com"))
let url = new URL(rawLink)
maskDomain.value.forEach((mask) => {
if(url.host === mask['raw'])
rawLink = rawLink.replace(mask['raw'], mask['mask'])
})
return rawLink;
return rawLink.replace("exhentai.org", "element-plus.org").replace("e-hentai.org", "element.org");
}
//在线阅读以及展示缩略图