优化换源机制
parent
6a6f9a53bd
commit
38bea3ced1
|
@ -4,7 +4,7 @@
|
|||
- 新增设置-播放详情页设置-延迟歌词滚动设置(#1985)
|
||||
- 新增鼠标在音量按钮使用滚轮时可以调整音量大小的功能(#2000)
|
||||
- 新增设置-下载设置-同时下载任务数设置(#1498)
|
||||
- 新增 我的列表-换源播放 功能,换源后下次再播放该列表的该歌曲时将优先尝试播放所选源的歌曲,该功能允许你手动指定来源以解决自动换源失败或者换源不准确的问题
|
||||
- 新增 我的列表-歌曲右击菜单-歌曲换源 功能,换源后下次再播放该列表的该歌曲时将优先尝试播放所选源的歌曲,该功能允许你手动指定来源以解决自动换源失败或者换源不准确的问题
|
||||
|
||||
### 优化
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
"list__source_detail": "歌曲详情页",
|
||||
"list__start": "开始任务",
|
||||
"list__sync": "更新",
|
||||
"list__toggle_source": "手动换源",
|
||||
"list__toggle_source": "歌曲换源",
|
||||
"list_add__btn_title": "把该歌曲添加到 {name}",
|
||||
"list_add__multiple_btn_title": "把这些歌曲添加到 {name}",
|
||||
"list_add__multiple_title_add": "添加已选的 {num} 首歌曲到...",
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
"list__source_detail": "歌曲詳情頁",
|
||||
"list__start": "開始任務",
|
||||
"list__sync": "更新",
|
||||
"list__toggle_source": "手動換源",
|
||||
"list__toggle_source": "歌曲換源",
|
||||
"list_add__btn_title": "把該歌曲加到 {name}",
|
||||
"list_add__multiple_btn_title": "把這些歌曲加到 {name}",
|
||||
"list_add__multiple_title_add": "新增已選取的 {num} 首歌曲到...",
|
||||
|
|
|
@ -59,7 +59,7 @@ export default {
|
|||
},
|
||||
supportQuality,
|
||||
|
||||
async searchMusic({ name, singer, source: s, limit = 10 }) {
|
||||
async searchMusic({ name, singer, source: s, limit = 25 }) {
|
||||
const trimStr = str => typeof str == 'string' ? str.trim() : str
|
||||
const musicName = trimStr(name)
|
||||
const tasks = []
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<material-modal :show="show" teleport="#view" bg-close @close="handleClose">
|
||||
<material-modal :show="show" teleport="#view" bg-close height="100%" @close="handleClose">
|
||||
<main :class="$style.main">
|
||||
<base-tab v-model="source" :class="$style.tab" :list="tabs" />
|
||||
<div class="scroll" :class="$style.list">
|
||||
<template v-if="list.length">
|
||||
<div v-for="(item, index) in list" :key="item.id" :class="$style.listItem">
|
||||
<div :class="$style.num">{{ index + 1 }}</div>
|
||||
<div v-for="item in list" :key="item.id" :class="$style.listItem">
|
||||
<!-- <div :class="$style.num">{{ index + 1 }}</div> -->
|
||||
<div :class="$style.textContent">
|
||||
<h3 :class="$style.text" :aria-label="`${item.name} - ${item.singer}`">{{ item.name }}</h3>
|
||||
<h3 v-if="item.meta.albumName" :class="[$style.text, $style.albumName]" :aria-label="item.meta.albumName">
|
||||
{{ item.singer }}
|
||||
<span v-if="item.meta.albumName"> - {{ item.meta.albumName }}</span>
|
||||
<span v-if="item.meta.albumName"> / {{ item.meta.albumName }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div :class="$style.label">{{ item.interval }}</div>
|
||||
|
@ -39,7 +39,7 @@
|
|||
</div>
|
||||
<div :class="$style.singer">
|
||||
{{ musicInfo.singer }}
|
||||
<span v-if="musicInfo.meta.albumName"> - {{ musicInfo.meta.albumName }}</span>
|
||||
<span v-if="musicInfo.meta.albumName"> / {{ musicInfo.meta.albumName }}</span>
|
||||
</div>
|
||||
</h2>
|
||||
<template v-if="toggleMusicInfo">
|
||||
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
<div :class="$style.singer">
|
||||
{{ toggleMusicInfo.singer }}
|
||||
<span v-if="toggleMusicInfo.meta.albumName"> - {{ toggleMusicInfo.meta.albumName }}</span>
|
||||
<span v-if="toggleMusicInfo.meta.albumName"> / {{ toggleMusicInfo.meta.albumName }}</span>
|
||||
</div>
|
||||
</h2>
|
||||
</template>
|
||||
|
@ -172,9 +172,14 @@ export default {
|
|||
min-height: 0;
|
||||
// max-height: 100%;
|
||||
// overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
.tab {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.list {
|
||||
flex: auto;
|
||||
min-height: 200px;
|
||||
min-width: 460px;
|
||||
// background-color: @color-search-form-background;
|
||||
|
@ -188,7 +193,7 @@ export default {
|
|||
padding: 10px 5px;
|
||||
transition: background-color .2s ease;
|
||||
line-height: 1.4;
|
||||
height: 100%;
|
||||
// height: 100%;
|
||||
// overflow: hidden;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
|
@ -213,7 +218,6 @@ export default {
|
|||
}
|
||||
.textContent {
|
||||
flex: auto;
|
||||
padding-left: 5px;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
|
@ -276,11 +280,11 @@ export default {
|
|||
|
||||
.noItem {
|
||||
position: relative;
|
||||
height: 200px;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
|
||||
p {
|
||||
font-size: 16px;
|
||||
|
@ -290,6 +294,7 @@ export default {
|
|||
}
|
||||
|
||||
.footer {
|
||||
flex: none;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
|
|
|
@ -3,6 +3,7 @@ import { ref, nextTick } from '@common/utils/vueTools'
|
|||
import { updateListMusics } from '@renderer/store/list/listManage'
|
||||
import { playList } from '@renderer/core/player'
|
||||
import { getListMusicsFromCache } from '@renderer/store/list/action'
|
||||
import { playMusicInfo } from '@renderer/store/player/state'
|
||||
|
||||
export default (props, list) => {
|
||||
const isShowMusicToggleModal = ref(false)
|
||||
|
@ -37,7 +38,9 @@ export default (props, list) => {
|
|||
])
|
||||
const rawInfo = getListMusicsFromCache(props.listId)[index]
|
||||
rawInfo.meta.toggleMusicInfo = toggleMusicInfo
|
||||
playList(props.listId, index)
|
||||
if (toggleMusicInfo || (playMusicInfo.listId == props.listId && playMusicInfo.musicInfo?.id == rawInfo.id)) {
|
||||
playList(props.listId, index)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue