Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
yutent | c2f7976ddc | |
yutent | 28f2ae5033 | |
yutent | c8ee7d4aad | |
yutent | 27f1ff704e | |
yutent | 563fa8c733 |
8
build.sh
8
build.sh
|
@ -4,7 +4,7 @@ if [ -d unpack ]; then
|
|||
sudo rm -rf unpack
|
||||
fi
|
||||
|
||||
version="1.0.4"
|
||||
version="1.0.5"
|
||||
|
||||
mkdir -p unpack/DEBIAN
|
||||
|
||||
|
@ -12,7 +12,11 @@ cp debian/control unpack/DEBIAN/
|
|||
cp -r usr 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 ..
|
||||
dpkg-deb -b unpack/ "sonist-${version}.deb"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
Package: sonist
|
||||
Version: 1.0.4
|
||||
Version: {{version}}
|
||||
Section: X11
|
||||
Architecture: all
|
||||
Author: Yutent
|
||||
Maintainer: Yutent <yutent.io@gmail.com>
|
||||
Depends: python3-gi, gir1.2-gtk-3.0, python3-pil, python3-gi-cairo, python3-mutagen, mpd
|
||||
Priority: optional
|
||||
Installed-Size: 5644
|
||||
Installed-Size: {{size}}
|
||||
Homepage: https://git.wkit.fun/appcat/sonist-gtk
|
||||
Description: Sonist - 基于mpd后端的音乐播放器.
|
||||
高颜值且轻量的 MPD GUI客户端.
|
||||
|
|
|
@ -21,13 +21,12 @@ class AboutWindow(Gtk.AboutDialog):
|
|||
self.set_logo(GdkPixbuf.Pixbuf.new_from_file(image_dict['sonist']))
|
||||
|
||||
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_label('官网')
|
||||
self.set_authors([
|
||||
'Yutent <yutent.io@gmail.com> (Sonist)',
|
||||
'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_comments('Sonist-Gtk 是一个界面美观, 基于MPD后端的音乐播放器, 使用python + gtk3开发。')
|
||||
|
|
|
@ -177,17 +177,14 @@ class SonistWindow(Gtk.Window):
|
|||
elif btn == 'mode_btn':
|
||||
# repeat all
|
||||
if self.ctrl_box.curr_mode == 0:
|
||||
self.mpd.repeat(1)
|
||||
self.mpd.random(0)
|
||||
self.mpd.single(0)
|
||||
# random
|
||||
elif self.ctrl_box.curr_mode == 1:
|
||||
self.mpd.repeat(0)
|
||||
self.mpd.random(1)
|
||||
self.mpd.single(0)
|
||||
# single
|
||||
else:
|
||||
self.mpd.repeat(0)
|
||||
self.mpd.random(0)
|
||||
self.mpd.single(1)
|
||||
|
||||
|
@ -262,6 +259,7 @@ class SonistWindow(Gtk.Window):
|
|||
# 首次启动时, 更新数据库
|
||||
if first:
|
||||
self.mpd.update()
|
||||
self.mpd.repeat(1)
|
||||
song_num = int(self.mpd.stats().get('songs') or 0)
|
||||
playlist = [it['file'] for it in self.mpd.playlistinfo()]
|
||||
|
||||
|
@ -331,7 +329,7 @@ class SonistWindow(Gtk.Window):
|
|||
self.timebar.update_time()
|
||||
self.update_album()
|
||||
|
||||
@idle
|
||||
|
||||
def update_album(self, filepath = None):
|
||||
self.set_background_image(filepath or image_dict['disk'])
|
||||
self.disk.update_album(filepath)
|
||||
|
|
Loading…
Reference in New Issue