获取其他源时,排除当前源

This commit is contained in:
haiyangcui
2020-11-01 18:03:33 +01:00
parent 747abf3b26
commit bb9a8ca65d

View File

@@ -747,7 +747,8 @@ export default {
async getOtherSites () {
this.right.other = []
sites.all().then(sitesRes => {
for (const siteItem of sitesRes.filter(x => x.isActive)) {
// 排除已关闭的源和当前源
for (const siteItem of sitesRes.filter(x => x.isActive && x.key !== this.video.key)) {
zy.search(siteItem.key, this.name).then(searchRes => {
const type = Object.prototype.toString.call(searchRes)
if (type === '[object Array]') {