beets/docs
Max Goltzsche 5d96509cfe
smartplaylist: change encoding of additional field
URL-encode additional item `fields` within generated EXTM3U playlists instead of JSON-encoding them.
This is because JSON-encoding additional fields/attributes made it difficult to parse the `EXTINF` line but using URL-encoding for these values makes parsing easy (because URL-encoded values cannot contain commas, quotation marks and spaces).

I introduced the generation of additional EXTM3U item fields earlier this year and I want to correct that now.

**Design/definition background:**
Unfortunately, I didn't find a clear definition of how additional playlist item attributes should be encoded - apparently there is none.
Given that item URIs within an M3U playlist can be URL-encoded already, defining the values of additional attributes to be URL-encoded is consistent design.
I didn't find examples of additional EXTM3U item attributes in the web where the attribute value contains a comma, space or quotation mark but examples that specified numeric IDs and URLs as attribute values.
Because the URL attribute examples I found didn't contain URL-encoded characters and because it is more readable and unproblematic for parsing, I've let the attribute URL encoding treat `:` and `/` as safe characters.

**Breaking change:**
While this is a breaking change in theory, in practice it is not since afaik all integrations of the smartplaylist plugin's additional EXTM3U item attribute generation feature (beets-webm3u) work with simple attribute values such as the item ID (numeric) whose formatting/encoding is not affected when changing from JSON to URL-encoding.
In other words the change is backward-compatible with the beets-webm3u plugin (which I'll adjust correspondingly after this beets PR was merged).
2025-02-01 01:14:27 +01:00
..
_static Transparent background logo for docs 2023-10-29 10:30:33 +01:00
dev add another benefit of item_types 2024-12-29 08:04:50 -08:00
guides Apply config-sanity-check suggestion in docs 2025-01-24 11:43:10 +01:00
plugins smartplaylist: change encoding of additional field 2025-02-01 01:14:27 +01:00
reference [doc/reference/config] Re-write explanation for 'overwrite_null' 2024-09-12 14:26:50 +02:00
changelog.rst smartplaylist: change encoding of additional field 2025-02-01 01:14:27 +01:00
code_of_conduct.rst Integrate code of conduct 2023-10-27 21:55:13 +10:00
conf.py Enable colors in the docs 2025-01-19 00:30:47 +00:00
contributing.rst add CONTRIBUTING.rst to the docs 2020-07-20 19:56:05 -07:00
faq.rst Update all docs with Poetry 2024-06-10 13:10:16 +01:00
index.rst Integrate code of conduct 2023-10-27 21:55:13 +10:00
Makefile Add new livereload server for docs 2016-01-25 13:19:26 -08:00
modd.conf Switch to modd for live docs build 2017-12-21 11:39:08 -05:00
team.rst [docs/team] Add '@bal-e' 2024-07-31 23:24:18 +02:00