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.
- M3UFile.read() method reads in rb mode.
- M3UFile.read() method handles removal of (platform specific) line endings.
- Playlist contents and EXTM3U header is handled as bytes.
- Fix test_playlist*read* tests to encode playlist UTF-8 assert strings to
bytes using bytestring_path() before comparision.
- Fixture playlist_windows.m3u8 is now actually Windows formatted (\r\n + BOM)