[FW] Add filter for existant Deezer albums

master
Quentin Duchemin 2024-03-18 23:26:49 +01:00
parent 8bd938a5ed
commit 5c127a5648
1 changed files with 12 additions and 2 deletions

View File

@ -14,14 +14,24 @@
group: "{{ base_user_name }}"
mode: 0644
- name: Filter non-existing albums
shell:
chdir: ~/documents/code/funkwhale-playlist-import
cmd: ./exclude-existing-albums.py -s deezer > /tmp/unique_albums.txt
stdin: "{{ lookup('file', 'files/albums.txt') }}"
register: unique_albums
delegate_to: localhost
become: false
- pause:
- name: Download required albums
# So that files are written with base user perms
become: yes
become: true
become_user: "{{ base_user_name }}"
shell:
cmd: "deemix --portable -p {{ deemix_songs_path }} {{ item }}"
chdir: "{{ deemix_folder_path }}"
with_items: "{{ lookup('file', 'files/albums.txt').splitlines() }}"
with_items: "{{ lookup('file', '/tmp/unique_albums.txt').splitlines() }}"
register: output_deemix
- name: Show download state