mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-08 06:43:03 +08:00
屏蔽福利片选项
This commit is contained in:
@@ -232,11 +232,26 @@ export default {
|
||||
const key = this.site.key
|
||||
// 屏蔽主分类
|
||||
const classToHide = ['电影', '电影片', '电视剧', '连续剧', '综艺', '动漫']
|
||||
// 福利片关键词
|
||||
const r18KeyWords = ['福利', '激情', '伦理', '理论', '写真', '情色', '美女', '街拍', '赤足', '性感', '倫理', '里番']
|
||||
|
||||
zy.class(key).then(res => {
|
||||
var allClass = [{ name: '最新', tid: 0 }]
|
||||
res.class.forEach(element => {
|
||||
if (!classToHide.includes(element.name)) {
|
||||
allClass.push(element)
|
||||
if (this.setting.excludeR18Films) {
|
||||
var containKeyWord = false
|
||||
r18KeyWords.forEach(ele => {
|
||||
if (element && element.name && element.name.includes(ele)) {
|
||||
containKeyWord = true
|
||||
}
|
||||
})
|
||||
if (!containKeyWord) {
|
||||
allClass.push(element)
|
||||
}
|
||||
} else {
|
||||
allClass.push(element)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.classList = allClass
|
||||
|
||||
@@ -92,6 +92,9 @@
|
||||
<div class="zy-select">
|
||||
<div class="vs-placeholder vs-noAfter" @click="resetSites">重置源</div>
|
||||
</div>
|
||||
<div class="zy-checkbox">
|
||||
<input type="checkbox" v-model="setting.excludeR18Films" @change="updateExcludeR18FilmOption($event)"> 屏蔽福利片
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="theme">
|
||||
@@ -163,6 +166,7 @@ export default {
|
||||
},
|
||||
externalPlayer: '',
|
||||
editPlayerPath: false,
|
||||
excludeR18Films: false,
|
||||
d: {
|
||||
id: 0,
|
||||
site: '',
|
||||
@@ -171,7 +175,8 @@ export default {
|
||||
searchAllSites: true,
|
||||
view: 'picture',
|
||||
externalPlayer: '',
|
||||
editPlayerPath: false
|
||||
editPlayerPath: false,
|
||||
excludeR18Films: true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -208,7 +213,8 @@ export default {
|
||||
view: res.view,
|
||||
searchAllSites: res.searchAllSites,
|
||||
externalPlayer: res.externalPlayer,
|
||||
editPlayerPath: false
|
||||
editPlayerPath: false,
|
||||
excludeR18Films: res.excludeR18Films
|
||||
}
|
||||
this.setting = this.d
|
||||
})
|
||||
@@ -246,9 +252,11 @@ export default {
|
||||
},
|
||||
updateSearchOption (e) {
|
||||
this.d.searchAllSites = this.setting.searchAllSites
|
||||
setting.update(this.d).then(res => {
|
||||
this.setting = this.d
|
||||
})
|
||||
setting.update(this.setting)
|
||||
},
|
||||
updateExcludeR18FilmOption (e) {
|
||||
this.d.excludeR18Films = this.setting.excludeR18Films
|
||||
setting.update(this.setting)
|
||||
},
|
||||
exportFavorites () {
|
||||
this.getFavorites()
|
||||
|
||||
Reference in New Issue
Block a user