- 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)
Make sure we stay with the beets standard of handling everything internally as
bytes.
- M3UFile.write() method writes in wb mode.
- Playlist contents and EXTM3U header is handled as bytes.
- item.destination() gives us unicode string paths, we tranlate to bytes
using util.bytestring_path().
- Fix test_playlist*write* tests to encode UTF-8 assert strings as bytes using
bytestring_path() before comparision.
The M3UFile.write() method now creates potential parent directories in a passed
playlist path.
util.mkdirall() handles errors nicely already and would exit the mainprogram
before potential subsequent failures could happen (it raises
util.FilesystemError).
Add test_playlist_write_and_read_unicode_windows: Writes 2 media file
paths containing unicode characters, reads them in using M3UFile class
again and tests if the contents is correct.