Some presets put the video title into a folder name (not just the file name). The code only shortened the file name, never the folder name. So a title with multi-byte characters (like bold/fancy Unicode, which take 4 bytes each) could make the folder name go over the OS 255-byte limit and crash with OSError: [Errno 36] File name too long.
This fix shortens every folder in the path too, not just the file name, while keeping the file extension. output_directory is left alone so real folders aren't touched.
Added a test with a title made of 4-byte bold Unicode characters.
Relates to #1092, #1189
-- Thanks @Nojyto for the contribution!
Adds the ability to create map and list-based override variables.
For example, you can now create lists like this:
```
overrides:
urls:
- "https://...1"
- "https://...2"
```
which is equivalent to:
```
overrides:
urls: >-
{
[
"https://...1",
"https://...2",
]
}
```
Likewise, maps can now look like:
```
overrides:
music_video_category:
concerts:
- "https://...1"
- "https://...2"
interviews:
- "https://...3"
```
which is equivalent to:
```
overrides:
music_video_category: >-
{
"concerts": [
"https://...1",
"https://...2"
],
"interviews": [
"https://...3"
]
}
```
A complete gutting of the internals of ytdl-sub to support functions in our variable syntax, in addition to being able to access a yt-dlp entry's .info.json fields using functions. Functionally, ytdl-sub should still look and behave the same from a user-perspective.
With so many lines of code changed (+8927, -2708), no doubt there will be new issues. Please make a GH issue or reach out on Discord if your config/subscriptions break in any way/shape/form.
Details on how to use function support will come soon in the form of proper documentation in our readthedocs.
* [BUGFIX] Fix missing contains function when checking entries
* remove children func
* [BACKEND] Bandcamp e2e test, update music example
* WIP
* combine soundcloud and all music into music_audio config
* sc fixtures
* updated tests and examples
* bandcamp e2e test
* regen off
* remove url validators
* use bandcamp artist url for more parent coverage
* lint
* actually working
* changed plugin format. Need unit tests, documentation, update e2e to filter
* refactor plugin name, matching now working
* description work in progress, need more intricate testing
* tests looks good, regenerate output
* e2e tested, need more failure tests, no dupe variable names, add docs
* unit tests passing again
* more fail tests
* updated with name, default, better docs
* sanitized vars created
* youtube video url
* WIP, channel /user/ and /c/ should be valid
* unit tests passing
* soundcloud artist url
* soundcloud username
* break configs with name change
* Update all yamls with urls
* update all docs
* more negative url tests