picard
picard copied to clipboard
PICARD-1877: Support language for lyrics tags
Summary
Support loading the language for ID3 lyrics tags. This avoids Picard overwriting the lyrics on existing USLT tags with "xxx" (which is mutagen's default if no language is given).
- This is a…
- [x] Bug fix
- [ ] Feature addition
- [ ] Refactoring
- [ ] Minor / simple change (like a typo)
- [ ] Other
- Describe this change in 1-2 sentences:
Problem
Picard overwrites existing language information on USLT tags.
- JIRA ticket (optional): PICARD-1877
Solution
Lyrics tags will be set as lyrcis[:lang[:desc]], where lang can also be empty to default to 'xxx'.
Note: This is very similar to how comments behave, but different. I tried to completely unify it, but it is difficult if we want to keep backward compatibility and compatibility with other formats.
The differences are, how partial and empty values will be treated.
For lyrics only ID3 supports descriptions and languages, for all other tag formats it gets converted to just a plain lyrics tag. In ID3 the following are valid:
-
lyrics
(default language xxx and no description) -
lyrics:lng:desc
(language and description) -
lyrics:lng
(only language) -
lyrics::description
(only description) -
lyrics:something that is not a 3 char language code
(only description, because the only value is never a valid language code; this is mainly to provide some backward compatibility should someone use this format ins scripts)
For comments it is different, as we supported description before:
-
comment
(default language eng and no description -
comment:des
(default language eng and short description) -
comment:lng:des
(language + description)
This is because we introduced the language support later and support plain "comment:description" also for e.g. APEv2. We probably should unify this, but it requires a bit of refactoring to existing formats and tests and is a small backward incompatible change.
any progress on this pull request ?