Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package netease-cloud-music-gtk for
openSUSE:Factory checked in at 2022-07-02 15:34:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/netease-cloud-music-gtk (Old)
and /work/SRC/openSUSE:Factory/.netease-cloud-music-gtk.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "netease-cloud-music-gtk"
Sat Jul 2 15:34:47 2022 rev:9 rq:986346 version:2.0.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/netease-cloud-music-gtk/netease-cloud-music-gtk.changes
2022-06-28 15:22:56.861993923 +0200
+++
/work/SRC/openSUSE:Factory/.netease-cloud-music-gtk.new.1548/netease-cloud-music-gtk.changes
2022-07-02 15:34:51.783046633 +0200
@@ -1,0 +2,9 @@
+Sat Jul 2 09:32:29 UTC 2022 - gmg 137 <[email protected]>
+
+- Release version 2.0.1
+ + Real-time synchronization of playlist status.
+ + Add automatic cache cleaning.
+ + Add the function of viewing the currently playing song album.
+ + Update translation.
+
+-------------------------------------------------------------------
Old:
----
netease-cloud-music-gtk-2.0.0.tar.xz
New:
----
netease-cloud-music-gtk-2.0.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ netease-cloud-music-gtk.spec ++++++
--- /var/tmp/diff_new_pack.Yxdo2F/_old 2022-07-02 15:34:52.355047491 +0200
+++ /var/tmp/diff_new_pack.Yxdo2F/_new 2022-07-02 15:34:52.359047497 +0200
@@ -20,7 +20,7 @@
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
%define _lto_cflags %{nil}
Name: netease-cloud-music-gtk
-Version: 2.0.0
+Version: 2.0.1
Release: 0
Summary: Linux ??????????????? Rust + GTK4
?????????????????????????????????
License: GPL-3.0-or-later
++++++ netease-cloud-music-gtk-2.0.0.tar.xz ->
netease-cloud-music-gtk-2.0.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netease-cloud-music-gtk-2.0.0/Cargo.toml
new/netease-cloud-music-gtk-2.0.1/Cargo.toml
--- old/netease-cloud-music-gtk-2.0.0/Cargo.toml 2022-06-27
11:13:40.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/Cargo.toml 2022-07-02
11:31:01.000000000 +0200
@@ -1,6 +1,6 @@
[package]
name = "netease-cloud-music-gtk4"
-version = "2.0.0"
+version = "2.0.1"
edition = "2021"
[dependencies]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netease-cloud-music-gtk-2.0.0/README.md
new/netease-cloud-music-gtk-2.0.1/README.md
--- old/netease-cloud-music-gtk-2.0.0/README.md 1970-01-01 01:00:00.000000000
+0100
+++ new/netease-cloud-music-gtk-2.0.1/README.md 2022-06-28 04:20:53.000000000
+0200
@@ -0,0 +1,52 @@
+# NeteaseCloudMusicGtk4
+> netease-cloud-music-gtk4 ????????? GTK4 + Libadwaita
?????????????????????????????????????????? Linux ????????????????????? openSUSE
Tumbleweed + GNOME ??????????????????
+
+## ??????
+- ??????????????? Linux
?????????????????????????????????????????????????????????????????????
+- ??????????????? Node/python ??????Rust + GTK
????????????????????????????????????
+- ?????????????????????????????? API ???????????????????????????????????????
+- ???????????? GNOME Music ?????????GTK ???????????????????????????????????????
+- ??????????????????????????? 3 M???????????????????????????????????????
+
+## ?????????
+- [x] ?????????
+- [x] ?????????
+- [x] ???????????????
+- [x] ???????????????
+- [x] ????????????
+- [x] ????????????
+- [x] ???????????????
+- [x] ?????????
+- [x] ???????????????
+- [x] ?????????
+- [x] ?????????
+- [x] ?????????
+- [x] ?????????
+- [x] Mpris2 ??????
+- [x] ????????????
+- [x] ??????
+- [ ] ????????????
+
+### FAQ
+1. ???????????????????????????????????????????
+> ?????? GTK3
????????????????????????????????????????????????????????????????????????<br>
+> **????????????:**
+> - Mpris ??????: GNOME ?????? [Mpris Indicator
Button](https://extensions.gnome.org/extension/1379/mpris-indicator-button/)??????????????????????????????
Mpris ?????????
+> - ????????????????????????????????????????????????
+2. ???????????????????????????????????????????
+>
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
+3. ??????????????????????????????????
+> ?????????????????????????????? .cache/netease-cloud-music-gtk4
???????????????
+
+## ??????
+
+
+
+
+
+## License
+This project's source code and documentation is licensed under the [GNU
General Public License](COPYING) (GPL v3).
+
+## ??????
+- [Shortwave](https://gitlab.gnome.org/World/Shortwave)
+- [gnome-music](https://gitlab.gnome.org/GNOME/gnome-music)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/netease-cloud-music-gtk-2.0.0/data/com.gitee.gmg137.NeteaseCloudMusicGtk4.gschema.xml
new/netease-cloud-music-gtk-2.0.1/data/com.gitee.gmg137.NeteaseCloudMusicGtk4.gschema.xml
---
old/netease-cloud-music-gtk-2.0.0/data/com.gitee.gmg137.NeteaseCloudMusicGtk4.gschema.xml
2022-06-22 11:04:06.000000000 +0200
+++
new/netease-cloud-music-gtk-2.0.1/data/com.gitee.gmg137.NeteaseCloudMusicGtk4.gschema.xml
2022-07-01 10:50:25.000000000 +0200
@@ -32,5 +32,13 @@
<default>0</default>
<summary>Settings music rate</summary>
</key>
+ <key name="cache-clear" type="u">
+ <default>0</default>
+ <summary>Settings cache clear rules, 0: Never, 1: Daily, 2:
Weekly, 3: Monthly</summary>
+ </key>
+ <key name="cache-clear-flag" type="b">
+ <default>false</default>
+ <summary>Cache clear flag</summary>
+ </key>
</schema>
</schemalist>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/netease-cloud-music-gtk-2.0.0/data/gtk/player-controls.ui
new/netease-cloud-music-gtk-2.0.1/data/gtk/player-controls.ui
--- old/netease-cloud-music-gtk-2.0.0/data/gtk/player-controls.ui
2022-06-27 03:47:28.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/data/gtk/player-controls.ui
2022-07-02 03:07:05.000000000 +0200
@@ -60,6 +60,11 @@
<property name="valign">center</property>
<property name="icon-name">image-missing-symbolic</property>
<property name="pixel-size">50</property>
+ <child>
+ <object class="GtkGestureClick">
+ <signal name="pressed" handler="cover_clicked_cb"
swapped="true" />
+ </object>
+ </child>
</object>
</child>
<child>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/netease-cloud-music-gtk-2.0.0/data/gtk/preferences.ui
new/netease-cloud-music-gtk-2.0.1/data/gtk/preferences.ui
--- old/netease-cloud-music-gtk-2.0.0/data/gtk/preferences.ui 2022-06-27
03:52:00.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/data/gtk/preferences.ui 2022-07-01
10:05:22.000000000 +0200
@@ -38,6 +38,21 @@
</child>
</object>
</child>
+ <child>
+ <object class="AdwComboRow" id="cache_clear">
+ <property name="title"
translatable="yes">Cache cleaning</property>
+ <property name="model">
+ <object class="GtkStringList">
+ <items>
+ <item
translatable="yes">Never</item>
+ <item
translatable="yes">Daily</item>
+ <item
translatable="yes">Weekly</item>
+ <item
translatable="yes">Monthly</item>
+ </items>
+ </object>
+ </property>
+ </object>
+ </child>
</object>
</child>
<child>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netease-cloud-music-gtk-2.0.0/meson.build
new/netease-cloud-music-gtk-2.0.1/meson.build
--- old/netease-cloud-music-gtk-2.0.0/meson.build 2022-06-27
11:42:32.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/meson.build 2022-07-02
11:26:23.000000000 +0200
@@ -1,5 +1,5 @@
project('netease-cloud-music-gtk4', 'rust',
- version: '2.0.0',
+ version: '2.0.1',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2',
'werror=false',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/netease-cloud-music-gtk-2.0.0/po/netease-cloud-music-gtk4.pot
new/netease-cloud-music-gtk-2.0.1/po/netease-cloud-music-gtk4.pot
--- old/netease-cloud-music-gtk-2.0.0/po/netease-cloud-music-gtk4.pot
2022-06-27 08:19:30.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/po/netease-cloud-music-gtk4.pot
2022-07-01 11:46:45.000000000 +0200
@@ -18,7 +18,8 @@
"Content-Transfer-Encoding: 8bit\n"
#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.desktop.in:3
-msgid "netease-cloud-music-gtk4"
+#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.desktop.in:6
+msgid "NetEase Cloud Music"
msgstr ""
#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.appdata.xml.in:7
@@ -45,6 +46,18 @@
msgid "Settings music rate"
msgstr ""
+#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.gschema.xml:37
+msgid "Settings cache clear rules, 0: Never, 1: Daily, 2: Weekly, 3: Monthly"
+msgstr ""
+
+#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.gschema.xml:41
+msgid "Cache clear flag"
+msgstr ""
+
+#: data/gtk/window.ui:82 data/gtk/window.ui:331
+msgid "Songs"
+msgstr ""
+
#: data/gtk/window.ui:101
msgid "Discover"
msgstr ""
@@ -77,10 +90,6 @@
msgid "_About netease-cloud-music-gtk4"
msgstr ""
-#: data/gtk/window.ui:331 data/gtk/window.ui:82
-msgid "Songs"
-msgstr ""
-
#: data/gtk/window.ui:338
msgid "Singer"
msgstr ""
@@ -121,11 +130,31 @@
msgid "http/https/socks4/socks4a/socks5/socks5h"
msgstr ""
-#: data/gtk/preferences.ui:45
-msgid "Music"
+#: data/gtk/preferences.ui:43
+msgid "Cache cleaning"
+msgstr ""
+
+#: data/gtk/preferences.ui:47
+msgid "Never"
msgstr ""
#: data/gtk/preferences.ui:48
+msgid "Daily"
+msgstr ""
+
+#: data/gtk/preferences.ui:49
+msgid "Weekly"
+msgstr ""
+
+#: data/gtk/preferences.ui:50
+msgid "Monthly"
+msgstr ""
+
+#: data/gtk/preferences.ui:60
+msgid "Music"
+msgstr ""
+
+#: data/gtk/preferences.ui:63
msgid "Sound quality"
msgstr ""
@@ -165,15 +194,15 @@
msgid "Phone"
msgstr ""
-#: data/gtk/user-menus.ui:109
+#: data/gtk/user-menus.ui:110
msgid "Captcha"
msgstr ""
-#: data/gtk/user-menus.ui:114
+#: data/gtk/user-menus.ui:115
msgid "Get Captcha"
msgstr ""
-#: data/gtk/user-menus.ui:125
+#: data/gtk/user-menus.ui:126
msgid "Login"
msgstr ""
@@ -258,27 +287,27 @@
msgid "Like songs list"
msgstr ""
-#: data/gtk/my-page.ui:40 src/application.rs:957
+#: data/gtk/my-page.ui:40 src/application.rs:962
msgid "Daily Recommendation"
msgstr ""
-#: data/gtk/my-page.ui:67 src/application.rs:974
+#: data/gtk/my-page.ui:67 src/application.rs:979
msgid "Favorite Songs"
msgstr ""
-#: data/gtk/my-page.ui:94 src/application.rs:1019
+#: data/gtk/my-page.ui:94 src/application.rs:1024
msgid "Private FM"
msgstr ""
-#: data/gtk/my-page.ui:121 src/application.rs:1002
+#: data/gtk/my-page.ui:121 src/application.rs:1007
msgid "Cloud Music"
msgstr ""
-#: data/gtk/my-page.ui:148 src/application.rs:1035
+#: data/gtk/my-page.ui:148 src/application.rs:1040
msgid "Favorite Album"
msgstr ""
-#: data/gtk/my-page.ui:175 src/application.rs:1044
+#: data/gtk/my-page.ui:175 src/application.rs:1049
msgid "Favorite Song List"
msgstr ""
@@ -286,70 +315,78 @@
msgid "Recommended Song List"
msgstr ""
-#: src/application.rs:247
+#: src/application.rs:252
msgid "Have scanned the QR code, waiting for confirmation!"
msgstr ""
-#: src/application.rs:264 src/application.rs:324
+#: src/application.rs:269 src/application.rs:329
msgid "Login successful!"
msgstr ""
-#: src/application.rs:296
+#: src/application.rs:301
msgid "Please pay attention to check the cell phone verification code!"
msgstr ""
-#: src/application.rs:302
+#: src/application.rs:307
msgid "Failed to get verification code!"
msgstr ""
-#: src/application.rs:329
+#: src/application.rs:334
msgid "Login failed!"
msgstr ""
-#: src/application.rs:507 src/application.rs:515
+#: src/application.rs:512 src/application.rs:520
msgid "Get [{}] Playback link failed!"
msgstr ""
-#: src/application.rs:579 src/application.rs:986
+#: src/application.rs:584 src/application.rs:991
msgid "Failed to get song list details!"
msgstr ""
-#: src/application.rs:599
+#: src/application.rs:604
msgid "Failed to get album details!"
msgstr ""
-#: src/application.rs:624
+#: src/application.rs:629
msgid "Song list have been collected!"
msgstr ""
-#: src/application.rs:628
+#: src/application.rs:633
msgid "Failed to collect song list!"
msgstr ""
-#: src/application.rs:639
+#: src/application.rs:644
msgid "Album have been collected!"
msgstr ""
-#: src/application.rs:643
+#: src/application.rs:648
msgid "Failed to collect album!"
msgstr ""
-#: src/application.rs:654
+#: src/application.rs:659
msgid "Songs have been collected!"
msgstr ""
-#: src/application.rs:658
+#: src/application.rs:663
msgid "Failed to collect songs!"
msgstr ""
-#: src/application.rs:691 src/application.rs:716 src/application.rs:741
src/application.rs:765 src/application.rs:777 src/application.rs:803
src/application.rs:831 src/application.rs:855 src/application.rs:866
src/application.rs:890 src/application.rs:916 src/application.rs:948
src/application.rs:966 src/application.rs:994 src/application.rs:1011
+#: src/application.rs:696 src/application.rs:721 src/application.rs:746
src/application.rs:770 src/application.rs:782 src/application.rs:808
src/application.rs:836 src/application.rs:860 src/application.rs:871
src/application.rs:895 src/application.rs:921 src/application.rs:953
src/application.rs:971 src/application.rs:999 src/application.rs:1016
msgid "Request for interface failed, please try again!"
msgstr ""
-#: src/application.rs:1097 src/ncmapi.rs:86
+#: src/application.rs:1106 src/ncmapi.rs:86
msgid "No lyrics found!"
msgstr ""
+#: src/application.rs:1156
+msgid "Netease Cloud Music Gtk4"
+msgstr ""
+
+#: src/application.rs:1179 src/application.rs:1188 src/application.rs:1202
+msgid "Cache cleared."
+msgstr ""
+
#: src/audio/mpris.rs:29
msgid "Netease Cloud Music"
msgstr ""
@@ -362,15 +399,15 @@
msgid "Playback error:{}"
msgstr ""
-#: src/gui/player_controls.rs:472 src/gui/player_controls.rs:505
src/window.rs:432
+#: src/gui/player_controls.rs:478 src/gui/player_controls.rs:517
msgid "No more songs???"
msgstr ""
-#: src/gui/player_controls.rs:525
+#: src/gui/player_controls.rs:537
msgid "Please login first???"
msgstr ""
-#: src/gui/player_controls.rs:536
+#: src/gui/player_controls.rs:548
msgid "Collection failure???"
msgstr ""
@@ -398,6 +435,6 @@
msgid "No playable songs found???"
msgstr ""
-#: src/window.rs:593
+#: src/window.rs:586
msgid "Play List&Lyrics"
msgstr ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netease-cloud-music-gtk-2.0.0/po/zh_CN.po
new/netease-cloud-music-gtk-2.0.1/po/zh_CN.po
--- old/netease-cloud-music-gtk-2.0.0/po/zh_CN.po 2022-06-27
08:19:55.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/po/zh_CN.po 2022-07-01
11:51:31.000000000 +0200
@@ -18,8 +18,10 @@
"Content-Transfer-Encoding: 8bit\n"
#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.desktop.in:3
-msgid "netease-cloud-music-gtk4"
-msgstr ""
+#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.desktop.in:6
+#, fuzzy
+msgid "NetEase Cloud Music"
+msgstr "???????????????"
#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.appdata.xml.in:7
msgid "No description"
@@ -45,6 +47,18 @@
msgid "Settings music rate"
msgstr "??????????????????"
+#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.gschema.xml:37
+msgid "Settings cache clear rules, 0: Never, 1: Daily, 2: Weekly, 3: Monthly"
+msgstr "?????????????????????0:??????, 1:??????, 2:??????, 3:??????"
+
+#: data/com.gitee.gmg137.NeteaseCloudMusicGtk4.gschema.xml:41
+msgid "Cache clear flag"
+msgstr "??????????????????"
+
+#: data/gtk/window.ui:82 data/gtk/window.ui:331
+msgid "Songs"
+msgstr "??????"
+
#: data/gtk/window.ui:101
msgid "Discover"
msgstr "??????"
@@ -77,10 +91,6 @@
msgid "_About netease-cloud-music-gtk4"
msgstr "??????(_A)"
-#: data/gtk/window.ui:331 data/gtk/window.ui:82
-msgid "Songs"
-msgstr "??????"
-
#: data/gtk/window.ui:338
msgid "Singer"
msgstr "??????"
@@ -121,11 +131,31 @@
msgid "http/https/socks4/socks4a/socks5/socks5h"
msgstr ""
-#: data/gtk/preferences.ui:45
+#: data/gtk/preferences.ui:43
+msgid "Cache cleaning"
+msgstr "????????????"
+
+#: data/gtk/preferences.ui:47
+msgid "Never"
+msgstr "??????"
+
+#: data/gtk/preferences.ui:48
+msgid "Daily"
+msgstr "??????"
+
+#: data/gtk/preferences.ui:49
+msgid "Weekly"
+msgstr "??????"
+
+#: data/gtk/preferences.ui:50
+msgid "Monthly"
+msgstr "??????"
+
+#: data/gtk/preferences.ui:60
msgid "Music"
msgstr "??????"
-#: data/gtk/preferences.ui:48
+#: data/gtk/preferences.ui:63
msgid "Sound quality"
msgstr "??????"
@@ -165,15 +195,15 @@
msgid "Phone"
msgstr "?????????"
-#: data/gtk/user-menus.ui:109
+#: data/gtk/user-menus.ui:110
msgid "Captcha"
msgstr "?????????"
-#: data/gtk/user-menus.ui:114
+#: data/gtk/user-menus.ui:115
msgid "Get Captcha"
msgstr "???????????????"
-#: data/gtk/user-menus.ui:125
+#: data/gtk/user-menus.ui:126
msgid "Login"
msgstr "??????"
@@ -258,27 +288,27 @@
msgid "Like songs list"
msgstr "????????????"
-#: data/gtk/my-page.ui:40 src/application.rs:957
+#: data/gtk/my-page.ui:40 src/application.rs:962
msgid "Daily Recommendation"
msgstr "????????????"
-#: data/gtk/my-page.ui:67 src/application.rs:974
+#: data/gtk/my-page.ui:67 src/application.rs:979
msgid "Favorite Songs"
msgstr "????????????"
-#: data/gtk/my-page.ui:94 src/application.rs:1019
+#: data/gtk/my-page.ui:94 src/application.rs:1024
msgid "Private FM"
msgstr "??????FM"
-#: data/gtk/my-page.ui:121 src/application.rs:1002
+#: data/gtk/my-page.ui:121 src/application.rs:1007
msgid "Cloud Music"
msgstr "????????????"
-#: data/gtk/my-page.ui:148 src/application.rs:1035
+#: data/gtk/my-page.ui:148 src/application.rs:1040
msgid "Favorite Album"
msgstr "????????????"
-#: data/gtk/my-page.ui:175 src/application.rs:1044
+#: data/gtk/my-page.ui:175 src/application.rs:1049
msgid "Favorite Song List"
msgstr "????????????"
@@ -286,74 +316,83 @@
msgid "Recommended Song List"
msgstr "????????????"
-#: src/application.rs:247
+#: src/application.rs:252
msgid "Have scanned the QR code, waiting for confirmation!"
msgstr "???????????????????????????"
-#: src/application.rs:264 src/application.rs:324
+#: src/application.rs:269 src/application.rs:329
msgid "Login successful!"
msgstr "????????????!"
-#: src/application.rs:296
+#: src/application.rs:301
msgid "Please pay attention to check the cell phone verification code!"
msgstr "??????????????????????????????!"
-#: src/application.rs:302
+#: src/application.rs:307
msgid "Failed to get verification code!"
msgstr "?????????????????????!"
-#: src/application.rs:329
+#: src/application.rs:334
msgid "Login failed!"
msgstr "???????????????"
-#: src/application.rs:507 src/application.rs:515
+#: src/application.rs:512 src/application.rs:520
msgid "Get [{}] Playback link failed!"
msgstr "?????? [{}] ?????????????????????"
-#: src/application.rs:579 src/application.rs:986
+#: src/application.rs:584 src/application.rs:991
msgid "Failed to get song list details!"
msgstr "??????????????????!"
-#: src/application.rs:599
+#: src/application.rs:604
msgid "Failed to get album details!"
msgstr "??????????????????!"
-#: src/application.rs:624
+#: src/application.rs:629
msgid "Song list have been collected!"
msgstr "???????????????!"
-#: src/application.rs:628
+#: src/application.rs:633
msgid "Failed to collect song list!"
msgstr "?????????????????????"
-#: src/application.rs:639
+#: src/application.rs:644
msgid "Album have been collected!"
msgstr "???????????????!"
-#: src/application.rs:643
+#: src/application.rs:648
msgid "Failed to collect album!"
msgstr "??????????????????!"
-#: src/application.rs:654
+#: src/application.rs:659
msgid "Songs have been collected!"
msgstr "???????????????!"
-#: src/application.rs:658
+#: src/application.rs:663
msgid "Failed to collect songs!"
msgstr "??????????????????!"
-#: src/application.rs:691 src/application.rs:716 src/application.rs:741
-#: src/application.rs:765 src/application.rs:777 src/application.rs:803
-#: src/application.rs:831 src/application.rs:855 src/application.rs:866
-#: src/application.rs:890 src/application.rs:916 src/application.rs:948
-#: src/application.rs:966 src/application.rs:994 src/application.rs:1011
+#: src/application.rs:696 src/application.rs:721 src/application.rs:746
+#: src/application.rs:770 src/application.rs:782 src/application.rs:808
+#: src/application.rs:836 src/application.rs:860 src/application.rs:871
+#: src/application.rs:895 src/application.rs:921 src/application.rs:953
+#: src/application.rs:971 src/application.rs:999 src/application.rs:1016
msgid "Request for interface failed, please try again!"
msgstr "??????????????????????????????!"
-#: src/application.rs:1097 src/ncmapi.rs:86
+#: src/application.rs:1106 src/ncmapi.rs:86
msgid "No lyrics found!"
msgstr "??????????????????!"
+#: src/application.rs:1156
+#, fuzzy
+msgid "Netease Cloud Music Gtk4"
+msgstr "???????????????"
+
+#: src/application.rs:1179 src/application.rs:1188 src/application.rs:1202
+msgid "Cache cleared."
+msgstr "????????????????????????"
+
#: src/audio/mpris.rs:29
msgid "Netease Cloud Music"
msgstr "???????????????"
@@ -366,16 +405,15 @@
msgid "Playback error:{}"
msgstr "????????????: {}"
-#: src/gui/player_controls.rs:472 src/gui/player_controls.rs:505
-#: src/window.rs:432
+#: src/gui/player_controls.rs:478 src/gui/player_controls.rs:517
msgid "No more songs???"
msgstr "???????????????!"
-#: src/gui/player_controls.rs:525
+#: src/gui/player_controls.rs:537
msgid "Please login first???"
msgstr "????????????!"
-#: src/gui/player_controls.rs:536
+#: src/gui/player_controls.rs:548
msgid "Collection failure???"
msgstr "????????????!"
@@ -406,6 +444,6 @@
msgid "No playable songs found???"
msgstr "?????????????????????!"
-#: src/window.rs:593
+#: src/window.rs:586
msgid "Play List&Lyrics"
msgstr "????????????&??????"
Binary files old/netease-cloud-music-gtk-2.0.0/screenshots/discover-dark.png
and new/netease-cloud-music-gtk-2.0.1/screenshots/discover-dark.png differ
Binary files old/netease-cloud-music-gtk-2.0.0/screenshots/discover.png and
new/netease-cloud-music-gtk-2.0.1/screenshots/discover.png differ
Binary files old/netease-cloud-music-gtk-2.0.0/screenshots/toplist.png and
new/netease-cloud-music-gtk-2.0.1/screenshots/toplist.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netease-cloud-music-gtk-2.0.0/src/application.rs
new/netease-cloud-music-gtk-2.0.1/src/application.rs
--- old/netease-cloud-music-gtk-2.0.0/src/application.rs 2022-06-27
04:27:10.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/src/application.rs 2022-07-02
03:45:10.000000000 +0200
@@ -1,10 +1,12 @@
use adw::subclass::prelude::*;
use gettextrs::gettext;
+use gio::Settings;
use glib::{clone, timeout_future_seconds, MainContext, Receiver, Sender,
WeakRef};
use gtk::{gio, glib, prelude::*, subclass::prelude::*};
use ncm_api::{BannersInfo, LoginInfo, SingerInfo, SongInfo, SongList, TopList};
use once_cell::sync::OnceCell;
use std::cell::RefCell;
+use std::fs;
use std::path::PathBuf;
use crate::{
@@ -71,6 +73,8 @@
InitMyPageRecSongList(Vec<SongList>),
ToPlayListLyricsPage(Vec<SongInfo>, SongInfo),
UpdateLyrics(String),
+ UpdatePlayListStatus(usize),
+ GetLyrics(SongInfo),
}
mod imp {
@@ -111,6 +115,7 @@
self.parent_constructed(obj);
obj.setup_gactions();
+ obj.setup_cache_clear();
obj.set_accels_for_action("app.quit", &["<primary>q"]);
obj.set_accels_for_action("app.about", &["<primary>a"]);
obj.set_accels_for_action("win.search-button", &["<primary>f",
"slash"]);
@@ -1088,6 +1093,10 @@
let window = imp.window.get().unwrap().upgrade().unwrap();
window.init_playlist_lyrics_page(sis, si.to_owned());
let sender = imp.sender.clone();
+ sender.send(Action::GetLyrics(si)).unwrap();
+ }
+ Action::GetLyrics(si) => {
+ let sender = imp.sender.clone();
let ctx = glib::MainContext::default();
ctx.spawn_local(async move {
if let Ok(lrc) = ncmapi.get_lyrics(si.id).await {
@@ -1103,6 +1112,10 @@
let window = imp.window.get().unwrap().upgrade().unwrap();
window.update_lyrics(lrc);
}
+ Action::UpdatePlayListStatus(index) => {
+ let window = imp.window.get().unwrap().upgrade().unwrap();
+ window.updat_playlist_status(index);
+ }
}
glib::Continue(true)
}
@@ -1140,14 +1153,67 @@
let dialog = gtk::AboutDialog::builder()
.transient_for(&window)
.modal(true)
- .program_name("netease-cloud-music-gtk4")
+ .program_name(&gettext("Netease Cloud Music Gtk4"))
.logo_icon_name("logo")
.version(VERSION)
.authors(vec!["gmg137".into()])
+ .website("https://github.com/gmg137/netease-cloud-music-gtk")
+ .license_type(gtk::License::Gpl30)
.build();
dialog.present();
}
+
+ fn setup_cache_clear(&self) {
+ let sender = self.imp().sender.clone();
+ let settings = Settings::new(crate::APP_ID);
+ let cache_clear = settings.uint("cache-clear");
+ let flag = settings.boolean("cache-clear-flag");
+ let cache_path = CACHE.clone();
+ let ctx = glib::MainContext::default();
+ ctx.spawn_local(async move {
+ match cache_clear {
+ 1 => {
+ if remove_all_file(cache_path).is_ok() {
+ sender
+ .send(Action::AddToast(gettext("Cache cleared.")))
+ .unwrap();
+ }
+ }
+ 2 => {
+ if let Ok(datetime) = glib::DateTime::now_local() {
+ if datetime.day_of_week() == 1 && !flag {
+ if remove_all_file(cache_path).is_ok() {
+ sender
+ .send(Action::AddToast(gettext("Cache
cleared.")))
+ .unwrap();
+ }
+ settings.set_boolean("cache-clear-flag",
true).unwrap();
+ } else if datetime.day_of_week() != 1 {
+ settings.set_boolean("cache-clear-flag",
false).unwrap();
+ }
+ }
+ }
+ 3 => {
+ if let Ok(datetime) = glib::DateTime::now_local() {
+ if datetime.day_of_month() == 1 && !flag {
+ if remove_all_file(cache_path).is_ok() {
+ sender
+ .send(Action::AddToast(gettext("Cache
cleared.")))
+ .unwrap();
+ }
+ settings.set_boolean("cache-clear-flag",
true).unwrap();
+ } else if datetime.day_of_month() != 1 {
+ settings.set_boolean("cache-clear-flag",
false).unwrap();
+ }
+ }
+ }
+ _ => {
+ settings.set_boolean("cache-clear-flag", false).unwrap();
+ }
+ }
+ });
+ }
}
impl Default for NeteaseCloudMusicGtk4Application {
@@ -1158,3 +1224,14 @@
.unwrap()
}
}
+
+fn remove_all_file(path: PathBuf) -> anyhow::Result<()> {
+ for entry in fs::read_dir(path)? {
+ let entry = entry?;
+ let path = entry.path();
+ if path.is_file() {
+ fs::remove_file(path)?;
+ }
+ }
+ Ok(())
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/netease-cloud-music-gtk-2.0.0/src/gui/player_controls.rs
new/netease-cloud-music-gtk-2.0.1/src/gui/player_controls.rs
--- old/netease-cloud-music-gtk-2.0.0/src/gui/player_controls.rs
2022-06-27 04:19:59.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/src/gui/player_controls.rs
2022-07-02 03:44:59.000000000 +0200
@@ -11,7 +11,7 @@
use gstreamer_player::*;
use gtk::{glib, prelude::*, subclass::prelude::*, CompositeTemplate, *};
use mpris_player::{LoopStatus, PlaybackStatus};
-use ncm_api::SongInfo;
+use ncm_api::{SongInfo, SongList};
use once_cell::sync::*;
use crate::{application::Action, audio::*, ncmapi::COOKIE_JAR, path::CACHE};
@@ -19,6 +19,7 @@
cell::Cell,
rc::Rc,
sync::{Arc, Mutex},
+ time::Duration,
};
glib::wrapper! {
@@ -389,6 +390,40 @@
}
self.set_property("volume", adj.value());
}
+
+ #[template_callback]
+ fn cover_clicked_cb(&self) {
+ let sender = self.imp().sender.get().unwrap().clone();
+ if let Some(songinfo) = self.get_current_song() {
+ let mut path = CACHE.clone();
+ path.push(format!("{}-songlist.jpg", songinfo.album_id));
+ if sender
+ .send(Action::DownloadImage(
+ songinfo.pic_url.to_owned(),
+ path.to_owned(),
+ 140,
+ 140,
+ ))
+ .is_ok()
+ {
+ let songlist = SongList {
+ id: songinfo.album_id,
+ name: songinfo.album,
+ cover_img_url: songinfo.pic_url,
+ };
+ let path = path.to_owned();
+ glib::timeout_add_local(Duration::from_millis(100), move || {
+ if path.exists() {
+ sender
+ .send(Action::ToAlbumPage(songlist.to_owned()))
+ .unwrap();
+ return Continue(false);
+ }
+ Continue(true)
+ });
+ }
+ }
+ }
}
mod imp {
@@ -465,6 +500,12 @@
if let Ok(mut playlist) = self.playlist.lock() {
if let Some(song_info) = playlist.prev_song() {
sender.send(Action::Play(song_info.to_owned())).unwrap();
+ sender
+ .send(Action::GetLyrics(song_info.to_owned()))
+ .unwrap();
+ sender
+
.send(Action::UpdatePlayListStatus(playlist.get_position()))
+ .unwrap();
return;
}
}
@@ -498,6 +539,12 @@
if let Ok(mut playlist) = self.playlist.lock() {
if let Some(song_info) = playlist.next_song() {
sender.send(Action::Play(song_info.to_owned())).unwrap();
+ sender
+ .send(Action::GetLyrics(song_info.to_owned()))
+ .unwrap();
+ sender
+
.send(Action::UpdatePlayListStatus(playlist.get_position()))
+ .unwrap();
return;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/netease-cloud-music-gtk-2.0.0/src/gui/playlist_lyrics.rs
new/netease-cloud-music-gtk-2.0.1/src/gui/playlist_lyrics.rs
--- old/netease-cloud-music-gtk-2.0.0/src/gui/playlist_lyrics.rs
2022-06-27 04:20:25.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/src/gui/playlist_lyrics.rs
2022-06-29 04:06:56.000000000 +0200
@@ -71,6 +71,7 @@
row.connect_activate(move |row| {
row.switch_image(true);
sender.send(Action::AddPlay(si.clone())).unwrap();
+ sender.send(Action::GetLyrics(si.clone())).unwrap();
});
listbox.append(&row);
index += 1;
@@ -83,6 +84,22 @@
buffer.set_text(&lyrics);
lyrics_text_view.set_buffer(Some(&buffer));
}
+
+ pub fn switch_row(&self, index: i32) {
+ let imp = self.imp();
+ let listbox = imp.playlist_box.get();
+ let current_row_index: i32 = self.property("select-row");
+ if let Some(row) = listbox.row_at_index(current_row_index) {
+ let row = row.downcast::<SonglistRow>().unwrap();
+ row.switch_image(false);
+ }
+
+ self.set_property("select-row", index);
+ if let Some(row) = listbox.row_at_index(index) {
+ let row = row.downcast::<SonglistRow>().unwrap();
+ row.switch_image(true);
+ }
+ }
}
impl Default for PlayListLyricsPage {
@@ -102,8 +119,6 @@
pub playlist_box: TemplateChild<ListBox>,
#[template_child]
pub lyrics_text_view: TemplateChild<TextView>,
- // #[template_child]
- // pub daily_rec_avatar: TemplateChild<adw::Avatar>,
pub playlist: Rc<RefCell<Vec<SongInfo>>>,
pub sender: OnceCell<Sender<Action>>,
select_row: Cell<i32>,
@@ -117,7 +132,6 @@
fn class_init(klass: &mut Self::Class) {
klass.bind_template();
- // klass.bind_template_callbacks();
}
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
@@ -125,15 +139,6 @@
}
}
- // #[gtk::template_callbacks]
- // impl PlayListLyricsPage {
- // #[template_callback]
- // fn daily_rec_cb(&self) {
- // let sender = self.sender.get().unwrap();
- // sender.send(Action::ToPlayListLyricsPageDailyRec).unwrap();
- // }
- // }
-
impl ObjectImpl for PlayListLyricsPage {
fn constructed(&self, obj: &Self::Type) {
self.parent_constructed(obj);
@@ -152,8 +157,6 @@
}
}),
);
- // let select_row = Rc::new(RefCell::new(-1));
- // self.playlist_box.connect_row_activated(move |list, row| {});
}
fn properties() -> &'static [ParamSpec] {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netease-cloud-music-gtk-2.0.0/src/gui/preferences.rs
new/netease-cloud-music-gtk-2.0.1/src/gui/preferences.rs
--- old/netease-cloud-music-gtk-2.0.0/src/gui/preferences.rs 2022-06-22
11:05:13.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/src/gui/preferences.rs 2022-07-01
10:37:59.000000000 +0200
@@ -51,6 +51,12 @@
.bind("music-rate", &rate, "selected")
.flags(SettingsBindFlags::DEFAULT)
.build();
+
+ let cache_clear = self.imp().cache_clear.get();
+ self.settings()
+ .bind("cache-clear", &cache_clear, "selected")
+ .flags(SettingsBindFlags::DEFAULT)
+ .build();
}
}
@@ -76,6 +82,8 @@
pub proxy_entry: TemplateChild<Entry>,
#[template_child]
pub switch_rate: TemplateChild<adw::ComboRow>,
+ #[template_child]
+ pub cache_clear: TemplateChild<adw::ComboRow>,
}
#[glib::object_subclass]
@@ -86,7 +94,6 @@
fn class_init(klass: &mut Self::Class) {
klass.bind_template();
- // klass.bind_template_callbacks();
}
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
@@ -94,57 +101,6 @@
}
}
- // #[gtk::template_callbacks]
- // impl NeteaseCloudMusicGtk4Preferences {
- // #[template_callback]
- // fn daily_rec_cb(&self) {
- // let sender = self.sender.get().unwrap();
- // sender
- // .send(Action::ToNeteaseCloudMusicGtk4PreferencesDailyRec)
- // .unwrap();
- // }
- //
- // #[template_callback]
- // fn heartbeat_cb(&self) {
- // let sender = self.sender.get().unwrap();
- // sender
- // .send(Action::ToNeteaseCloudMusicGtk4PreferencesHeartbeat)
- // .unwrap();
- // }
- //
- // #[template_callback]
- // fn fm_cb(&self) {
- // let sender = self.sender.get().unwrap();
- // sender
- // .send(Action::ToNeteaseCloudMusicGtk4PreferencesFm)
- // .unwrap();
- // }
- //
- // #[template_callback]
- // fn cloud_disk_cb(&self) {
- // let sender = self.sender.get().unwrap();
- // sender
- // .send(Action::ToNeteaseCloudMusicGtk4PreferencesCloudDisk)
- // .unwrap();
- // }
- //
- // #[template_callback]
- // fn collection_album_cb(&self) {
- // let sender = self.sender.get().unwrap();
- // sender
- // .send(Action::ToNeteaseCloudMusicGtk4PreferencesAlbums)
- // .unwrap();
- // }
- //
- // #[template_callback]
- // fn collection_songlist_cb(&self) {
- // let sender = self.sender.get().unwrap();
- // sender
- // .send(Action::ToNeteaseCloudMusicGtk4PreferencesSonglist)
- // .unwrap();
- // }
- // }
-
impl ObjectImpl for NeteaseCloudMusicGtk4Preferences {
fn constructed(&self, obj: &Self::Type) {
self.parent_constructed(obj);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netease-cloud-music-gtk-2.0.0/src/window.rs
new/netease-cloud-music-gtk-2.0.1/src/window.rs
--- old/netease-cloud-music-gtk-2.0.0/src/window.rs 2022-06-27
04:01:30.000000000 +0200
+++ new/netease-cloud-music-gtk-2.0.1/src/window.rs 2022-06-29
12:05:34.000000000 +0200
@@ -422,15 +422,8 @@
}
pub fn play_next(&self) {
- let sender = self.imp().sender.get().unwrap();
let player_controls = self.imp().player_controls.get();
- if let Some(song_info) = player_controls.get_next_song() {
- sender.send(Action::Play(song_info)).unwrap();
- return;
- }
- sender
- .send(Action::AddToast(gettext("No more songs???")))
- .unwrap();
+ player_controls.next_song();
}
pub fn play(&self, song_info: SongInfo) {
@@ -599,7 +592,20 @@
pub fn update_lyrics(&self, lrc: String) {
let imp = self.imp();
- imp.playlist_lyrics_page.update_lyrics(lrc);
+ if let Some(name) = imp.stack.visible_child_name() {
+ if name == "playlist_lyrics_page" {
+ imp.playlist_lyrics_page.update_lyrics(lrc);
+ }
+ }
+ }
+
+ pub fn updat_playlist_status(&self, index: usize) {
+ let imp = self.imp();
+ if let Some(name) = imp.stack.visible_child_name() {
+ if name == "playlist_lyrics_page" {
+ imp.playlist_lyrics_page.switch_row(index as i32);
+ }
+ }
}
}