diff --git a/files_download.txt b/files_download.txt index 49d9ef8..b8926c4 100644 --- a/files_download.txt +++ b/files_download.txt @@ -1 +1 @@ -http://xplayer-ota.pureroad.cn/files_20251026_192650.tar.xz +http://xplayer-ota.pureroad.cn/files_20251030_143212.tar.xz diff --git a/playbooks/site.yml b/playbooks/site.yml index 07586d8..fdf1e22 100644 --- a/playbooks/site.yml +++ b/playbooks/site.yml @@ -70,18 +70,33 @@ - net-tools - libconfig9 - avahi-daemon - # - bluez-alsa-utils + - libdbus-1-3 + - libglib2.0-0 + - libbluetooth3 + - libsbc1 + - libfdk-aac2 + - libldacbt-abr2 + - libldacbt-enc2 # - upmpdcli state: present cache_valid_time: 3153600 # 365天缓存 update_cache: no become: yes tags: apt - - name: uninstall bluez-alsa-utils - shell: - cmd: apt remove -y bluez-alsa-utils - become: yes - tags: apt + + - name: Create directories + file: + path: "{{ item.path }}" + state: directory + mode: "{{ item.mode | default('0755') }}" + loop: + - path: /var/lib/mpd/playlists + - path: /var/lib/mpd/music + - path: /usr/local/lib/systemd/system + - path: /srv/login + - path: /usr/var/lib/bluealsa + - path: /srv/bluez-alsa + - name: Copy static files copy: @@ -120,17 +135,6 @@ dest: /usr/local/bin/xplayer-start.sh mode: '0755' - - name: Create directories - file: - path: "{{ item.path }}" - state: directory - mode: "{{ item.mode | default('0755') }}" - loop: - - path: /var/lib/mpd/playlists - - path: /var/lib/mpd/music - - path: /usr/local/lib/systemd/system - - path: /srv/login - - name: update mpd data copy: src: "{{ item.src }}" @@ -176,6 +180,29 @@ register: copy_result changed_when: copy_result.changed or (force_update | default(false) | bool) + - name: update bluealsa + copy: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + mode: "{{ item.mode | default('0644') }}" + loop: + - src: ../files/bluealsa.service + dest: /etc/systemd/system/bluealsa.service + - src: ../files/install_bluealsa_openaptx.sh + dest: /usr/bin/install_bluealsa_openaptx.sh + mode: '0755' + - src: ../files/bluealsa_bundle.tar.gz + dest: /srv/bluez-alsa/bluealsa_bundle.tar.gz + tags: bluealsa + notify: + - install_bluealsa_openaptx + - reload_systemd + - enable_bluealsa + - stop_bluealsa + - start_bluealsa + register: copy_result + changed_when: copy_result.changed or (force_update | default(false) | bool) + - name: update camilladsp copy: src: "{{ item.src }}" @@ -400,5 +427,20 @@ - name: reboot_required shell: cmd: echo "need reboot" - + + - name: enable_bluealsa + shell: + cmd: systemctl enable bluealsa + - name: stop_bluealsa + shell: + cmd: systemctl stop bluealsa + - name: start_bluealsa + shell: + cmd: systemctl start bluealsa + - name: restart_bluealsa + shell: + cmd: systemctl restart bluealsa + - name: install_bluealsa_openaptx + shell: + cmd: /usr/bin/install_bluealsa_openaptx.sh diff --git a/sync.sh b/sync.sh index e8e2c76..1d5739e 100755 --- a/sync.sh +++ b/sync.sh @@ -33,6 +33,9 @@ rsync 5c:/etc/systemd/system/sing-box.service files/sing-box.service rsync -avz --exclude='login/' 5c:/srv/login/ files/login/ rsync 5c:/usr/bin/led-startup.sh files/led-startup.sh rsync 5c:/usr/local/bin/xplayer-start.sh files/xplayer-start.sh +rsync 5c:/usr/bin/install_bluealsa_openaptx.sh files/install_bluealsa_openaptx.sh +rsync 5c:/etc/systemd/system/bluealsa.service files/bluealsa.service +rsync 5c:/srv/bluez-alsa/bluealsa_bundle.tar.gz files/bluealsa_bundle.tar.gz # Clean up macOS resource fork files find files -name "._*" -type f -delete