TonieToolbox 0.5.1__py3-none-any.whl → 0.6.0a1__py3-none-any.whl
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.
- TonieToolbox/__init__.py +1 -1
- TonieToolbox/__main__.py +85 -84
- TonieToolbox/artwork.py +12 -7
- TonieToolbox/audio_conversion.py +31 -28
- TonieToolbox/config.py +1 -0
- TonieToolbox/constants.py +93 -9
- TonieToolbox/filename_generator.py +6 -8
- TonieToolbox/integration.py +20 -0
- TonieToolbox/integration_macos.py +428 -0
- TonieToolbox/integration_ubuntu.py +1 -0
- TonieToolbox/integration_windows.py +404 -0
- TonieToolbox/logger.py +8 -10
- TonieToolbox/media_tags.py +17 -97
- TonieToolbox/ogg_page.py +39 -39
- TonieToolbox/opus_packet.py +13 -13
- TonieToolbox/recursive_processor.py +22 -22
- TonieToolbox/tags.py +3 -4
- TonieToolbox/teddycloud.py +50 -50
- TonieToolbox/tonie_analysis.py +24 -23
- TonieToolbox/tonie_file.py +71 -44
- TonieToolbox/tonies_json.py +69 -66
- TonieToolbox/version_handler.py +12 -15
- {tonietoolbox-0.5.1.dist-info → tonietoolbox-0.6.0a1.dist-info}/METADATA +2 -2
- tonietoolbox-0.6.0a1.dist-info/RECORD +31 -0
- tonietoolbox-0.5.1.dist-info/RECORD +0 -26
- {tonietoolbox-0.5.1.dist-info → tonietoolbox-0.6.0a1.dist-info}/WHEEL +0 -0
- {tonietoolbox-0.5.1.dist-info → tonietoolbox-0.6.0a1.dist-info}/entry_points.txt +0 -0
- {tonietoolbox-0.5.1.dist-info → tonietoolbox-0.6.0a1.dist-info}/licenses/LICENSE.md +0 -0
- {tonietoolbox-0.5.1.dist-info → tonietoolbox-0.6.0a1.dist-info}/top_level.txt +0 -0
TonieToolbox/tonies_json.py
CHANGED
@@ -29,7 +29,7 @@ class ToniesJsonHandlerv1:
|
|
29
29
|
Initialize the handler.
|
30
30
|
|
31
31
|
Args:
|
32
|
-
client: TeddyCloudClient instance to use for API communication
|
32
|
+
client (TeddyCloudClient | None): TeddyCloudClient instance to use for API communication
|
33
33
|
"""
|
34
34
|
self.client = client
|
35
35
|
self.custom_json = []
|
@@ -40,7 +40,7 @@ class ToniesJsonHandlerv1:
|
|
40
40
|
Load tonies.custom.json from the TeddyCloud server.
|
41
41
|
|
42
42
|
Returns:
|
43
|
-
True if successful, False otherwise
|
43
|
+
bool: True if successful, False otherwise
|
44
44
|
"""
|
45
45
|
if self.client is None:
|
46
46
|
logger.error("Cannot load from server: no client provided")
|
@@ -71,10 +71,10 @@ class ToniesJsonHandlerv1:
|
|
71
71
|
Load tonies.custom.json from a local file.
|
72
72
|
|
73
73
|
Args:
|
74
|
-
file_path: Path to the tonies.custom.json file
|
74
|
+
file_path (str): Path to the tonies.custom.json file
|
75
75
|
|
76
76
|
Returns:
|
77
|
-
True if successful, False otherwise
|
77
|
+
bool: True if successful, False otherwise
|
78
78
|
"""
|
79
79
|
try:
|
80
80
|
if os.path.exists(file_path):
|
@@ -109,10 +109,10 @@ class ToniesJsonHandlerv1:
|
|
109
109
|
Save tonies.custom.json to a local file.
|
110
110
|
|
111
111
|
Args:
|
112
|
-
file_path: Path where to save the tonies.custom.json file
|
112
|
+
file_path (str): Path where to save the tonies.custom.json file
|
113
113
|
|
114
114
|
Returns:
|
115
|
-
True if successful, False otherwise
|
115
|
+
bool: True if successful, False otherwise
|
116
116
|
"""
|
117
117
|
if not self.is_loaded:
|
118
118
|
logger.error("Cannot save tonies.custom.json: data not loaded")
|
@@ -131,10 +131,13 @@ class ToniesJsonHandlerv1:
|
|
131
131
|
logger.error("Error saving tonies.custom.json to file: %s", e)
|
132
132
|
return False
|
133
133
|
|
134
|
-
def renumber_series_entries(self, series: str):
|
134
|
+
def renumber_series_entries(self, series: str) -> None:
|
135
135
|
"""
|
136
136
|
Re-sort and re-number all entries for a series by year (chronological),
|
137
137
|
with entries without a year coming last.
|
138
|
+
|
139
|
+
Args:
|
140
|
+
series (str): Series name to renumber
|
138
141
|
"""
|
139
142
|
# Collect all entries for the series
|
140
143
|
series_entries = [entry for entry in self.custom_json if entry.get('series') == series]
|
@@ -167,12 +170,12 @@ class ToniesJsonHandlerv1:
|
|
167
170
|
If an entry with the same series+episodes exists, the new hash will be added to it.
|
168
171
|
|
169
172
|
Args:
|
170
|
-
taf_file: Path to the TAF file
|
171
|
-
input_files: List of input audio files used to create the TAF
|
172
|
-
artwork_url: URL of the uploaded artwork (if any)
|
173
|
+
taf_file (str): Path to the TAF file
|
174
|
+
input_files (list[str]): List of input audio files used to create the TAF
|
175
|
+
artwork_url (str | None): URL of the uploaded artwork (if any)
|
173
176
|
|
174
177
|
Returns:
|
175
|
-
True if successful, False otherwise
|
178
|
+
bool: True if successful, False otherwise
|
176
179
|
"""
|
177
180
|
logger.trace("Entering add_entry_from_taf() with taf_file=%s, input_files=%s, artwork_url=%s",
|
178
181
|
taf_file, input_files, artwork_url)
|
@@ -329,12 +332,12 @@ class ToniesJsonHandlerv1:
|
|
329
332
|
2. For entries without years: assign the next available number after those with years
|
330
333
|
|
331
334
|
Args:
|
332
|
-
series: Series name
|
333
|
-
episodes: Episodes name
|
334
|
-
year: Release year from metadata, if available
|
335
|
+
series (str): Series name
|
336
|
+
episodes (str): Episodes name
|
337
|
+
year (int | None): Release year from metadata, if available
|
335
338
|
|
336
339
|
Returns:
|
337
|
-
Generated entry number as string
|
340
|
+
str: Generated entry number as string
|
338
341
|
"""
|
339
342
|
logger.trace("Entering _generate_entry_no() with series='%s', episodes='%s', year=%s",
|
340
343
|
series, episodes, year)
|
@@ -443,10 +446,10 @@ class ToniesJsonHandlerv1:
|
|
443
446
|
Extract a year (1900-2099) from text.
|
444
447
|
|
445
448
|
Args:
|
446
|
-
text: The text to extract the year from
|
449
|
+
text (str): The text to extract the year from
|
447
450
|
|
448
451
|
Returns:
|
449
|
-
The extracted year as int, or None if no valid year found
|
452
|
+
int | None: The extracted year as int, or None if no valid year found
|
450
453
|
"""
|
451
454
|
import re
|
452
455
|
year_pattern = re.compile(r'(19\d{2}|20\d{2})')
|
@@ -467,11 +470,11 @@ class ToniesJsonHandlerv1:
|
|
467
470
|
Format a number to match the existing entry number format (e.g., with leading zeros).
|
468
471
|
|
469
472
|
Args:
|
470
|
-
number: The number to format
|
471
|
-
existing_entries: List of existing entries with their numbers
|
473
|
+
number (int): The number to format
|
474
|
+
existing_entries (list[dict]): List of existing entries with their numbers
|
472
475
|
|
473
476
|
Returns:
|
474
|
-
Formatted number as string
|
477
|
+
str: Formatted number as string
|
475
478
|
"""
|
476
479
|
max_digits = 1
|
477
480
|
for entry in existing_entries:
|
@@ -492,7 +495,7 @@ class ToniesJsonHandlerv1:
|
|
492
495
|
Generate a unique model number for a new entry.
|
493
496
|
|
494
497
|
Returns:
|
495
|
-
Unique model number in the format "model-" followed by sequential number with zero padding
|
498
|
+
str: Unique model number in the format "model-" followed by sequential number with zero padding
|
496
499
|
"""
|
497
500
|
logger.trace("Entering _generate_model_number()")
|
498
501
|
highest_num = -1
|
@@ -525,10 +528,10 @@ class ToniesJsonHandlerv1:
|
|
525
528
|
Determine the category in v1 format.
|
526
529
|
|
527
530
|
Args:
|
528
|
-
metadata: Dictionary containing file metadata
|
531
|
+
metadata (dict): Dictionary containing file metadata
|
529
532
|
|
530
533
|
Returns:
|
531
|
-
Category string in v1 format
|
534
|
+
str: Category string in v1 format
|
532
535
|
"""
|
533
536
|
if 'genre' in metadata:
|
534
537
|
genre_value = metadata['genre'].lower().strip()
|
@@ -551,10 +554,10 @@ class ToniesJsonHandlerv1:
|
|
551
554
|
Find an entry in the custom JSON by TAF hash.
|
552
555
|
|
553
556
|
Args:
|
554
|
-
taf_hash: SHA1 hash of the TAF file to find
|
557
|
+
taf_hash (str): SHA1 hash of the TAF file to find
|
555
558
|
|
556
559
|
Returns:
|
557
|
-
Tuple of (entry, entry_index) if found, or (None, None) if not found
|
560
|
+
tuple[dict | None, int | None]: Tuple of (entry, entry_index) if found, or (None, None) if not found
|
558
561
|
"""
|
559
562
|
logger.trace("Searching for entry with hash %s", taf_hash)
|
560
563
|
|
@@ -575,11 +578,11 @@ class ToniesJsonHandlerv1:
|
|
575
578
|
Find an entry in the custom JSON by series and episodes.
|
576
579
|
|
577
580
|
Args:
|
578
|
-
series: Series name to find
|
579
|
-
episodes: Episodes name to find
|
581
|
+
series (str): Series name to find
|
582
|
+
episodes (str): Episodes name to find
|
580
583
|
|
581
584
|
Returns:
|
582
|
-
Tuple of (entry, entry_index) if found, or (None, None) if not found
|
585
|
+
tuple[dict | None, int | None]: Tuple of (entry, entry_index) if found, or (None, None) if not found
|
583
586
|
"""
|
584
587
|
logger.trace("Searching for entry with series='%s', episodes='%s'", series, episodes)
|
585
588
|
|
@@ -596,10 +599,10 @@ class ToniesJsonHandlerv1:
|
|
596
599
|
Extract metadata from audio files to use in the custom JSON entry.
|
597
600
|
|
598
601
|
Args:
|
599
|
-
input_files: List of paths to audio files
|
602
|
+
input_files (list[str]): List of paths to audio files
|
600
603
|
|
601
604
|
Returns:
|
602
|
-
Dictionary containing metadata extracted from files
|
605
|
+
dict: Dictionary containing metadata extracted from files
|
603
606
|
"""
|
604
607
|
metadata = {}
|
605
608
|
track_descriptions = []
|
@@ -638,10 +641,10 @@ class ToniesJsonHandlerv1:
|
|
638
641
|
Convert data from v2 format to v1 format.
|
639
642
|
|
640
643
|
Args:
|
641
|
-
v2_data: Data in v2 format
|
644
|
+
v2_data (list[dict]): Data in v2 format
|
642
645
|
|
643
646
|
Returns:
|
644
|
-
Converted data in v1 format
|
647
|
+
list[dict]: Converted data in v1 format
|
645
648
|
"""
|
646
649
|
v1_data = []
|
647
650
|
|
@@ -687,10 +690,10 @@ class ToniesJsonHandlerv1:
|
|
687
690
|
Convert category from v2 format to v1 format.
|
688
691
|
|
689
692
|
Args:
|
690
|
-
v2_category: Category in v2 format
|
693
|
+
v2_category (str): Category in v2 format
|
691
694
|
|
692
695
|
Returns:
|
693
|
-
Category in v1 format
|
696
|
+
str: Category in v1 format
|
694
697
|
"""
|
695
698
|
v2_to_v1_mapping = {
|
696
699
|
"music": "music",
|
@@ -710,7 +713,7 @@ class ToniesJsonHandlerv2:
|
|
710
713
|
Initialize the handler.
|
711
714
|
|
712
715
|
Args:
|
713
|
-
client: TeddyCloudClient instance to use for API communication
|
716
|
+
client (TeddyCloudClient | None): TeddyCloudClient instance to use for API communication
|
714
717
|
"""
|
715
718
|
self.client = client
|
716
719
|
self.custom_json = []
|
@@ -721,7 +724,7 @@ class ToniesJsonHandlerv2:
|
|
721
724
|
Load tonies.custom.json from the TeddyCloud server.
|
722
725
|
|
723
726
|
Returns:
|
724
|
-
True if successful, False otherwise
|
727
|
+
bool: True if successful, False otherwise
|
725
728
|
"""
|
726
729
|
if self.client is None:
|
727
730
|
logger.error("Cannot load from server: no client provided")
|
@@ -747,10 +750,10 @@ class ToniesJsonHandlerv2:
|
|
747
750
|
Load tonies.custom.json from a local file.
|
748
751
|
|
749
752
|
Args:
|
750
|
-
file_path: Path to the tonies.custom.json file
|
753
|
+
file_path (str): Path to the tonies.custom.json file
|
751
754
|
|
752
755
|
Returns:
|
753
|
-
True if successful, False otherwise
|
756
|
+
bool: True if successful, False otherwise
|
754
757
|
"""
|
755
758
|
try:
|
756
759
|
if os.path.exists(file_path):
|
@@ -780,10 +783,10 @@ class ToniesJsonHandlerv2:
|
|
780
783
|
Save tonies.custom.json to a local file.
|
781
784
|
|
782
785
|
Args:
|
783
|
-
file_path: Path where to save the tonies.custom.json file
|
786
|
+
file_path (str): Path where to save the tonies.custom.json file
|
784
787
|
|
785
788
|
Returns:
|
786
|
-
True if successful, False otherwise
|
789
|
+
bool: True if successful, False otherwise
|
787
790
|
"""
|
788
791
|
if not self.is_loaded:
|
789
792
|
logger.error("Cannot save tonies.custom.json: data not loaded")
|
@@ -809,12 +812,12 @@ class ToniesJsonHandlerv2:
|
|
809
812
|
If an entry with the same series+episode exists, the new hash will be added to it.
|
810
813
|
|
811
814
|
Args:
|
812
|
-
taf_file: Path to the TAF file
|
813
|
-
input_files: List of input audio files used to create the TAF
|
814
|
-
artwork_url: URL of the uploaded artwork (if any)
|
815
|
+
taf_file (str): Path to the TAF file
|
816
|
+
input_files (list[str]): List of input audio files used to create the TAF
|
817
|
+
artwork_url (str | None): URL of the uploaded artwork (if any)
|
815
818
|
|
816
819
|
Returns:
|
817
|
-
True if successful, False otherwise
|
820
|
+
bool: True if successful, False otherwise
|
818
821
|
"""
|
819
822
|
logger.trace("Entering add_entry_from_taf() with taf_file=%s, input_files=%s, artwork_url=%s",
|
820
823
|
taf_file, input_files, artwork_url)
|
@@ -915,7 +918,7 @@ class ToniesJsonHandlerv2:
|
|
915
918
|
Generate a unique article ID for a new entry.
|
916
919
|
|
917
920
|
Returns:
|
918
|
-
Unique article ID in the format "tt-42" followed by sequential number starting from 0
|
921
|
+
str: Unique article ID in the format "tt-42" followed by sequential number starting from 0
|
919
922
|
"""
|
920
923
|
logger.trace("Entering _generate_article_id()")
|
921
924
|
highest_num = -1
|
@@ -948,10 +951,10 @@ class ToniesJsonHandlerv2:
|
|
948
951
|
Extract metadata from audio files to use in the custom JSON entry.
|
949
952
|
|
950
953
|
Args:
|
951
|
-
input_files: List of paths to audio files
|
954
|
+
input_files (list[str]): List of paths to audio files
|
952
955
|
|
953
956
|
Returns:
|
954
|
-
Dictionary containing metadata extracted from files
|
957
|
+
dict: Dictionary containing metadata extracted from files
|
955
958
|
"""
|
956
959
|
metadata = {}
|
957
960
|
track_descriptions = []
|
@@ -1043,10 +1046,10 @@ class ToniesJsonHandlerv2:
|
|
1043
1046
|
Find an entry in the custom JSON by TAF hash.
|
1044
1047
|
|
1045
1048
|
Args:
|
1046
|
-
taf_hash: SHA1 hash of the TAF file to find
|
1049
|
+
taf_hash (str): SHA1 hash of the TAF file to find
|
1047
1050
|
|
1048
1051
|
Returns:
|
1049
|
-
Tuple of (entry, entry_index, data_index) if found, or (None, None, None) if not found
|
1052
|
+
tuple[dict | None, int | None, int | None]: Tuple of (entry, entry_index, data_index) if found, or (None, None, None) if not found
|
1050
1053
|
"""
|
1051
1054
|
logger.trace("Searching for entry with hash %s", taf_hash)
|
1052
1055
|
|
@@ -1071,11 +1074,11 @@ class ToniesJsonHandlerv2:
|
|
1071
1074
|
Find an entry in the custom JSON by series and episode.
|
1072
1075
|
|
1073
1076
|
Args:
|
1074
|
-
series: Series name to find
|
1075
|
-
episode: Episode name to find
|
1077
|
+
series (str): Series name to find
|
1078
|
+
episode (str): Episode name to find
|
1076
1079
|
|
1077
1080
|
Returns:
|
1078
|
-
Tuple of (entry, entry_index, data_index) if found, or (None, None, None) if not found
|
1081
|
+
tuple[dict | None, int | None, int | None]: Tuple of (entry, entry_index, data_index) if found, or (None, None, None) if not found
|
1079
1082
|
"""
|
1080
1083
|
logger.trace("Searching for entry with series='%s', episode='%s'", series, episode)
|
1081
1084
|
|
@@ -1096,10 +1099,10 @@ class ToniesJsonHandlerv2:
|
|
1096
1099
|
Calculate the total runtime in minutes from a list of audio files.
|
1097
1100
|
|
1098
1101
|
Args:
|
1099
|
-
input_files: List of paths to audio files
|
1102
|
+
input_files (list[str]): List of paths to audio files
|
1100
1103
|
|
1101
1104
|
Returns:
|
1102
|
-
Total runtime in minutes (rounded to the nearest minute)
|
1105
|
+
int: Total runtime in minutes (rounded to the nearest minute)
|
1103
1106
|
"""
|
1104
1107
|
logger.trace("Entering _calculate_runtime() with %d input files", len(input_files))
|
1105
1108
|
total_runtime_seconds = 0
|
@@ -1166,14 +1169,14 @@ def fetch_and_update_tonies_json_v1(client: TeddyCloudClient, taf_file: Optional
|
|
1166
1169
|
Fetch tonies.custom.json from server and merge with local file if it exists, then update with new entry in v1 format.
|
1167
1170
|
|
1168
1171
|
Args:
|
1169
|
-
client: TeddyCloudClient instance to use for API communication
|
1170
|
-
taf_file: Path to the TAF file to add
|
1171
|
-
input_files: List of input audio files used to create the TAF
|
1172
|
-
artwork_url: URL of the uploaded artwork (if any)
|
1173
|
-
output_dir: Directory where to save the tonies.custom.json file (defaults to './output')
|
1172
|
+
client (TeddyCloudClient): TeddyCloudClient instance to use for API communication
|
1173
|
+
taf_file (str | None): Path to the TAF file to add
|
1174
|
+
input_files (list[str] | None): List of input audio files used to create the TAF
|
1175
|
+
artwork_url (str | None): URL of the uploaded artwork (if any)
|
1176
|
+
output_dir (str | None): Directory where to save the tonies.custom.json file (defaults to './output')
|
1174
1177
|
|
1175
1178
|
Returns:
|
1176
|
-
True if successful, False otherwise
|
1179
|
+
bool: True if successful, False otherwise
|
1177
1180
|
"""
|
1178
1181
|
logger.trace("Entering fetch_and_update_tonies_json_v1 with client=%s, taf_file=%s, input_files=%s, artwork_url=%s, output_dir=%s",
|
1179
1182
|
client, taf_file, input_files, artwork_url, output_dir)
|
@@ -1275,14 +1278,14 @@ def fetch_and_update_tonies_json_v2(client: TeddyCloudClient, taf_file: Optional
|
|
1275
1278
|
Fetch tonies.custom.json from server and merge with local file if it exists, then update with new entry.
|
1276
1279
|
|
1277
1280
|
Args:
|
1278
|
-
client: TeddyCloudClient instance to use for API communication
|
1279
|
-
taf_file: Path to the TAF file to add
|
1280
|
-
input_files: List of input audio files used to create the TAF
|
1281
|
-
artwork_url: URL of the uploaded artwork (if any)
|
1282
|
-
output_dir: Directory where to save the tonies.custom.json file (defaults to './output')
|
1281
|
+
client (TeddyCloudClient): TeddyCloudClient instance to use for API communication
|
1282
|
+
taf_file (str | None): Path to the TAF file to add
|
1283
|
+
input_files (list[str] | None): List of input audio files used to create the TAF
|
1284
|
+
artwork_url (str | None): URL of the uploaded artwork (if any)
|
1285
|
+
output_dir (str | None): Directory where to save the tonies.custom.json file (defaults to './output')
|
1283
1286
|
|
1284
1287
|
Returns:
|
1285
|
-
True if successful, False otherwise
|
1288
|
+
bool: True if successful, False otherwise
|
1286
1289
|
"""
|
1287
1290
|
logger.trace("Entering fetch_and_update_tonies_json with client=%s, taf_file=%s, input_files=%s, artwork_url=%s, output_dir=%s",
|
1288
1291
|
client, taf_file, input_files, artwork_url, output_dir)
|
TonieToolbox/version_handler.py
CHANGED
@@ -18,15 +18,14 @@ CACHE_FILE = os.path.join(CACHE_DIR, "version_cache.json")
|
|
18
18
|
CACHE_EXPIRY = 86400 # 24 hours in seconds
|
19
19
|
|
20
20
|
|
21
|
-
def get_pypi_version(force_refresh=False):
|
21
|
+
def get_pypi_version(force_refresh: bool = False) -> tuple[str, str | None]:
|
22
22
|
"""
|
23
23
|
Get the latest version of TonieToolbox from PyPI.
|
24
24
|
|
25
25
|
Args:
|
26
|
-
force_refresh: If True, ignore the cache and fetch directly from PyPI
|
27
|
-
|
26
|
+
force_refresh (bool): If True, ignore the cache and fetch directly from PyPI
|
28
27
|
Returns:
|
29
|
-
tuple: (latest_version, None) on success, (current_version, error_message) on failure
|
28
|
+
tuple[str, str | None]: (latest_version, None) on success, (current_version, error_message) on failure
|
30
29
|
"""
|
31
30
|
logger = get_logger("version_handler")
|
32
31
|
logger.debug("Checking for latest version (force_refresh=%s)", force_refresh)
|
@@ -88,14 +87,13 @@ def get_pypi_version(force_refresh=False):
|
|
88
87
|
return __version__, f"Unexpected error checking for updates: {str(e)}"
|
89
88
|
|
90
89
|
|
91
|
-
def compare_versions(v1, v2):
|
90
|
+
def compare_versions(v1: str, v2: str) -> int:
|
92
91
|
"""
|
93
92
|
Compare two version strings according to PEP 440.
|
94
93
|
|
95
94
|
Args:
|
96
|
-
v1: First version string
|
97
|
-
v2: Second version string
|
98
|
-
|
95
|
+
v1 (str): First version string
|
96
|
+
v2 (str): Second version string
|
99
97
|
Returns:
|
100
98
|
int: -1 if v1 < v2, 0 if v1 == v2, 1 if v1 > v2
|
101
99
|
"""
|
@@ -133,16 +131,15 @@ def compare_versions(v1, v2):
|
|
133
131
|
return 1
|
134
132
|
|
135
133
|
|
136
|
-
def check_for_updates(quiet=False, force_refresh=False):
|
134
|
+
def check_for_updates(quiet: bool = False, force_refresh: bool = False) -> tuple[bool, str, str, bool]:
|
137
135
|
"""
|
138
136
|
Check if the current version of TonieToolbox is the latest.
|
139
137
|
|
140
138
|
Args:
|
141
|
-
quiet: If True, will not log any information messages and skip user confirmation
|
142
|
-
force_refresh: If True, bypass cache and check PyPI directly
|
143
|
-
|
139
|
+
quiet (bool): If True, will not log any information messages and skip user confirmation
|
140
|
+
force_refresh (bool): If True, bypass cache and check PyPI directly
|
144
141
|
Returns:
|
145
|
-
tuple: (is_latest, latest_version, message, update_confirmed)
|
142
|
+
tuple[bool, str, str, bool]: (is_latest, latest_version, message, update_confirmed)
|
146
143
|
is_latest: boolean indicating if the current version is the latest
|
147
144
|
latest_version: string with the latest version
|
148
145
|
message: string message about the update status or error
|
@@ -200,7 +197,7 @@ def check_for_updates(quiet=False, force_refresh=False):
|
|
200
197
|
return is_latest, latest_version, message, update_confirmed
|
201
198
|
|
202
199
|
|
203
|
-
def install_update():
|
200
|
+
def install_update() -> bool:
|
204
201
|
"""
|
205
202
|
Try to install the update using pip, pip3, or pipx.
|
206
203
|
|
@@ -238,7 +235,7 @@ def install_update():
|
|
238
235
|
return False
|
239
236
|
|
240
237
|
|
241
|
-
def clear_version_cache():
|
238
|
+
def clear_version_cache() -> bool:
|
242
239
|
"""
|
243
240
|
Clear the version cache file to force a refresh on next check.
|
244
241
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: TonieToolbox
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.0a1
|
4
4
|
Summary: Create files for the Tonie box and interact with TeddyCloud servers
|
5
5
|
Home-page: https://github.com/Quentendo64/TonieToolbox
|
6
6
|
Author: Quentendo64
|
@@ -33,7 +33,7 @@ Dynamic: requires-python
|
|
33
33
|
|
34
34
|
# TonieToolbox 🎵📦
|
35
35
|
|
36
|
-
[](https://github.com/Quentendo64/TonieToolbox/actions)
|
37
37
|
[](https://github.com/Quentendo64/TonieToolbox/actions)
|
38
38
|
|
39
39
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
TonieToolbox/__init__.py,sha256=H9C8hvC7PUd27ggMybMlCYcOkSCis5TDSDcwhNFMNxI,98
|
2
|
+
TonieToolbox/__main__.py,sha256=dKZ4d6LvLyNZRLKoGvFgi6_qdsv3lljNjC0TocDIt_w,33724
|
3
|
+
TonieToolbox/artwork.py,sha256=fOlYx1cffVq-2u1e_qiW5bd3LpPCGMmIfZAxIwC05tA,4451
|
4
|
+
TonieToolbox/audio_conversion.py,sha256=0GpC6mSRYikIjf_A1w26LAnYtCP2gpHLEKozOISapnM,17190
|
5
|
+
TonieToolbox/config.py,sha256=5GEofOU10aPT2E5nvYOeClNK73ODVeh2zhykMbBmgnI,22
|
6
|
+
TonieToolbox/constants.py,sha256=c8wwWGgjgsj1V4XiYizhY6bXLwa80AchnICvWSDkimg,6789
|
7
|
+
TonieToolbox/dependency_manager.py,sha256=EvVUO4T1CrhUXlrVk9HBgCRDER3b1BRNdgkZLSpCTho,27921
|
8
|
+
TonieToolbox/filename_generator.py,sha256=ATCG4w8uN1vyAqvmdhOtpJLlb9QFKCnYIdBViYqpHjw,3464
|
9
|
+
TonieToolbox/integration.py,sha256=R0amnTvBj6IlILk8SgNlrSO-0SRIpzqBjAXh7CtYiyk,948
|
10
|
+
TonieToolbox/integration_macos.py,sha256=feaErW81WvkHvO-CP7vGOLIrFVoEdzWH1BkkiNuxyyU,17970
|
11
|
+
TonieToolbox/integration_ubuntu.py,sha256=MU6W0xRCdoHBxrIiOIHePqYTF5Wvn4JxBnDQUPf6fgg,33
|
12
|
+
TonieToolbox/integration_windows.py,sha256=LMDkOy2wo5iGTp-kVzRhz_0MzNu42IWNBf-VdvAQQ8A,22280
|
13
|
+
TonieToolbox/logger.py,sha256=Q_cXbCWfzNmt5q6fvVzeM8IugkD24CSZAVjuf16n6b4,3120
|
14
|
+
TonieToolbox/media_tags.py,sha256=oDlLe0AyvmIdQlqPzH74AUCqwbZZ-49AQKAJdrW26XE,20830
|
15
|
+
TonieToolbox/ogg_page.py,sha256=IHdP0er0TYjyLfON8zes11FdQtRab3QNxeK6sxnAX08,22340
|
16
|
+
TonieToolbox/opus_packet.py,sha256=yz5jvViGZ-nGZjEaQ1gCKd-j1jPW402szYirbEl4izA,8019
|
17
|
+
TonieToolbox/recursive_processor.py,sha256=6JD4b5sGnCe45GkJqWua9u9ZHv-RC77BRV58qQ8pA3Q,13904
|
18
|
+
TonieToolbox/tags.py,sha256=7BowNWmbJDymvJ0hPVAAXwJRAfPklLokQQuV8FVldSI,2700
|
19
|
+
TonieToolbox/teddycloud.py,sha256=5PSV5Qp0VRfDG78kGPbKQ7bXxxB1sfmGNHYhvIumVF8,13794
|
20
|
+
TonieToolbox/tonie_analysis.py,sha256=KYDfWi9EmA5EvVyq_h_gcxrZ5Eaa5etYsF152GRgyqI,30787
|
21
|
+
TonieToolbox/tonie_file.py,sha256=YntpgpmtWTe64WWqJmWWo2sXyMUnZ57pp3sKGoY-Yik,21754
|
22
|
+
TonieToolbox/tonie_header.proto,sha256=WaWfwO4VrwGtscK2ujfDRKtpeBpaVPoZhI8iMmR-C0U,202
|
23
|
+
TonieToolbox/tonie_header_pb2.py,sha256=s5bp4ULTEekgq6T61z9fDkRavyPM-3eREs20f_Pxxe8,3665
|
24
|
+
TonieToolbox/tonies_json.py,sha256=YGS2wtaDudxxSy7QuRLWaE5n4bf_AyoSvVLH1Vdh8SE,60754
|
25
|
+
TonieToolbox/version_handler.py,sha256=MLpJ9mSEHkcSoyePnACpfINHTSB1q1_4iEgcT1tGqNU,10028
|
26
|
+
tonietoolbox-0.6.0a1.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
|
27
|
+
tonietoolbox-0.6.0a1.dist-info/METADATA,sha256=zCDKsxxfyJmQ_a1X_9kAjlJhTv8DErsxbM2udCXTl0E,26848
|
28
|
+
tonietoolbox-0.6.0a1.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
29
|
+
tonietoolbox-0.6.0a1.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
|
30
|
+
tonietoolbox-0.6.0a1.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
|
31
|
+
tonietoolbox-0.6.0a1.dist-info/RECORD,,
|
@@ -1,26 +0,0 @@
|
|
1
|
-
TonieToolbox/__init__.py,sha256=xOsJnu--2TXqOdJT6N_Z3UF2fguZbJpn8PjkEDC__Qk,96
|
2
|
-
TonieToolbox/__main__.py,sha256=4zpa_i70Gr4KCbAGNa1aWRMbRaxFmH12yj7r-rNqq8M,33771
|
3
|
-
TonieToolbox/artwork.py,sha256=Q1cwcJu-bmBiDLOzYTIcX1UAh-Bf6vgQY1PqW0KXZlw,4359
|
4
|
-
TonieToolbox/audio_conversion.py,sha256=VbntGybLdmhvokN_YJOGejyqvDTINT56t4N-aTyl9jE,16902
|
5
|
-
TonieToolbox/constants.py,sha256=BQ6eUNvT3eXgsz8KFYMrqpn5vRPXrp2d6folxP6H03E,4374
|
6
|
-
TonieToolbox/dependency_manager.py,sha256=EvVUO4T1CrhUXlrVk9HBgCRDER3b1BRNdgkZLSpCTho,27921
|
7
|
-
TonieToolbox/filename_generator.py,sha256=RqQHyGTKakuWR01yMSnFVMU_HfLw3rqFxKhXNIHdTlg,3441
|
8
|
-
TonieToolbox/logger.py,sha256=eZoQj4xICKEZ645GhIfZhAPAjgbgjnnfTXZ_soPjyDg,3017
|
9
|
-
TonieToolbox/media_tags.py,sha256=Dy5iPLdOhKsOVkm3BpSq_WVGzakeXP-sDTfge2V1v4A,23230
|
10
|
-
TonieToolbox/ogg_page.py,sha256=-ViaIRBgh5ayfwmyplL8QmmRr5P36X8W0DdHkSFUYUU,21948
|
11
|
-
TonieToolbox/opus_packet.py,sha256=OcHXEe3I_K4mWPUD55prpG42sZxJsEeAxqSbFxBmb0c,7895
|
12
|
-
TonieToolbox/recursive_processor.py,sha256=A6PYj9ZGGt6HqvTc9h-wWS0xt0isH-pvE2yAcVobnhs,13647
|
13
|
-
TonieToolbox/tags.py,sha256=ji9N1b3zX5E3YqOayBqdUiJ99SA0HuR_RrXaRe-q1ok,2682
|
14
|
-
TonieToolbox/teddycloud.py,sha256=UwWIT6xVAb06g7vftzU_IxH5ZNtWmjgcHQDXhvuB6u8,13433
|
15
|
-
TonieToolbox/tonie_analysis.py,sha256=NdUXiZRVNW8T2C6EhqicgbohmPP9irX4q8hiQxBhc0E,30540
|
16
|
-
TonieToolbox/tonie_file.py,sha256=_IGyb7snqBoaQQjTnYsP5sz9uI5AJTcWSIkBwGyIg-M,21146
|
17
|
-
TonieToolbox/tonie_header.proto,sha256=WaWfwO4VrwGtscK2ujfDRKtpeBpaVPoZhI8iMmR-C0U,202
|
18
|
-
TonieToolbox/tonie_header_pb2.py,sha256=s5bp4ULTEekgq6T61z9fDkRavyPM-3eREs20f_Pxxe8,3665
|
19
|
-
TonieToolbox/tonies_json.py,sha256=Yftk_eUK2UJPY5Tm7JSoWORUuiVpnUe7z4-mDhRWbrM,59950
|
20
|
-
TonieToolbox/version_handler.py,sha256=Uiob27NKvemJUR-SPPdhQLYp07o8eDyCik_KAY4KPDY,9869
|
21
|
-
tonietoolbox-0.5.1.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
|
22
|
-
tonietoolbox-0.5.1.dist-info/METADATA,sha256=HZllZyXc1vDfMW-rziCcCeWwcCeNRBmUi6Hy4JPi06I,26843
|
23
|
-
tonietoolbox-0.5.1.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
24
|
-
tonietoolbox-0.5.1.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
|
25
|
-
tonietoolbox-0.5.1.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
|
26
|
-
tonietoolbox-0.5.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|