Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
921 B

[Unit]
Description=Update funkwhale media library
[Service]
Type=oneshot
{% for lib in funkwhale_libraries %}
ExecStart={{ funkwhale_root_dir }}/venv/bin/python \
{{ funkwhale_root_dir }}/api/manage.py \
import_files {{ lib.id }} \
--no-input{% if lib.inplace %} --in-place{% endif %} \
{% for format in [ 'mp3', 'MP3', 'ogg', 'OGG', 'flac', 'FLAC' ] %}
"{{ lib.path | regex_replace('/$', '') }}/**/*.{{ format }}" \
{% endfor %}
--recursive
{% endfor %}
ExecStart={{ funkwhale_root_dir }}/venv/bin/python \
{{ funkwhale_root_dir }}/api/manage.py \
check_inplace_files \
--no-dry-run
ExecStart={{ funkwhale_root_dir }}/venv/bin/python \
{{ funkwhale_root_dir }}/api/manage.py \
prune_library \
--tracks --albums --artists --no-dry-run
User={{ funkwhale_user }}
Group={{ funkwhale_user }}