mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-09 07:22:36 +08:00
Merge remote-tracking branch 'co/master'
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"axios": "^0.21.0",
|
||||
"cheerio": "^1.0.0-rc.3",
|
||||
"child_process": "^1.0.2",
|
||||
"core-js": "^3.6.5",
|
||||
"core-js": "^3.7.0",
|
||||
"cors": "^2.8.5",
|
||||
"dexie": "^3.0.2",
|
||||
"electron-localshortcut": "^3.2.1",
|
||||
@@ -60,12 +60,12 @@
|
||||
"electron": "^10.1.5",
|
||||
"electron-devtools-installer": "^3.1.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-standard": "^4.0.0",
|
||||
"eslint-plugin-standard": "^4.0.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"sass": "^1.26.5",
|
||||
"sass": "^1.29.0",
|
||||
"sass-loader": "^8.0.2",
|
||||
"vue-cli-plugin-electron-builder": "2.0.0-rc.4",
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
|
||||
@@ -253,6 +253,19 @@
|
||||
text-align: center;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.progress{
|
||||
position: absolute;
|
||||
bottom: 10%;
|
||||
left: 0%;
|
||||
width: 40%;
|
||||
background-color: #111111aa;
|
||||
color: #f8df70;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
font-weight: bolder;
|
||||
text-align: left;
|
||||
}
|
||||
.update{
|
||||
position: absolute;
|
||||
top: 5%;
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
<el-table-column
|
||||
prop="index"
|
||||
width="180"
|
||||
label="集数进度">
|
||||
label="观看至">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.detail.m3u8List !== undefined && scope.row.detail.m3u8List.length > 1">
|
||||
<span v-if="scope.row.detail && scope.row.detail.m3u8List && scope.row.detail.m3u8List.length > 1">
|
||||
第{{ scope.row.index + 1 }}集(共{{scope.row.detail.m3u8List.length}}集)
|
||||
</span>
|
||||
</template>
|
||||
@@ -70,7 +70,7 @@
|
||||
<template slot="item" slot-scope="props">
|
||||
<div class="card">
|
||||
<div class="img">
|
||||
<img style="width: 100%" :src="props.data.detail.pic" alt="" @load="$refs.historyWaterfall.refresh()" @click="detailEvent(props.data)">
|
||||
<img v-if="props.data.detail && props.data.detail.pic" style="width: 100%" :src="props.data.detail.pic" alt="" @load="$refs.historyWaterfall.refresh()" @click="detailEvent(props.data)">
|
||||
<div class="operate">
|
||||
<div class="operate-wrap">
|
||||
<span class="o-play" @click="playEvent(props.data)">播放</span>
|
||||
@@ -82,15 +82,12 @@
|
||||
</div>
|
||||
<div class="name" @click="detailEvent(props.data)">{{props.data.name}}</div>
|
||||
<div class="info">
|
||||
<span v-if="props.data.time && props.data.duration">
|
||||
进度:
|
||||
</span>
|
||||
<span v-if="props.data.detail.m3u8List !== undefined && props.data.detail.m3u8List.length > 1">
|
||||
第{{ props.data.index + 1 }}集(共{{props.data.detail.m3u8List.length}}集)
|
||||
</span>
|
||||
<span v-if="props.data.time && props.data.duration">
|
||||
<span v-if="props.data.time && props.data.duration">
|
||||
{{fmtMSS(props.data.time.toFixed(0))}}/{{fmtMSS(props.data.duration.toFixed(0))}}
|
||||
</span>
|
||||
<span v-if="props.data.detail && props.data.detail.m3u8List !== undefined && props.data.detail.m3u8List.length > 1">
|
||||
第{{ props.data.index + 1 }}集(共{{props.data.detail.m3u8List.length}}集)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -159,6 +156,7 @@ export default {
|
||||
view () {
|
||||
this.getAllhistory()
|
||||
this.getAllsites()
|
||||
this.$refs.historyWaterfall.refresh()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -338,6 +336,15 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
this.rowDrop()
|
||||
window.addEventListener('resize', () => {
|
||||
if (this.$refs.historyWaterfall && this.view === 'History') {
|
||||
this.$refs.historyWaterfall.resize()
|
||||
this.$refs.historyWaterfall.refresh()
|
||||
setTimeout(() => {
|
||||
this.$refs.historyWaterfall.refresh()
|
||||
}, 500)
|
||||
}
|
||||
}, false)
|
||||
},
|
||||
created () {
|
||||
this.getAllhistory()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="listpage-header" id="iptv-header" v-show="enableBatchEdit">
|
||||
<el-switch v-model="enableBatchEdit" active-text="批处理分组"></el-switch>
|
||||
<el-input placeholder="新组名" v-model="batchGroupName"></el-input>
|
||||
<el-switch v-model="batchIsActive" :active-value="1" :inactive-value="0" active-text="启用"></el-switch>
|
||||
<el-switch v-model="batchIsActive" active-text="启用"></el-switch>
|
||||
<el-button type="primary" icon="el-icon-edit" @click.stop="saveBatchEdit">保存</el-button>
|
||||
<el-button @click.stop="removeSelectedChannels" icon="el-icon-delete-solid">删除</el-button>
|
||||
</div>
|
||||
@@ -45,14 +45,12 @@
|
||||
prop="isActive"
|
||||
width="120"
|
||||
align="center"
|
||||
:filters = "[{text:'启用', value: 1}, {text:'停用', value: 0}]"
|
||||
:filters = "[{text:'启用', value: true}, {text:'停用', value: false}]"
|
||||
:filter-method="(value, row) => value === row.isActive"
|
||||
label="启用">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isActive"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@click.native.stop='isActiveChangeEvent(scope.row)'>
|
||||
</el-switch>
|
||||
</template>
|
||||
@@ -119,7 +117,7 @@ export default {
|
||||
searchRecordList: [],
|
||||
enableBatchEdit: false,
|
||||
batchGroupName: '',
|
||||
batchIsActive: 1,
|
||||
batchIsActive: true,
|
||||
shiftDown: false,
|
||||
selectionBegin: '',
|
||||
selectionEnd: '',
|
||||
@@ -307,7 +305,7 @@ export default {
|
||||
id: id,
|
||||
name: ele.name,
|
||||
url: ele.url,
|
||||
isActive: 1,
|
||||
isActive: true,
|
||||
group: this.determineGroup(ele.name)
|
||||
}
|
||||
id += 1
|
||||
@@ -324,7 +322,7 @@ export default {
|
||||
id: id,
|
||||
name: ele.name,
|
||||
url: ele.url,
|
||||
isActive: ele.isActive === undefined ? 1 : ele.isActive,
|
||||
isActive: ele.isActive === undefined ? true : ele.isActive,
|
||||
group: this.determineGroup(ele.name)
|
||||
}
|
||||
id += 1
|
||||
@@ -376,6 +374,11 @@ export default {
|
||||
},
|
||||
getChannels () {
|
||||
iptv.all().then(res => {
|
||||
res.forEach(ele => {
|
||||
if (ele.isActive === undefined) {
|
||||
ele.isActive = true
|
||||
}
|
||||
})
|
||||
this.iptvList = res
|
||||
})
|
||||
},
|
||||
@@ -489,7 +492,7 @@ export default {
|
||||
row.status = '可用'
|
||||
} else {
|
||||
row.status = '失效'
|
||||
row.isActive = 0
|
||||
row.isActive = false
|
||||
}
|
||||
iptv.remove(row.id)
|
||||
iptv.add(row)
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="sortKeyword" size="small" placeholder="排序" :popper-append-to-body="false">排序
|
||||
<el-option
|
||||
v-for="item in sortKeywords"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button :loading="loading" @click.stop="updateEvent" icon="el-icon-refresh">更新推荐</el-button>
|
||||
</div>
|
||||
<div class="listpage-body" id="recommendataions-body" >
|
||||
@@ -132,7 +140,9 @@ export default {
|
||||
types: [],
|
||||
selectedTypes: [],
|
||||
areas: [],
|
||||
selectedAreas: []
|
||||
selectedAreas: [],
|
||||
sortKeyword: '',
|
||||
sortKeywords: ['上映', '评分', '默认']
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -183,6 +193,27 @@ export default {
|
||||
this.getRecommendations()
|
||||
this.$refs.recommendataionsWaterfall.refresh()
|
||||
}
|
||||
},
|
||||
sortKeyword () {
|
||||
switch (this.sortKeyword) {
|
||||
case '上映':
|
||||
this.recommendations = this.recommendations.sort(function (a, b) {
|
||||
return b.detail.year - a.detail.year
|
||||
})
|
||||
break
|
||||
case '评分':
|
||||
this.recommendations.sort(function (a, b) {
|
||||
return b.rate - a.rate
|
||||
})
|
||||
break
|
||||
case '默认':
|
||||
this.recommendations.sort(function (a, b) {
|
||||
return b.id - a.id
|
||||
})
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -100,6 +100,11 @@
|
||||
<div class="update" v-if="props.data.hasUpdate">
|
||||
<span>有更新</span>
|
||||
</div>
|
||||
<div class="progress" v-if="props.data.index && props.data.detail && props.data.detail.m3u8List !== undefined && props.data.detail.m3u8List.length > 1">
|
||||
<span>
|
||||
看至第{{ props.data.index + 1 }}集
|
||||
</span>
|
||||
</div>
|
||||
<img style="width: 100%" :src="props.data.detail.pic" alt="" @load="$refs.starWaterfall.refresh()" @click="detailEvent(props.data)">
|
||||
<div class="operate">
|
||||
<div class="operate-wrap">
|
||||
|
||||
@@ -6,14 +6,14 @@ const db = new Dexie('zy')
|
||||
db.version(4).stores({
|
||||
search: '++id, keywords',
|
||||
iptvSearch: '++id, keywords',
|
||||
setting: 'id, theme, site, shortcut, view, externalPlayer, searchAllSites, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommendationViewMode, password',
|
||||
setting: 'id, theme, site, shortcut, view, externalPlayer, searchAllSites, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommendationViewMode, historyViewMode, password',
|
||||
shortcut: 'name, key, desc',
|
||||
star: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
recommendation: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
sites: '++id, key, name, api, download, isActive, group',
|
||||
history: '++id, [site+ids], name, type, year, index, time, detail',
|
||||
history: '++id, [site+ids], name, type, year, index, time, duration, detail',
|
||||
mini: 'id, site, ids, name, index, time',
|
||||
iptv: '++id, name, url, isActive, group'
|
||||
iptv: '++id, name, url, group, isActive'
|
||||
})
|
||||
|
||||
db.on('populate', () => {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user