Compare commits

...

5 Commits

Author SHA1 Message Date
yutent c2f7976ddc 删除mutagen 2023-10-23 18:31:13 +08:00
yutent 28f2ae5033 更新打包配置 2023-09-05 15:01:19 +08:00
yutent c8ee7d4aad 1.0.5 2023-09-05 10:48:45 +08:00
yutent 27f1ff704e 优化循环模式设置 2023-09-04 20:41:19 +08:00
yutent 563fa8c733 fixed size 2023-08-31 17:16:47 +08:00
4 changed files with 11 additions and 10 deletions

View File

@ -4,7 +4,7 @@ if [ -d unpack ]; then
sudo rm -rf unpack sudo rm -rf unpack
fi fi
version="1.0.4" version="1.0.5"
mkdir -p unpack/DEBIAN mkdir -p unpack/DEBIAN
@ -12,7 +12,11 @@ cp debian/control unpack/DEBIAN/
cp -r usr unpack/ cp -r usr unpack/
cd unpack cd unpack
find . -type f | xargs md5sum > DEBIAN/md5sums find usr -type f | xargs md5sum > DEBIAN/md5sums
_size=$(du -d 0 usr | cut -f1)
sed -i "s/{{size}}/${_size}/" DEBIAN/control
sed -i "s/{{version}}/${version}/" DEBIAN/control
cd .. cd ..
dpkg-deb -b unpack/ "sonist-${version}.deb" dpkg-deb -b unpack/ "sonist-${version}.deb"

4
debian/control vendored
View File

@ -1,12 +1,12 @@
Package: sonist Package: sonist
Version: 1.0.4 Version: {{version}}
Section: X11 Section: X11
Architecture: all Architecture: all
Author: Yutent Author: Yutent
Maintainer: Yutent <yutent.io@gmail.com> Maintainer: Yutent <yutent.io@gmail.com>
Depends: python3-gi, gir1.2-gtk-3.0, python3-pil, python3-gi-cairo, python3-mutagen, mpd Depends: python3-gi, gir1.2-gtk-3.0, python3-pil, python3-gi-cairo, python3-mutagen, mpd
Priority: optional Priority: optional
Installed-Size: 5644 Installed-Size: {{size}}
Homepage: https://git.wkit.fun/appcat/sonist-gtk Homepage: https://git.wkit.fun/appcat/sonist-gtk
Description: Sonist - 基于mpd后端的音乐播放器. Description: Sonist - 基于mpd后端的音乐播放器.
高颜值且轻量的 MPD GUI客户端. 高颜值且轻量的 MPD GUI客户端.

View File

@ -21,13 +21,12 @@ class AboutWindow(Gtk.AboutDialog):
self.set_logo(GdkPixbuf.Pixbuf.new_from_file(image_dict['sonist'])) self.set_logo(GdkPixbuf.Pixbuf.new_from_file(image_dict['sonist']))
self.set_license_type(Gtk.License.MIT_X11) self.set_license_type(Gtk.License.MIT_X11)
self.set_version('1.0.4') self.set_version('1.0.5')
self.set_website('https://git.wkit.fun/appcat/sonist-gtk') self.set_website('https://git.wkit.fun/appcat/sonist-gtk')
self.set_website_label('官网') self.set_website_label('官网')
self.set_authors([ self.set_authors([
'Yutent <yutent.io@gmail.com> (Sonist)', 'Yutent <yutent.io@gmail.com> (Sonist)',
'Mic92 <https://github.com/Mic92/python-mpd2> (python-mpd2)', 'Mic92 <https://github.com/Mic92/python-mpd2> (python-mpd2)',
'quodlibet <https://github.com/quodlibet/mutagen> (python-mutagen)'
]) ])
self.set_copyright('© 2023 Yutent <yutent.io@gmail.com>') self.set_copyright('© 2023 Yutent <yutent.io@gmail.com>')
self.set_comments('Sonist-Gtk 是一个界面美观, 基于MPD后端的音乐播放器, 使用python + gtk3开发。') self.set_comments('Sonist-Gtk 是一个界面美观, 基于MPD后端的音乐播放器, 使用python + gtk3开发。')

View File

@ -177,17 +177,14 @@ class SonistWindow(Gtk.Window):
elif btn == 'mode_btn': elif btn == 'mode_btn':
# repeat all # repeat all
if self.ctrl_box.curr_mode == 0: if self.ctrl_box.curr_mode == 0:
self.mpd.repeat(1)
self.mpd.random(0) self.mpd.random(0)
self.mpd.single(0) self.mpd.single(0)
# random # random
elif self.ctrl_box.curr_mode == 1: elif self.ctrl_box.curr_mode == 1:
self.mpd.repeat(0)
self.mpd.random(1) self.mpd.random(1)
self.mpd.single(0) self.mpd.single(0)
# single # single
else: else:
self.mpd.repeat(0)
self.mpd.random(0) self.mpd.random(0)
self.mpd.single(1) self.mpd.single(1)
@ -262,6 +259,7 @@ class SonistWindow(Gtk.Window):
# 首次启动时, 更新数据库 # 首次启动时, 更新数据库
if first: if first:
self.mpd.update() self.mpd.update()
self.mpd.repeat(1)
song_num = int(self.mpd.stats().get('songs') or 0) song_num = int(self.mpd.stats().get('songs') or 0)
playlist = [it['file'] for it in self.mpd.playlistinfo()] playlist = [it['file'] for it in self.mpd.playlistinfo()]
@ -331,7 +329,7 @@ class SonistWindow(Gtk.Window):
self.timebar.update_time() self.timebar.update_time()
self.update_album() self.update_album()
@idle
def update_album(self, filepath = None): def update_album(self, filepath = None):
self.set_background_image(filepath or image_dict['disk']) self.set_background_image(filepath or image_dict['disk'])
self.disk.update_album(filepath) self.disk.update_album(filepath)