Add metadata plugins for beets

This commit is contained in:
Wojciech Kozlowski 2023-04-03 15:45:13 +02:00
parent e2d22034e2
commit c0992eda8c
4 changed files with 77 additions and 34 deletions

View File

@ -36,17 +36,31 @@
group: "{{ music_user_name }}"
mode: 0755
- name: "configure beets for collection"
ansible.builtin.template:
src: "./beets-collection.yml"
dest: "{{ music_user_home_directory }}/.config/beets/config.yaml"
- name: "configure common beets config"
ansible.builtin.blockinfile:
path: "{{ music_user_home_directory }}/.config/beets/{{ item }}.yaml"
create: true
mode: 0644
insertafter: "EOF"
marker: "# {mark} ANSIBLE MANAGED BLOCK COMMON"
block: "{{ lookup('ansible.builtin.template', './beets-common.yml') }}"
with_items:
- "config"
- "archive"
- name: "configure beets for collection"
ansible.builtin.blockinfile:
path: "{{ music_user_home_directory }}/.config/beets/config.yaml"
insertbefore: "BOF"
marker: "# {mark} ANSIBLE MANAGED BLOCK COLLECTION"
block: "{{ lookup('ansible.builtin.template', './beets-collection.yml') }}"
- name: "configure beets for archive"
ansible.builtin.template:
src: "./beets-archive.yml"
dest: "{{ music_user_home_directory }}/.config/beets/archive.yaml"
mode: 0644
ansible.builtin.blockinfile:
path: "{{ music_user_home_directory }}/.config/beets/archive.yaml"
insertbefore: "BOF"
marker: "# {mark} ANSIBLE MANAGED BLOCK ARCHIVE"
block: "{{ lookup('ansible.builtin.template', './beets-archive.yml') }}"
- name: "create nextcloud-upload config directory"
ansible.builtin.file:

View File

@ -1,17 +1,8 @@
plugins: fetchart info
directory: {{ music_user_data_archive_directory }}
library: {{ music_user_data_archive_directory }}/library.db
directory: {{ music_user_data_archive_directory }}
paths:
default: $albumartist/$year $album%aunique{}/$track $title
singleton: Non-Album/$artist/$title
comp: Compilations/$year $album%aunique{}/$track $title
import:
copy: yes
move: no
write: no
autotag: no
fetchart:
sources:
- filesystem

View File

@ -1,22 +1,7 @@
plugins: convert fetchart info
library: {{ music_user_data_collection_directory }}/library.db
directory: {{ music_user_data_collection_directory }}
paths:
default: $albumartist/$year $album%aunique{}/$track $title
singleton: Non-Album/$artist/$title
comp: Compilations/$year $album%aunique{}/$track $title
library: {{ music_user_data_collection_directory }}/library.db
import:
move: yes
write: no
autotag: no
convert:
dest: /var/tmp/{{ music_user_name }}/mp3
copy_album_art: yes
embed: yes
fetchart:
sources:
- filesystem

View File

@ -0,0 +1,53 @@
plugins: convert embedart fetchart info zero
paths:
default: $albumartist/$year $album%aunique{}/$track $title
singleton: Non-Album/$artist/$title
comp: Compilations/$year $album%aunique{}/$track $title
convert:
dest: /var/tmp/{{ music_user_name }}/mp3
copy_album_art: yes
embed: yes
embedart:
auto: no
fetchart:
sources:
- filesystem
zero:
auto: yes
fields: >-
albumstatus
albumtype
bpm
catalognum
comments
country
day
genre
genres
grouping
label
language
mb_albumartistid
mb_albumid
mb_artistid
mb_releasegroupid
mb_releasetrackid
mb_trackid
media
month
original_date
original_day
original_month
original_year
script
comments:
- "^(?!([0-9]{4}(-[0-9]{2}){0,2}(,[0-9]{2}){0,1} at |\
[0-9]{4} Remaster|\
[0-9]{4} Re-Recording))\
.*$"
update_database: true