收藏页面播放,无需再查看历史记录,收藏数据已包含

This commit is contained in:
haiyangcui
2020-10-30 13:52:09 +01:00
parent 483449aad8
commit 16e8ef2c4a

View File

@@ -114,7 +114,7 @@
</template>
<script>
import { mapMutations } from 'vuex'
import { star, history, sites, setting } from '../lib/dexie'
import { star, sites, setting } from '../lib/dexie'
import zy from '../lib/site/tools'
import { remote } from 'electron'
import fs from 'fs'
@@ -198,9 +198,8 @@ export default {
}
},
async playEvent (e) {
const db = await history.find({ site: e.key, ids: e.ids })
if (db) {
this.video = { key: e.key, info: { id: db.ids, name: db.name, index: db.index } }
if (e.index) {
this.video = { key: e.key, info: { id: e.ids, name: e.name, index: e.index } }
} else {
this.video = { key: e.key, info: { id: e.ids, name: e.name, index: 0 } }
}