Skip to content

Commit

Permalink
Fix player subtitle
Browse files Browse the repository at this point in the history
  • Loading branch information
gavingaozhangmin committed Aug 17, 2023
1 parent e86d027 commit 509a678
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/layout/PageVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,11 @@ const getSubTitleList = async (art: Artplayer) => {
},
{
html: '字幕列表',
tooltip: art.storage.get('subTitleListMode') ? '含子文件夹' : '同文件夹',
tooltip: art.storage.get('subTitleListMode') ? '子文件夹内' : '同文件夹内',
switch: art.storage.get('subTitleListMode'),
onSwitch: async (item: SettingOption) => {
item.tooltip = item.switch ? '同文件夹' : '含子文件夹'
art.storage.set('subTitleListMode', !item.switch)
art.storage.set('subTitleListMode', item.switch)
await getSubTitleList(art)
return !item.switch
}
Expand Down
5 changes: 4 additions & 1 deletion src/resPan/ResPanRight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ watchEffect(() => {
const keyboardStore = useKeyboardStore()
keyboardStore.$subscribe((_m: any, state: KeyboardState) => {
if (appStore.appTab != 'pan') return
if (appStore.appTab != 'resPan') {
console.log('appStore.appTab', appStore.appTab)
return
}
if (TestCtrl('a', state.KeyDownEvent, () => panfileStore.mSelectAll())) return
if (TestCtrl('c', state.KeyDownEvent, () => menuCopySelectedFile(false, 'copy'))) return
Expand Down
4 changes: 2 additions & 2 deletions src/setting/SettingUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ const handleCheckVer = () => {
<div class="settingspace"></div>
<div class="settinghead">检查更新</div>
<div class="settingrow">
<a-button type="outline" size="mini" tabindex="-1" :loading="verLoading" @click="handleCheckVer">检查更新</a-button>
<a-button type="outline" size="small" tabindex="-1" @click="handleCheckVer">检查更新</a-button>
</div>
<div class="settingspace"></div>
<div class='settinghead'>阿里云盘账号</div>
<div class='settingrow'>
<a-button type='outline' size='small' tabindex='-1' @click='copyCookies()'>
复制Cookies
复制Cookie
</a-button>
</div>
<div class="settingspace"></div>
Expand Down
8 changes: 7 additions & 1 deletion src/utils/openfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ export async function menuOpenFile(file: IAliGetFileModel): Promise<void> {
// 选择字幕
let subTitleFileId = ''
const { uiVideoPlayer, uiVideoSubtitleMode } = useSettingStore()
const listDataRaw = usePanFileStore().ListDataRaw || []
let listDataRaw = []
if (drive_id === token.backup_drive_id) {
listDataRaw = usePanFileStore().ListDataRaw || []
} else {
listDataRaw = useResPanFileStore().ListDataRaw || []
}

const subTitlesList = listDataRaw.filter(file => /srt|vtt|ass/.test(file.ext))
const isViolation = file.icon == 'iconweifa'
if (uiVideoPlayer === 'other' && uiVideoSubtitleMode === 'auto') {
Expand Down

0 comments on commit 509a678

Please sign in to comment.