TonieToolbox 0.6.0rc2__py3-none-any.whl → 0.6.1__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/integration.py +4 -2
- TonieToolbox/tonies_json.py +16 -8
- {tonietoolbox-0.6.0rc2.dist-info → tonietoolbox-0.6.1.dist-info}/METADATA +1 -1
- {tonietoolbox-0.6.0rc2.dist-info → tonietoolbox-0.6.1.dist-info}/RECORD +9 -9
- {tonietoolbox-0.6.0rc2.dist-info → tonietoolbox-0.6.1.dist-info}/WHEEL +1 -1
- {tonietoolbox-0.6.0rc2.dist-info → tonietoolbox-0.6.1.dist-info}/entry_points.txt +0 -0
- {tonietoolbox-0.6.0rc2.dist-info → tonietoolbox-0.6.1.dist-info}/licenses/LICENSE.md +0 -0
- {tonietoolbox-0.6.0rc2.dist-info → tonietoolbox-0.6.1.dist-info}/top_level.txt +0 -0
TonieToolbox/__init__.py
CHANGED
TonieToolbox/integration.py
CHANGED
@@ -59,11 +59,13 @@ def handle_config():
|
|
59
59
|
return
|
60
60
|
if platform.system() == "Windows":
|
61
61
|
from .integration_windows import WindowsClassicContextMenuIntegration as ContextMenuIntegration
|
62
|
-
ContextMenuIntegration
|
62
|
+
context_menu = ContextMenuIntegration()
|
63
|
+
context_menu._apply_config_template()
|
63
64
|
os.startfile(config_path)
|
64
65
|
elif platform.system() == "Darwin":
|
65
66
|
from .integration_macos import MacOSContextMenuIntegration as ContextMenuIntegration
|
66
|
-
ContextMenuIntegration
|
67
|
+
context_menu = ContextMenuIntegration()
|
68
|
+
context_menu._apply_config_template()
|
67
69
|
subprocess.call(["open", config_path])
|
68
70
|
elif platform.system() == "Linux":
|
69
71
|
subprocess.call(["xdg-open", config_path])
|
TonieToolbox/tonies_json.py
CHANGED
@@ -180,20 +180,23 @@ class ToniesJsonHandlerv1:
|
|
180
180
|
"""
|
181
181
|
logger.trace("Entering add_entry_from_taf() with taf_file=%s, input_files=%s, artwork_url=%s",
|
182
182
|
taf_file, input_files, artwork_url)
|
183
|
-
|
184
183
|
if not self.is_loaded:
|
185
184
|
logger.error("Cannot add entry: tonies.custom.json not loaded")
|
186
185
|
return False
|
187
186
|
|
188
187
|
try:
|
189
|
-
logger.info("Adding entry for %s to tonies.custom.json", taf_file)
|
188
|
+
logger.info("Adding entry for %s to tonies.custom.json", taf_file)
|
190
189
|
logger.debug("Extracting metadata from input files")
|
191
190
|
metadata = self._extract_metadata_from_files(input_files)
|
192
191
|
logger.debug("Extracted metadata: %s", metadata)
|
192
|
+
logger.debug("Extracting hash and timestamp from TAF file header")
|
193
|
+
from .tonie_analysis import get_header_info
|
193
194
|
with open(taf_file, 'rb') as f:
|
194
|
-
|
195
|
-
|
196
|
-
|
195
|
+
header_size, tonie_header, file_size, audio_size, sha1, opus_head_found, \
|
196
|
+
opus_version, channel_count, sample_rate, bitstream_serial_no, opus_comments = get_header_info(f)
|
197
|
+
taf_hash = tonie_header.dataHash.hex().upper()
|
198
|
+
timestamp = str(bitstream_serial_no)
|
199
|
+
logger.debug("Extracted hash: %s, timestamp: %s", taf_hash, timestamp)
|
197
200
|
series = metadata.get('albumartist', metadata.get('artist', 'Unknown Artist'))
|
198
201
|
episodes = metadata.get('album', os.path.splitext(os.path.basename(taf_file))[0])
|
199
202
|
copyright = metadata.get('copyright', '')
|
@@ -829,15 +832,20 @@ class ToniesJsonHandlerv2:
|
|
829
832
|
|
830
833
|
try:
|
831
834
|
logger.info("Adding entry for %s to tonies.custom.json", taf_file)
|
832
|
-
|
833
835
|
logger.debug("Extracting metadata from input files")
|
834
836
|
metadata = self._extract_metadata_from_files(input_files)
|
835
837
|
logger.debug("Extracted metadata: %s", metadata)
|
838
|
+
|
839
|
+
logger.debug("Extracting hash and timestamp from TAF file header")
|
840
|
+
from .tonie_analysis import get_header_info
|
836
841
|
with open(taf_file, 'rb') as f:
|
837
|
-
|
842
|
+
header_size, tonie_header, file_size, audio_size, sha1, opus_head_found, \
|
843
|
+
opus_version, channel_count, sample_rate, bitstream_serial_no, opus_comments = get_header_info(f)
|
844
|
+
taf_hash = tonie_header.dataHash.hex().upper()
|
845
|
+
timestamp = bitstream_serial_no
|
846
|
+
logger.debug("Extracted hash: %s, timestamp: %s", taf_hash, timestamp)
|
838
847
|
|
839
848
|
taf_size = os.path.getsize(taf_file)
|
840
|
-
timestamp = int(time.time())
|
841
849
|
series = metadata.get('albumartist', metadata.get('artist', 'Unknown Artist'))
|
842
850
|
episode = metadata.get('album', os.path.splitext(os.path.basename(taf_file))[0])
|
843
851
|
track_desc = metadata.get('track_descriptions', [])
|
@@ -1,11 +1,11 @@
|
|
1
|
-
TonieToolbox/__init__.py,sha256=
|
1
|
+
TonieToolbox/__init__.py,sha256=viFuWgxjToGcxMcK5fE58lpecgEZU6BiY5xg2LsoPOw,115
|
2
2
|
TonieToolbox/__main__.py,sha256=KSDasW-QaTzStXSKtemMKxoFV8IWvCmq1Oig5yo8BQs,41573
|
3
3
|
TonieToolbox/artwork.py,sha256=BhAjLWqzui8zUOU9z9P4H3zbCCTOB94aT0MPlqEvZoY,5605
|
4
4
|
TonieToolbox/audio_conversion.py,sha256=xXXsRGPS_yQ_mqtFJiqupLbeXN8__Q2Hg05C94EPC_8,17199
|
5
5
|
TonieToolbox/constants.py,sha256=nTKDBy55PTv6Tazda3rsZZcckcm3AZOyWXa1LDuTuEk,33989
|
6
6
|
TonieToolbox/dependency_manager.py,sha256=sQv0vNE7Gp_RqdR9GOwF8jJgu8GTw0Krppg5MjG5qJU,49432
|
7
7
|
TonieToolbox/filename_generator.py,sha256=NJrRxv0sm_9G5ZDp1QG39mktgJnz5yGC8HUs7NhLYFg,5293
|
8
|
-
TonieToolbox/integration.py,sha256=
|
8
|
+
TonieToolbox/integration.py,sha256=a-GBynecxwozUqEe3NjXbePcBpolzWKBZLQ5BeHsG2E,3302
|
9
9
|
TonieToolbox/integration_macos.py,sha256=YxK7gIqiy1QTp7EM1M1OPC-mgb3gaIoI6Xfu3eUAyX0,27311
|
10
10
|
TonieToolbox/integration_ubuntu.py,sha256=_Da2s7CmuP7kts0W-yyt4odZA8jr14d8iisVF_ipLDA,52
|
11
11
|
TonieToolbox/integration_windows.py,sha256=ycPKKswA90auzzns7bSJ9-HhH6UGRKgK_lAwPoBU0YI,24017
|
@@ -20,11 +20,11 @@ TonieToolbox/tonie_analysis.py,sha256=KkaZ6vt4sntMTfutyQApI8gvCirMjTW8aeIBSbhtll
|
|
20
20
|
TonieToolbox/tonie_file.py,sha256=z7yRmK0ujZ6SjF78-xJImGmQ2bS-Q7b-6d2ryYJnmwA,21769
|
21
21
|
TonieToolbox/tonie_header.proto,sha256=WaWfwO4VrwGtscK2ujfDRKtpeBpaVPoZhI8iMmR-C0U,202
|
22
22
|
TonieToolbox/tonie_header_pb2.py,sha256=s5bp4ULTEekgq6T61z9fDkRavyPM-3eREs20f_Pxxe8,3665
|
23
|
-
TonieToolbox/tonies_json.py,sha256=
|
23
|
+
TonieToolbox/tonies_json.py,sha256=EULEKA8qYmL5QTLC9jds1o9iiCjJGWZQv4gwrvajkkg,61628
|
24
24
|
TonieToolbox/version_handler.py,sha256=Q-i5_0r5lX3dlwDLI2lMAx4X10UZGN2rvMcntmyuiT4,9862
|
25
|
-
tonietoolbox-0.6.
|
26
|
-
tonietoolbox-0.6.
|
27
|
-
tonietoolbox-0.6.
|
28
|
-
tonietoolbox-0.6.
|
29
|
-
tonietoolbox-0.6.
|
30
|
-
tonietoolbox-0.6.
|
25
|
+
tonietoolbox-0.6.1.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
|
26
|
+
tonietoolbox-0.6.1.dist-info/METADATA,sha256=-fZc3ny_XZsj5E7zYF7f1xA2cciJqh7HAcmwg004IbI,29084
|
27
|
+
tonietoolbox-0.6.1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
28
|
+
tonietoolbox-0.6.1.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
|
29
|
+
tonietoolbox-0.6.1.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
|
30
|
+
tonietoolbox-0.6.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|