{% extends "base_template.html" %} {% macro import_options(id_prefix, show_grouping) -%}
Import options

Prefilled from your beets config's import section; changes apply to this import only.


{% if show_grouping %}

{% endif %}


{%- endmacro %} {% macro new_import_form() -%}

{# Pinned to the configured downloads_path: the value is prefilled, the pattern blocks submitting anything outside it, and the datalist only suggests real subfolders under it as you type. (HTMX validates the form POST against the pattern but not the GET autocomplete, so suggestions still work mid-type.) #} Folder must be under {{ downloads_path }} {{ import_options("", true) }}
{%- endmacro %} {% macro clean_slate_body() -%}
What a clean-slate import does

Remove a library entry (like beet remove -d) and import its original download folder afresh. Nothing carries over (other than the downloader hook's search fields), and the entry is removed before the import runs. Preview first to see what would be deleted.

{% if clean_slate and clean_slate.source %}

Entry: {{ clean_slate.label }} ({{ clean_slate.subject }} #{{ clean_slate.beets_id }})



Proceed even if the source holds fewer audio files than the library currently has on disk.

{{ import_options("clean-slate-", false) }}

The entry and its library files are deleted before the import runs. Skipping or aborting the import afterwards does not restore them.

{% elif clean_slate %}

No source folder is known for {{ clean_slate.label }}. Use Find via downloader on the search page to look it up first.

{% else %}

Start from the search page: entries with a known source folder offer a Clean-slate import from here link.

{% endif %} {%- endmacro %} {% macro active_imports() -%}

Active imports

{# Loaded on page load (and after each submit), so ongoing / awaiting-decision jobs persist across navigating away and back to this page. Each job fragment then self-polls for its own updates. #}
{%- endmacro %} {% block content %}

Import

How imports work

Start a beets import, or clean-slate an entry that is already in your library. The importer runs interactively — when it needs a decision, candidate matches appear under Active imports for you to apply, import as-is, or skip.

{% if clean_slate %}

Clean-slate import

{{ clean_slate_body() }}
New import {{ new_import_form() }}
{{ active_imports() }} {% else %}

New import

{{ new_import_form() }}
Clean-slate import {{ clean_slate_body() }}
{{ active_imports() }} {% endif %} {% endblock %}