cf. https://github.com/pallets/werkzeug/issues/2506
didn't check when part_isolating was introduced, but presumably, it
should be harmless to set this attribute for old werkzeug versions that
didn't have it yet
and shorten second and third test a little by providing -y cli flag. Enough to
test with interactive input once. Move all 3 tests to the very bottom of the
test class.
Flexible attribute keys listed in REIMPORT_FRESH_FIELDS_* are now removed from
the original LazyConvertDict in a separate function which is used for both
album and item level fields.
- Early exits in loops when no new value is incoming.
- Streamline and improve log messages:
- "Reimported" vs. "Not reimported"
- Album/Item ID at the beginning.
- Path at very end.
- Separate regular attrs from flex attrs.
- Refactor preserving of flexible attributes in the importer's
reimport_metadata() method.
- New logging message when flex attrs are excluded from the preserving process.
- Fix data_source album/item flex attr not updated on a reimport.
Perform regex and `bareasc` lookups using SQL
- Define a custom function which performs regex lookups natively in SQL. This improves
performance of lookups like beet list path::hello.
- Define a SQL function which runs unidecode for the bareasc lookups
This slightly speeds up the queries and there's a nice side-effect where
`singleton:1` and `singleton:0` now work fine!
This is ultimately building towards replacing as many python-only
queries with SQL equivalents.
- Remove initial comment around playlist entry condition (which is better
suited for user docs anyway, and stated there already)
- Add explanation above the items_paths playlist contents creation list
comprehension.