Skip to content

Commit bafe820

Browse files
authored
publish 0.0.5
publish 0.0.5
2 parents 106d76d + 8265f42 commit bafe820

File tree

10 files changed

+417
-8
lines changed

10 files changed

+417
-8
lines changed

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
`2024-06.25 v0.0.5`
2+
【修复】修复重启软件后歌单丢失的问题;如果未出现上述问题可忽略此版本更新
3+
14
`2024-06.16 v0.0.4`
25

36
1. 【功能】播放列表支持拖拽排序

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "musicfree-desktop",
33
"productName": "MusicFree",
4-
"version": "0.0.4",
4+
"version": "0.0.5",
55
"description": "一个插件化的音乐播放器",
66
"main": ".webpack/main",
77
"scripts": {

release/version.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2-
"version": "0.0.4",
2+
"version": "0.0.5",
33
"changeLog": [
4+
"【修复】修复重启软件后歌单丢失的问题;如果未出现上述问题可忽略此版本更新",
5+
"--- 以下为 0.0.4 更新 ---",
46
"1. 【功能】播放列表支持拖拽排序",
57
"2. 【功能】支持多语言。本次支持简体中文、繁体中文、英文、西班牙语",
68
"3. 【功能】支持歌词翻译功能(需要插件实现getLyric方法)",
@@ -12,5 +14,5 @@
1214
"9. 【修复】修复部分情况下本地歌词无法读取的问题",
1315
"10. 【修复】修复 linux 托盘点击无效的问题"
1416
],
15-
"download": ["https://www.123pan.com/s/grz2jv-XimAA.html"]
17+
"download": ["https://www.123pan.com/s/grz2jv-CjmAA.html"]
1618
}

res/lang/ru-RU.json

+395
Large diffs are not rendered by default.

src/main/tray/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ export async function setupTrayMenu() {
266266
export function setTrayTitle(str: string) {
267267
if (!str || !str.length) {
268268
tray.setTitle("");
269+
return;
269270
}
270271
if (str.length > 7) {
271272
tray?.setTitle(" " + str.slice(0) + "...");

src/renderer/components/Modal/templates/AddMusicToSheet/index.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import MusicSheet from "@/renderer/core/music-sheet";
1+
import MusicSheet, { defaultSheet } from "@/renderer/core/music-sheet";
22
import Base from "../Base";
33
import "./index.scss";
44
import { setFallbackAlbum } from "@/renderer/utils/img-on-error";
@@ -61,7 +61,11 @@ export default function AddMusicToSheet(props: IAddMusicToSheetProps) {
6161
src={sheet.artwork ?? albumImg}
6262
onError={setFallbackAlbum}
6363
></img>
64-
<span>{sheet.title}</span>
64+
<span>
65+
{sheet.id === defaultSheet.id
66+
? t("media.default_favorite_sheet_name")
67+
: sheet.title}
68+
</span>
6569
</div>
6670
))}
6771
</div>

src/renderer/core/music-sheet/backend/index.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ export function getAllStarredSheets() {
5151
export async function queryAllSheets() {
5252
try {
5353
// 读取全部歌单
54-
const allSheets = await musicSheetDB.sheets
55-
.orderBy("$$sortIndex")
56-
.toArray();
54+
const allSheets = await musicSheetDB.sheets.toArray();
5755
const dbDefaultSheet = allSheets.find(
5856
(item) => item.id === defaultSheet.id
5957
);

src/renderer/core/music-sheet/common/default-sheet.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ export default {
66
title: i18n.t("media.default_favorite_sheet_name"),
77
platform: localPluginName,
88
musicList: [],
9+
$$sortIndex: -1,
910
$sortIndex: -1,
1011
};

src/shared/global-context/main.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { BrowserWindow, app, ipcMain } from "electron";
22
import { IpcRendererEvt } from "./internal/common";
3+
import path from "path";
34

45
declare const WORKER_DOWNLOADER_WEBPACK_ENTRY: string;
56
declare const LOCAL_FILE_WATCHER_WEBPACK_ENTRY: string;
@@ -18,6 +19,9 @@ export function setupGlobalContext() {
1819
downloads: app.getPath("downloads"),
1920
temp: app.getPath("temp"),
2021
userData: app.getPath("userData"),
22+
res: app.isPackaged
23+
? path.resolve(process.resourcesPath, "res")
24+
: path.resolve(__dirname, "../../res"),
2125
},
2226
platform: process.platform,
2327
};

src/shared/global-context/type.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface IGlobalContext {
1313
userData: string;
1414
temp: string;
1515
downloads: string;
16+
res: string;
1617
};
1718
platform: NodeJS.Platform;
1819
}

0 commit comments

Comments
 (0)