diff --git a/0002-modify-version-is-error.patch b/0002-modify-version-is-error.patch new file mode 100644 index 0000000..1c66e15 --- /dev/null +++ b/0002-modify-version-is-error.patch @@ -0,0 +1,427 @@ +From 9df3962f678c098f307454dcfe86863a816a6a49 Mon Sep 17 00:00:00 2001 +From: pei-jiankang +Date: Thu, 7 Apr 2022 13:33:57 +0800 +Subject: [PATCH] modify version is error + +--- + menumodule.cpp | 22 ++++ + translations/kylin-music_zh_CN.ts | 210 +++++++++++++++--------------- + 2 files changed, 127 insertions(+), 105 deletions(-) + +diff --git a/menumodule.cpp b/menumodule.cpp +index 806c98d..40472c3 100644 +--- a/menumodule.cpp ++++ b/menumodule.cpp +@@ -237,6 +237,28 @@ QVBoxLayout* menuModule::initBody(){ + // bodyAppName->setText(tr(appShowingName.toLocal8Bit())); + bodyAppName->setText(tr("kylin music")); + bodyAppName->setStyleSheet("font-size:18px;"); ++ FILE *pp = NULL; ++ char *line = NULL; ++ char *q = NULL; ++ size_t len = 0; ++ ssize_t read; ++ ++ pp = popen("rpm -qa kylin-music", "r"); ++ if(pp) { while((read = getline(&line, &len, pp)) != -1){ ++ q = strrchr(line, '\n'); ++ *q = '\0'; ++ QString content = line; ++ QStringList list = content.split("-"); ++ if (list.size() >= 3) ++ appVersion = list.at(2); ++ } ++ } ++ if(line){ ++ free(line); ++ line = NULL; ++ } ++ pclose(pp); ++ + QLabel* bodyAppVersion = new QLabel(); + bodyAppVersion->setFixedHeight(24); + bodyAppVersion->setText(tr("Version: ") + appVersion); +diff --git a/translations/kylin-music_zh_CN.ts b/translations/kylin-music_zh_CN.ts +index e45eb8f..8e8a3c0 100644 +--- a/translations/kylin-music_zh_CN.ts ++++ b/translations/kylin-music_zh_CN.ts +@@ -121,40 +121,40 @@ + 播放/暂停 + + +- ++ + Kylin music + 麒麟音乐 + + +- ++ + maximize + 最大化 + + +- ++ + reduction + 还原 + + +- ++ + rename + 重命名 + + +- ++ + Delete the playlist + 删除歌单 + + +- +- +- +- ++ ++ ++ ++ + play + 播放 + + +- ++ + The following piece + 下一首 + +@@ -163,69 +163,69 @@ + 添加到我喜欢 + + +- ++ + Remove from the song list + 从歌曲列表中删除 + + +- ++ + Add to playlist + 添加到歌单 + + +- ++ + Song information + 歌曲信息 + + +- ++ + pause + 暂停 + + +- ++ + The song name: + 歌曲名称: + + +- ++ + singer: + 歌曲歌手: + + +- ++ + album: + 歌曲专辑: + + +- ++ + The file type: + 文件类型: + + +- ++ + The file size: + 文件大小: + + +- ++ + File length: + 文件时长: + + +- ++ + File location: + 文件位置: + + +- +- ++ ++ + 警告 + + + +- +- ++ ++ + 暂无法打开文件,请检查路径和文件名称 + + +@@ -234,7 +234,7 @@ + 麒麟音乐 + + +- ++ + volume + 音量调节 + +@@ -263,52 +263,52 @@ + 默认歌单无法重命名! + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + A total of + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + The first + + +@@ -341,49 +341,49 @@ + 文件位置 + + +- +- +- ++ ++ ++ + 00:00 + 00:00 + + +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ + A list of circulation + 列表循环 + + +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ + Random broadcast + 随机播放 + + +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ + Order of play + 顺序播放 + + +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ + Single cycle + 单曲循环 + +@@ -796,8 +796,8 @@ + 麒麟音乐 + + +- +- ++ ++ + Service & Support: + 服务与支持: + +@@ -821,7 +821,7 @@ + 深色主题 + + +- ++ + Version: + 版本号: + +@@ -830,8 +830,8 @@ + 开发者:support@kylinos.cn + + +- +- ++ ++ + kylin music + 麒麟音乐 + +@@ -844,23 +844,23 @@ + 麒麟音乐 + + +- +- ++ ++ + 列表循环 + + + +- ++ + 随机播放 + + + +- ++ + 顺序播放 + + + +- ++ + 单曲循环 + + +-- +2.33.0 + diff --git a/kylin-music.spec b/kylin-music.spec index 03f6dcd..0935422 100644 --- a/kylin-music.spec +++ b/kylin-music.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: kylin-music Version: 1.0.44 -Release: 3 +Release: 4 Summary: kylin-music License: GPL-3.0 License URL: https://github.com/UbuntuKylin/kylin-music @@ -12,6 +12,7 @@ Source1: kylin-music_zh_CN.qm patch0: 0001-modify-kylin-music-complier-error.patch patch1: 0001_fix_chinese_translation_issue.patch patch2: fix_title_bar_issue.patch +patch3: 0002-modify-version-is-error.patch BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtscript-devel @@ -46,6 +47,7 @@ kylin-music %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -81,6 +83,9 @@ cp -r %{SOURCE1} %{buildroot}/usr/share/kylin-music %{_datadir}/kylin-music/ %changelog +* Thu Apr 7 2021 pei-jiankang - 1.0.44-4 +- modify version is error + * Wed Sep 08 2021 douyan - 1.0.44-3 - fix_title_bar_issue.patch diff --git a/kylin-music_zh_CN.qm b/kylin-music_zh_CN.qm index aca0383..16e1d89 100644 Binary files a/kylin-music_zh_CN.qm and b/kylin-music_zh_CN.qm differ