tinytag 2.2.0__tar.gz → 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tinytag might be problematic. Click here for more details.
- {tinytag-2.2.0 → tinytag-2.2.1}/LICENSE +1 -1
- {tinytag-2.2.0 → tinytag-2.2.1}/PKG-INFO +6 -2
- {tinytag-2.2.0 → tinytag-2.2.1}/README.md +5 -1
- {tinytag-2.2.0 → tinytag-2.2.1}/tinytag/__init__.py +2 -2
- {tinytag-2.2.0 → tinytag-2.2.1}/tinytag/tinytag.py +8 -5
- {tinytag-2.2.0 → tinytag-2.2.1}/pyproject.toml +0 -0
- {tinytag-2.2.0 → tinytag-2.2.1}/tinytag/__main__.py +0 -0
- {tinytag-2.2.0 → tinytag-2.2.1}/tinytag/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2014-
|
|
3
|
+
Copyright (c) 2014-2026 Tom Wallroth, Mat (mathiascode), et al.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tinytag
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: Read audio file metadata
|
|
5
5
|
Keywords: metadata,audio,music,mp3,m4a,wav,ogg,opus,flac,wma,aiff
|
|
6
6
|
Author: Tom Wallroth, Mat (mathiascode)
|
|
@@ -37,7 +37,7 @@ Project-URL: Homepage, https://github.com/tinytag/tinytag
|
|
|
37
37
|
Provides-Extra: tests
|
|
38
38
|
|
|
39
39
|
<!--
|
|
40
|
-
SPDX-FileCopyrightText: 2014-
|
|
40
|
+
SPDX-FileCopyrightText: 2014-2026 tinytag Contributors
|
|
41
41
|
SPDX-License-Identifier: MIT
|
|
42
42
|
-->
|
|
43
43
|
|
|
@@ -429,6 +429,10 @@ TinyTag.get(file_obj=your_file_obj)
|
|
|
429
429
|
|
|
430
430
|
## Changelog
|
|
431
431
|
|
|
432
|
+
### 2.2.1 (2026-03-15)
|
|
433
|
+
|
|
434
|
+
- ID3: Prevent infinite loop due to malformed SYLT strings
|
|
435
|
+
|
|
432
436
|
### 2.2.0 (2025-12-15)
|
|
433
437
|
|
|
434
438
|
- Add support for movement, work and grouping fields
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
SPDX-FileCopyrightText: 2014-
|
|
2
|
+
SPDX-FileCopyrightText: 2014-2026 tinytag Contributors
|
|
3
3
|
SPDX-License-Identifier: MIT
|
|
4
4
|
-->
|
|
5
5
|
|
|
@@ -391,6 +391,10 @@ TinyTag.get(file_obj=your_file_obj)
|
|
|
391
391
|
|
|
392
392
|
## Changelog
|
|
393
393
|
|
|
394
|
+
### 2.2.1 (2026-03-15)
|
|
395
|
+
|
|
396
|
+
- ID3: Prevent infinite loop due to malformed SYLT strings
|
|
397
|
+
|
|
394
398
|
### 2.2.0 (2025-12-15)
|
|
395
399
|
|
|
396
400
|
- Add support for movement, work and grouping fields
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: 2014-
|
|
1
|
+
# SPDX-FileCopyrightText: 2014-2026 tinytag Contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
"""Audio file metadata reader."""
|
|
5
5
|
|
|
6
|
-
__version__ = '2.2.
|
|
6
|
+
__version__ = '2.2.1'
|
|
7
7
|
|
|
8
8
|
from .tinytag import (
|
|
9
9
|
TinyTag, Image, Images, OtherFields, OtherImages,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: 2014-
|
|
1
|
+
# SPDX-FileCopyrightText: 2014-2026 tinytag Contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
# tinytag - an audio file metadata reader
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# MIT License
|
|
8
8
|
|
|
9
|
-
# Copyright (c) 2014-
|
|
9
|
+
# Copyright (c) 2014-2026 Tom Wallroth, Mat (mathiascode), et al.
|
|
10
10
|
|
|
11
11
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
12
12
|
# copy of this software and associated documentation files (the "Software"),
|
|
@@ -1233,6 +1233,8 @@ class _ID3(TinyTag):
|
|
|
1233
1233
|
value = self._decode_string(
|
|
1234
1234
|
encoding + content[offset:end_pos]).lstrip('\n')
|
|
1235
1235
|
offset = end_pos
|
|
1236
|
+
if offset + 4 > content_length:
|
|
1237
|
+
break
|
|
1236
1238
|
time = unpack('>I', content[offset:offset + 4])[0]
|
|
1237
1239
|
offset += 4
|
|
1238
1240
|
if found_line:
|
|
@@ -1343,13 +1345,14 @@ class _ID3(TinyTag):
|
|
|
1343
1345
|
start_pos: int = 0) -> int:
|
|
1344
1346
|
# latin1 and utf-8 are 1 byte
|
|
1345
1347
|
if encoding in {b'\x00', b'\x03'}:
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
+
end_pos = content.find(b'\x00', start_pos)
|
|
1349
|
+
return start_pos if end_pos < 0 else end_pos + 1
|
|
1350
|
+
end_pos = -1
|
|
1348
1351
|
for i in range(start_pos, len(content), 2):
|
|
1349
1352
|
if content[i:i + 2] == b'\x00\x00':
|
|
1350
1353
|
end_pos = i + 2
|
|
1351
1354
|
break
|
|
1352
|
-
return end_pos
|
|
1355
|
+
return start_pos if end_pos < 0 else end_pos
|
|
1353
1356
|
|
|
1354
1357
|
def _decode_string(self, value: bytes, language: bool = False) -> str:
|
|
1355
1358
|
default_encoding = 'ISO-8859-1'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|