Compare commits

..

7 Commits

Author SHA1 Message Date
algerkong
28364a756a 🔧 chore: 更新获取最新发布信息的 API URL 2025-05-12 09:26:55 +08:00
alger
49f7728eac feat: 更新至 v4.6.0 2025-05-11 21:51:42 +08:00
alger
890c0c86c1 🔧 chore: 尝试解决 windows 桌面歌词窗口标题出现的问题 2025-05-11 21:45:45 +08:00
alger
15f4ea4708 🔧 chore: 移除 MvPlayer 组件中未使用的 playerStore 引用,简化代码结构 2025-05-11 15:40:30 +08:00
Alger
dbb3fbcc09 Merge pull request #216 from algerkong/feat/search-music-play
 feat: 搜索列表添加下一首播放功能,修改播放逻辑搜索的歌曲点击播放不重新覆盖播放列表, 添加全部播放功能
2025-05-11 15:38:35 +08:00
alger
31640bb663 feat: 搜索列表添加下一首播放功能,修改播放逻辑搜索的歌曲点击播放不重新覆盖播放列表, 添加全部播放功能 2025-05-11 15:37:37 +08:00
Alger
10f4473c9d Merge pull request #215 from algerkong/feat/music-reparse
添加重新解析音乐功能
2025-05-11 15:13:00 +08:00
9 changed files with 85 additions and 35 deletions

View File

@@ -1,25 +1,27 @@
# 更新日志
## v4.5.0
## 更新时间 2025 年 4 月 29 日 23:50
## v4.6.0
> 如果更新遇到问题,请前往 <a href="http://donate.alger.fun/download" target="_blank">下载 AlgerMusicPlayer</a>
> 帮我点个 star <a href="https://github.com/algerkong/AlgerMusicPlayer" target="_blank">github star</a>
> 请我喝咖啡(支持作者) ☕️ <a href="http://donate.alger.fun/donate" target="_blank" style="color: red; font-weight: bold;">赏你</a>
> 帮我点个 star <a href="https://github.com/algerkong/AlgerMusicPlayer" target="_blank">github star</a>
> QQ群 976962720
### ✨ 新功能
- 添加远程控制功能,支持使用局域网链接地址远程控制音乐播放操作(默认关闭需要在设置中开启) ([c82ffd0](https://github.com/algerkong/AlgerMusicPlayer/commit/c82ffd0))#169
- 更新歌手数据加载逻辑,首页添加周杰伦歌手信息常驻 ([3069514](https://github.com/algerkong/AlgerMusicPlayer/commit/3069514))
- 增加音源重新解析功能 ([82a69d0](https://github.com/algerkong/AlgerMusicPlayer/commit/82a69d0))
- 搜索列表添加下一首播放功能,修改播放逻辑搜索的歌曲点击播放不重新覆盖播放列表,添加全部播放功能 ([31640bb](https://github.com/algerkong/AlgerMusicPlayer/commit/31640bb)) (#216)
- 增加windows和linux对arm64架构的支持([9f125f8](https://github.com/algerkong/AlgerMusicPlayer/commit/9f125f8))
- 添加"收藏"功能至托盘菜单 ([3c1a144](https://github.com/algerkong/AlgerMusicPlayer/commit/3c1a144))
- 修改将歌单列表改为页面 ([e2527c3](https://github.com/algerkong/AlgerMusicPlayer/commit/e2527c3))
### 🐛 Bug 修复
- 修复音乐播放重复声音的问题,添加锁机制,添加防抖机制,优化音频服务和快捷键处理逻辑 ([159dd03](https://github.com/algerkong/AlgerMusicPlayer/commit/159dd03)) (#173)
- 修复歌手页面数据加载不全问题 ([57424f9](https://github.com/algerkong/AlgerMusicPlayer/commit/57424f9)) (#165)
- 修复歌曲加入歌单失败问题 ([8045034](https://github.com/algerkong/AlgerMusicPlayer/commit/8045034))
### 🎨 优化
- 优化应用图标,更新应用图标资源 ([0128662](https://github.com/algerkong/AlgerMusicPlayer/commit/0128662))
- 优化设置页面,拆分组件 ([c98fa20](https://github.com/algerkong/AlgerMusicPlayer/commit/c98fa20))
- 优化设置模块,合并默认设置与存储设置,初始化时读取设置 ([0a22c7b](https://github.com/algerkong/AlgerMusicPlayer/commit/0a22c7b))
- 优化播放器逻辑,改进播放失败处理,支持保持当前索引并增加重试机制,优化操作锁逻辑,添加超时检查机制,确保操作锁在超时后自动释放,增加超时处理([8ed13d4](https://github.com/algerkong/AlgerMusicPlayer/commit/8ed13d4))、([cb58abb](https://github.com/algerkong/AlgerMusicPlayer/commit/cb58abb)) ([9cc064c](https://github.com/algerkong/AlgerMusicPlayer/commit/9cc064c))
- 更新 Electron 版本至 36.2.0,优化歌词视图的悬停效果 ([44f9709](https://github.com/algerkong/AlgerMusicPlayer/commit/44f9709))
- 更新音乐源设置([618c345](https://github.com/algerkong/AlgerMusicPlayer/commit/618c345))
- 修改 MiniPlayBar 组件,调整音量滑块的样式和交互方式,优化悬停效果 ([31ea3b7](https://github.com/algerkong/AlgerMusicPlayer/commit/31ea3b7))
- 优化 MvPlayer 组件的关闭逻辑,简化音频暂停处理 ([b3de2ae](https://github.com/algerkong/AlgerMusicPlayer/commit/b3de2ae))、([15f4ea4](https://github.com/algerkong/AlgerMusicPlayer/commit/15f4ea4))

View File

@@ -1,6 +1,6 @@
{
"name": "AlgerMusicPlayer",
"version": "4.5.0",
"version": "4.6.0",
"description": "Alger Music Player",
"author": "Alger <algerkc@qq.com>",
"main": "./out/main/index.js",

View File

@@ -6,7 +6,8 @@ export default {
},
button: {
clear: 'Clear',
back: 'Back'
back: 'Back',
playAll: 'Play All'
},
loading: {
more: 'Loading...',

View File

@@ -6,7 +6,8 @@ export default {
},
button: {
clear: '清空',
back: '返回'
back: '返回',
playAll: '播放列表'
},
loading: {
more: '加载中...',

View File

@@ -122,6 +122,8 @@ const createWin = () => {
}
});
lyricWindow.on('blur', () => lyricWindow && lyricWindow.setMaximizable(false))
return lyricWindow;
};

View File

@@ -193,7 +193,6 @@ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { getMvUrl } from '@/api/mv';
import { usePlayerStore } from '@/store/modules/player';
import { IMvItem } from '@/type/mv';
const { t } = useI18n();
@@ -222,7 +221,6 @@ const emit = defineEmits<{
(e: 'prev', loading: (value: boolean) => void): void;
}>();
const playerStore = usePlayerStore();
const mvUrl = ref<string>();
const playMode = ref<PlayMode>(PLAY_MODE.Auto);

View File

@@ -61,6 +61,14 @@
@click.stop="toggleFavorite"
></i>
</div>
<n-tooltip v-if="isNext" trigger="hover" :z-index="9999999" :delay="400">
<template #trigger>
<div class="song-item-operating-next" @click.stop="handlePlayNext">
<i class="iconfont ri-skip-forward-fill"></i>
</div>
</template>
{{ t('songItem.menu.playNext') }}
</n-tooltip>
<div
class="song-item-operating-play bg-gray-300 dark:bg-gray-800 animate__animated"
:class="{ 'bg-green-600': isPlaying, animate__flipInY: playLoading }"
@@ -110,6 +118,7 @@ const props = withDefaults(
selectable?: boolean;
selected?: boolean;
canRemove?: boolean;
isNext?: boolean;
}>(),
{
mini: false,
@@ -117,7 +126,8 @@ const props = withDefaults(
favorite: true,
selectable: false,
selected: false,
canRemove: false
canRemove: false,
isNext: false
}
);
@@ -475,6 +485,14 @@ const handlePlayNext = () => {
@apply mr-2 cursor-pointer ml-4 transition-all;
}
&-next {
@apply mr-2 cursor-pointer transition-all;
.iconfont {
@apply text-xl transition text-gray-500 dark:text-gray-400 hover:text-green-500;
}
}
.like-active {
@apply text-red-500 dark:text-red-500;
}

View File

@@ -129,20 +129,13 @@ export const getLatestReleaseInfo = async (): Promise<GithubReleaseInfo | null>
try {
const token = import.meta.env.VITE_GITHUB_TOKEN;
const headers = {};
// 获取代理节点列表
const proxyHosts = await getProxyNodes();
// 构建 API URL 列表
const apiUrls = [
// 原始地址
'https://api.github.com/repos/algerkong/AlgerMusicPlayer/releases/latest',
// 使用代理节点
...proxyHosts.map(
(host) =>
`${host}/https://raw.githubusercontent.com/algerkong/AlgerMusicPlayer/dev_electron/package.json`
)
'https://mc.alger.fun/package.json',
];
if (token) {

View File

@@ -37,6 +37,12 @@
@click="searchDetail = null"
></i>
{{ hotKeyword }}
<div v-if="searchDetail?.songs?.length" class="title-play-all">
<div class="play-all-btn" @click="handlePlayAll">
<i class="ri-play-circle-fill"></i>
<span>{{ t('search.button.playAll') }}</span>
</div>
</div>
</div>
<div v-loading="searchDetailLoading" class="search-list-box">
<template v-if="searchDetail">
@@ -46,7 +52,7 @@
v-for="(item, index) in searchDetail?.bilibili"
:key="item.bvid"
:class="setAnimationClass('animate__bounceInRight')"
:style="setAnimationDelay(index, 50)"
:style="getSearchListAnimation(index)"
>
<bilibili-item :item="item" @play="handlePlayBilibili" />
</div>
@@ -62,9 +68,9 @@
v-for="(item, index) in searchDetail?.songs"
:key="item.id"
:class="setAnimationClass('animate__bounceInRight')"
:style="setAnimationDelay(index, 50)"
:style="getSearchListAnimation(index)"
>
<song-item :item="item" @play="handlePlay" />
<song-item :item="item" @play="handlePlay" :is-next="true" />
</div>
<template v-for="(list, key) in searchDetail">
<template v-if="key.toString() !== 'songs'">
@@ -73,7 +79,7 @@
:key="item.id"
class="mb-3"
:class="setAnimationClass('animate__bounceInRight')"
:style="setAnimationDelay(index, 50)"
:style="getSearchListAnimation(index)"
>
<search-item :item="item" />
</div>
@@ -104,7 +110,7 @@
v-for="(item, index) in searchHistory"
:key="index"
:class="setAnimationClass('animate__bounceIn')"
:style="setAnimationDelay(index, 50)"
:style="getSearchListAnimation(index)"
class="search-history-item"
round
closable
@@ -162,6 +168,10 @@ const hasMore = ref(true);
const isLoadingMore = ref(false);
const currentKeyword = ref('');
const getSearchListAnimation = (index: number) => {
return setAnimationDelay(index % ITEMS_PER_PAGE, 50);
};
// 从 localStorage 加载搜索历史
const loadSearchHistory = () => {
const history = localStorage.getItem('searchHistory');
@@ -398,9 +408,9 @@ watch(
{ immediate: true }
);
const handlePlay = () => {
const tracks = searchDetail.value?.songs || [];
playerStore.setPlayList(tracks);
const handlePlay = (item: any) => {
// 添加到下一首
playerStore.addToNextPlay(item);
};
// 点击搜索历史
@@ -418,6 +428,18 @@ const handlePlayBilibili = (item: IBilibiliSearchResult) => {
// 使用路由导航到B站播放页面
router.push(`/bilibili/${item.bvid}`);
};
const handlePlayAll = () => {
if (!searchDetail.value?.songs?.length) return;
// 设置播放列表为搜索结果中的所有歌曲
playerStore.setPlayList(searchDetail.value.songs);
// 开始播放第一首歌
if (searchDetail.value.songs[0]) {
playerStore.setPlay(searchDetail.value.songs[0]);
}
};
</script>
<style lang="scss" scoped>
@@ -469,8 +491,21 @@ const handlePlayBilibili = (item: IBilibiliSearchResult) => {
}
.title {
@apply text-xl font-bold my-2 mx-4;
@apply text-xl font-bold my-2 mx-4 flex items-center;
@apply text-gray-900 dark:text-white;
&-play-all {
@apply ml-auto;
}
}
.play-all-btn {
@apply flex items-center gap-1 px-3 py-1 rounded-full cursor-pointer transition-all;
@apply text-sm font-normal text-gray-900 dark:text-white hover:bg-light-300 dark:hover:bg-dark-300 hover:text-green-500;
i {
@apply text-xl;
}
}
.search-history {