feat: add FLAC lossless format support
## Summary
- Adds **FLAC lossless audio format support** to librespot-python based on [format codes in librespot upstream](https://github.com/librespot-org/librespot/blob/61f517bfff27c8cdb209cd36ffefc682285b540d/protocol/proto/metadata.proto#L309-L313)
- Refactors quality picker classes for DRYness while maintaining backward compatibility
## Details
- Add `FLAC_FLAC` (16) and `FLAC_FLAC_24BIT` (22) format codes to `metadata.proto`
- Added upstream by librespot-org/librespot#796 and librespot-org/librespot#1424
- Regenerated `Metadata_pb2.py` with protoc 3.20.1 (as in requirements)
- Removed obsolete `AAC_24_NORM` as done upstream (format that previously occupied code 16)
- Add enum values for FLAC:
- `SuperAudioFormat.FLAC` maps FLAC formats to FLAC container type
- `AudioQuality.LOSSLESS` maps FLAC formats to lossless quality tier
- Refactor to generic DRY `FormatOnlyAudioQuality` base class, while maintaining 100% backward compatibility via:
- Maintaining existing `VorbisOnlyAudioQuality` as a wrapper
- Adding new `LosslessOnlyAudioQuality` wrapper for FLAC file selection
- Also fixes minor bug within unknown-format error in decoders.py
合并状态:未合并 关闭于 2025-10-11 6 条评论