diff --git a/src/components/Detail.vue b/src/components/Detail.vue
index 6c08233..cfbde8f 100644
--- a/src/components/Detail.vue
+++ b/src/components/Detail.vue
@@ -181,11 +181,7 @@ export default {
ids: this.info.id,
site: this.detail.site,
name: this.info.name,
- type: this.info.type,
- year: this.info.year,
- note: this.info.note,
- last: this.info.last
-
+ detail: this.info
}
star.add(docs).then(res => {
this.$message.success('收藏成功')
diff --git a/src/components/Film.vue b/src/components/Film.vue
index b700721..552315f 100644
--- a/src/components/Film.vue
+++ b/src/components/Film.vue
@@ -331,18 +331,17 @@ export default {
if (db) {
this.$message.info('已存在')
} else {
- const docs = {
- key: site.key,
- ids: e.id,
- site: site,
- name: e.name,
- type: e.type,
- year: e.year,
- last: e.last,
- note: e.note
- }
- star.add(docs).then(res => {
- this.$message.success('收藏成功')
+ zy.detail(site.key, e.id).then(detailRes => {
+ const docs = {
+ key: site.key,
+ ids: e.id,
+ site: site,
+ name: e.name,
+ detail: detailRes
+ }
+ star.add(docs).then(res => {
+ this.$message.success('收藏成功')
+ })
})
}
},
diff --git a/src/components/Play.vue b/src/components/Play.vue
index a9eeca5..7335060 100644
--- a/src/components/Play.vue
+++ b/src/components/Play.vue
@@ -532,19 +532,18 @@ export default {
}
})
} else {
- const docs = {
- key: this.video.key,
- ids: info.id,
- name: info.name,
- type: info.type,
- year: info.year,
- last: info.last,
- note: info.note,
- index: info.index
- }
- star.add(docs).then(res => {
- this.$message.success('收藏成功')
- this.isStar = true
+ zy.detail(this.video.key, info.id).then(detailRes => {
+ const docs = {
+ key: this.video.key,
+ ids: info.id,
+ name: info.name,
+ detail: detailRes,
+ index: info.index
+ }
+ star.add(docs).then(res => {
+ this.$message.success('收藏成功')
+ this.isStar = true
+ })
})
}
},
diff --git a/src/components/Star.vue b/src/components/Star.vue
index f75435b..7961f09 100644
--- a/src/components/Star.vue
+++ b/src/components/Star.vue
@@ -21,34 +21,34 @@
label="片名">
{{ getSiteName(scope.row.key) }}
-
@@ -207,24 +207,19 @@ export default {
}
},
updateEvent (e) {
- zy.detail(e.key, e.ids).then(res => {
+ zy.detail(e.key, e.ids).then(detailRes => {
var doc = {
id: e.id,
key: e.key,
- ids: res.id,
- site: res.site,
- name: res.name,
- type: res.type,
- year: res.year,
- note: res.note,
- index: res.index,
- last: res.last,
- hasUpdate: res.hasUpdate
+ ids: e.ids,
+ site: e.site,
+ name: e.name,
+ detail: detailRes,
+ index: e.index
}
star.get(e.id).then(resStar => {
- doc.hasUpdate = resStar.hasUpdate
var msg = ''
- if (e.last === res.last) {
+ if (e.detail.last === detailRes.last) {
msg = `同步"${e.name}"成功, 未查询到更新。`
this.$message.info(msg)
} else {
@@ -352,12 +347,19 @@ export default {
ids: ele.ids,
site: ele.site === undefined ? ele.site = this.sites.find(x => x.key === ele.key) : ele.site,
name: ele.name,
- type: ele.type,
- year: ele.year,
- note: ele.note,
+ hasUpdate: ele.hasUpdate,
index: ele.index,
- last: ele.last,
- hasUpdate: ele.hasUpdate
+ detail: ele.detail === undefined ? {
+ director: ele.director,
+ actor: ele.actor,
+ type: ele.type,
+ area: ele.area,
+ lang: ele.lang,
+ year: ele.year,
+ last: ele.last,
+ note: ele.note,
+ rate: ele.rate
+ } : ele.detail
}
starList.push(doc)
}
diff --git a/src/lib/dexie/dexie.js b/src/lib/dexie/dexie.js
index 86d4140..f6b1214 100644
--- a/src/lib/dexie/dexie.js
+++ b/src/lib/dexie/dexie.js
@@ -8,7 +8,7 @@ db.version(4).stores({
iptvSearch: '++id, keywords',
setting: 'id, theme, site, shortcut, view, externalPlayer, searchAllSites, excludeRootClasses, excludeR18Films, forwardTimeInSec',
shortcut: 'name, key, desc',
- star: '++id, [key+ids], site, name, type, year, note, index, last, hasUpdate',
+ star: '++id, [key+ids], site, name, detail, index, hasUpdate',
sites: '++id, key, name, api, download, isActive, group',
history: '++id, [site+ids], name, type, year, index, time',
mini: 'id, site, ids, name, index, time',