Skip to content
This repository was archived by the owner on Jun 14, 2021. It is now read-only.

Commit f798b94

Browse files
committed
feat: open in native player
1 parent 62b7fa9 commit f798b94

File tree

3 files changed

+32
-26
lines changed

3 files changed

+32
-26
lines changed

src/components/MetadataInfo.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
:tags="tags"
1616
:stars="stars"
1717
:series="series"
18-
v-on:addToBookmark="addToBookmark"
18+
@addToBookmark="addToBookmark"
1919
></MetadataInfoVideoInfo>
2020
</div>
2121
</a-col>
@@ -29,7 +29,7 @@
2929

3030
<a-modal title="Add to bookmark" v-model="addToBookmarkModal" @ok="addToBookmark(true)">
3131
<div v-if="bookmarks.length === 0">
32-
<a-alert type="error" message="You don't have a folder yet, please create one first." banner />
32+
<a-alert type="error" message="You don't have a bookmark yet, please create one first." banner />
3333
<br />
3434
</div>
3535
<p>Select your bookmark:</p>

src/components/MetadataInfoVideoList.vue

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
<template>
22
<a-table :columns="columns" :rowKey="'id'" :dataSource="data">
33
<a slot="name" slot-scope="text">{{text}}</a>
4+
<span slot="open" slot-scope="_url">
5+
<a-dropdown>
6+
<a class="ant-dropdown-link" @click="e => e.preventDefault()">
7+
Open In <a-icon type="down" />
8+
</a>
9+
<a-menu slot="overlay">
10+
<a-menu-item>
11+
<a :href="`iina://weblink?url=${_url}`" target="_blank">IINA</a>
12+
</a-menu-item>
13+
<a-menu-item>
14+
<a :href="`potplayer://${_url}`" target="_blank">PotPlayer</a>
15+
</a-menu-item>
16+
<a-menu-item>
17+
<a :href="`vlc://${_url}`" target="_blank">VLC</a>
18+
</a-menu-item>
19+
<a-menu-item>
20+
<a :href="`nplayer-${_url}`" target="_blank">nPlayer</a>
21+
</a-menu-item>
22+
</a-menu>
23+
</a-dropdown>
24+
</span>
425
<span slot="url" slot-scope="_url">
526
<a :href="_url" target="_blank">Link</a>
627
</span>
@@ -11,27 +32,14 @@
1132
{
1233
title: '#',
1334
dataIndex: 'id',
14-
key: 'id',
15-
width: 80
16-
},
17-
{
18-
title: 'Bit Rate',
19-
dataIndex: 'bitRate',
20-
key: 'bitRate',
21-
ellipsis: true
35+
key: 'id'
2236
},
2337
{
2438
title: 'Episode',
2539
dataIndex: 'episode',
2640
key: 'episode',
2741
ellipsis: true
2842
},
29-
{
30-
title: 'Video File Id',
31-
dataIndex: 'videoFileId',
32-
key: 'videoFileId',
33-
ellipsis: true
34-
},
3543
{
3644
title: 'Duration',
3745
dataIndex: 'duration',
@@ -45,10 +53,11 @@
4553
ellipsis: true
4654
},
4755
{
48-
title: 'Update Time',
49-
dataIndex: 'updateTime',
50-
key: 'updateTime',
51-
ellipsis: true
56+
title: 'Native Player',
57+
dataIndex: 'url',
58+
key: 'openIn',
59+
ellipsis: false,
60+
scopedSlots: { customRender: 'open' }
5261
},
5362
{
5463
title: 'Download',

src/components/MetadataListVideoCard.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<template>
22
<a-card hoverable style="width: 300px">
3-
<img
4-
alt="cover"
5-
class="cover"
6-
:src="JAVinfo.posterFileURL"
7-
slot="cover"
8-
/>
3+
<div slot="cover">
4+
<a :href="`/#/metadata/view/${JAVinfo.id}`"><img class="cover" alt="cover" :src="JAVinfo.posterFileURL" /></a>
5+
</div>
96
<a :href="`/#/metadata/view/${JAVinfo.id}`"><a-card-meta :title="`[${JAVinfo.JAVID}]` + JAVinfo.title" /></a>
107
<br />
118
<div class="tags">

0 commit comments

Comments
 (0)