---
name: Build Discography
description: Identify all albums in an artist folder, rename directories, fetch detailed info and cover art for each.
version: 1
mode: pipeline
triggers:
  - type: directory
inputs:
  artist_name:
    type: string
    description: Artist / band name
    autofill: entry_name
steps:
  - task: convert-audio
    inputs:
      file_path: .
      target_format: mp3
      delete_source: "true"
  - task: clean-playlist-files
    inputs:
      file_path: .
  - task: prepare-discography
    inputs:
      artist_name: ${artist_name}
  - task: fetch-album-info
    foreach: subdirectory
    concurrency: 5
    skip_if: album-info.md
    inputs:
      artist_name: ${artist_name}
      album_name: ${folder_name}
  - task: tag-album
    foreach: subdirectory
    concurrency: 5
    inputs:
      artist_name: ${artist_name}
      album_name: ${folder_name}
---
