Got it working.

(I did not understand the CRC algorithm used.)
This commit is contained in:
The Wobbler 2025-03-30 17:00:31 +02:00
parent de1594cf50
commit 5a693f2771
2 changed files with 10 additions and 6 deletions

View file

@ -15,7 +15,7 @@ UnsupportedFormatError = tinytag.UnsupportedFormatError
class SmallTag(TinyTag):
_file_extension_mapping: dict[tuple[str, ...], type[SmallTag]]= {
(".mp1", ".mp2", ".mp3"): None,
('.oga', '.ogg', '.opus', '.spx'): tinytag._Ogg,
('.oga', '.ogg', '.opus', '.spx'): None,
('.wav',): tinytag._Wave,
('.flac',): tinytag._Flac,
('.wma',): tinytag._Wma,
@ -116,7 +116,8 @@ class SmallTag(TinyTag):
# import formats after SmallTag definition to avoid circular imports
# (this solution is stupid, but I don't know anything better.)
from ._formats import _ID3 # noqa
from ._formats import _ID3, _Ogg # noqa
SmallTag._file_extension_mapping[(".mp1", ".mp2", ".mp3")] = _ID3
SmallTag._file_extension_mapping[('.oga', '.ogg', '.opus', '.spx')] = _Ogg