pyrekordbox 0.4.1__py3-none-any.whl → 0.4.3__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.
- pyrekordbox/__init__.py +1 -0
- pyrekordbox/__main__.py +3 -2
- pyrekordbox/_version.py +2 -2
- pyrekordbox/anlz/__init__.py +6 -6
- pyrekordbox/anlz/file.py +40 -32
- pyrekordbox/anlz/tags.py +108 -70
- pyrekordbox/config.py +36 -26
- pyrekordbox/db6/aux_files.py +40 -14
- pyrekordbox/db6/database.py +382 -220
- pyrekordbox/db6/registry.py +48 -34
- pyrekordbox/db6/smartlist.py +12 -12
- pyrekordbox/db6/tables.py +51 -52
- pyrekordbox/mysettings/__init__.py +3 -2
- pyrekordbox/mysettings/file.py +27 -24
- pyrekordbox/rbxml.py +327 -147
- pyrekordbox/utils.py +7 -6
- {pyrekordbox-0.4.1.dist-info → pyrekordbox-0.4.3.dist-info}/METADATA +1 -1
- pyrekordbox-0.4.3.dist-info/RECORD +25 -0
- {pyrekordbox-0.4.1.dist-info → pyrekordbox-0.4.3.dist-info}/WHEEL +1 -1
- pyrekordbox-0.4.1.dist-info/RECORD +0 -25
- {pyrekordbox-0.4.1.dist-info → pyrekordbox-0.4.3.dist-info}/licenses/LICENSE +0 -0
- {pyrekordbox-0.4.1.dist-info → pyrekordbox-0.4.3.dist-info}/top_level.txt +0 -0
pyrekordbox/utils.py
CHANGED
@@ -14,7 +14,7 @@ import psutil
|
|
14
14
|
warnings.simplefilter("always", DeprecationWarning)
|
15
15
|
|
16
16
|
|
17
|
-
def warn_deprecated(name, new_name="", hint="", remove_in=""):
|
17
|
+
def warn_deprecated(name: str, new_name: str = "", hint: str = "", remove_in: str = "") -> None:
|
18
18
|
s = f"'{name}' is deprecated"
|
19
19
|
if remove_in:
|
20
20
|
s += f" and will be removed in version '{remove_in}'"
|
@@ -30,7 +30,7 @@ def warn_deprecated(name, new_name="", hint="", remove_in=""):
|
|
30
30
|
warnings.warn(s, DeprecationWarning, stacklevel=3)
|
31
31
|
|
32
32
|
|
33
|
-
def get_process_id(name: str, raise_exec=False) -> int:
|
33
|
+
def get_process_id(name: str, raise_exec: bool = False) -> int:
|
34
34
|
"""Returns the ID of a process if it exists.
|
35
35
|
|
36
36
|
Parameters
|
@@ -62,7 +62,8 @@ def get_process_id(name: str, raise_exec=False) -> int:
|
|
62
62
|
try:
|
63
63
|
proc_name = os.path.splitext(proc.name())[0] # needed on Windows (.exe)
|
64
64
|
if proc_name == name:
|
65
|
-
|
65
|
+
pid: int = proc.pid
|
66
|
+
return pid
|
66
67
|
except (psutil.AccessDenied, psutil.NoSuchProcess):
|
67
68
|
pass
|
68
69
|
if raise_exec:
|
@@ -70,7 +71,7 @@ def get_process_id(name: str, raise_exec=False) -> int:
|
|
70
71
|
return 0
|
71
72
|
|
72
73
|
|
73
|
-
def get_rekordbox_pid(raise_exec=False):
|
74
|
+
def get_rekordbox_pid(raise_exec: bool = False) -> int:
|
74
75
|
"""Returns the process ID of the Rekordbox application.
|
75
76
|
|
76
77
|
Parameters
|
@@ -96,7 +97,7 @@ def get_rekordbox_pid(raise_exec=False):
|
|
96
97
|
return get_process_id("rekordbox", raise_exec)
|
97
98
|
|
98
99
|
|
99
|
-
def get_rekordbox_agent_pid(raise_exec=False):
|
100
|
+
def get_rekordbox_agent_pid(raise_exec: bool = False) -> int:
|
100
101
|
"""Returns the process ID of the RekordboxAgent application.
|
101
102
|
|
102
103
|
Parameters
|
@@ -122,7 +123,7 @@ def get_rekordbox_agent_pid(raise_exec=False):
|
|
122
123
|
return get_process_id("rekordboxAgent", raise_exec)
|
123
124
|
|
124
125
|
|
125
|
-
def pretty_xml(element, indent=None, encoding="utf-8"):
|
126
|
+
def pretty_xml(element: xml.Element, indent: str = None, encoding: str = "utf-8") -> str:
|
126
127
|
r"""Generates a formatted string of an XML element.
|
127
128
|
|
128
129
|
Parameters
|
@@ -0,0 +1,25 @@
|
|
1
|
+
pyrekordbox/__init__.py,sha256=XtHMC6j7c11dxpf2mrXGz8Ux8TJnlIGcGZTwhs6NpVU,664
|
2
|
+
pyrekordbox/__main__.py,sha256=ogn1wEOue1RUjGA0BxmgVIphcSCkoM1jZKRND0cAVLA,6016
|
3
|
+
pyrekordbox/_version.py,sha256=zJwW9_MgFPmVYNh3YnSsdJ4y2EqGvu1bzYeID1Rrd0A,511
|
4
|
+
pyrekordbox/config.py,sha256=q9QTB1T0eMUsUwpo6ro_CcTcSQ1AUhpCFiJhMCaKnQc,28770
|
5
|
+
pyrekordbox/logger.py,sha256=dq1BtXBGavuAjuc45mvjF6mOWaeZqZFzo2aBOJdJ0Ik,483
|
6
|
+
pyrekordbox/rbxml.py,sha256=rb7bRnr_Bmf3P3bMOh8VDtR2EsVe7E4VYuClLkA-_Lc,46764
|
7
|
+
pyrekordbox/utils.py,sha256=h0z2LZ2cI3AlBE9hO-gSXIzOMjIJhYh_5HRlxao61Fg,4500
|
8
|
+
pyrekordbox/anlz/__init__.py,sha256=1sArQ6P-bxBJFdcnzW4CAN20pNl3YbmDvm-8pQizTZY,3308
|
9
|
+
pyrekordbox/anlz/file.py,sha256=Att_2FKK2AiCpV991EyF1DQVRwlGyxfL0YuePAi-qyo,7842
|
10
|
+
pyrekordbox/anlz/structs.py,sha256=Lt4fkb3SAE8w146eWeWGnpgRoP6jhLMWrSMoMwPjG04,7925
|
11
|
+
pyrekordbox/anlz/tags.py,sha256=rlbUAyLc-J5_l4g4xiw59Rl3dW-SClDEb7ZLRXu1xLg,16791
|
12
|
+
pyrekordbox/db6/__init__.py,sha256=TZX_BPGZIkc4zSTULIc8yd_bf91MAezGtZevKNh3kZ0,856
|
13
|
+
pyrekordbox/db6/aux_files.py,sha256=kKRTj2UWJdHx043MX3-yK5HUWrnxjDNZYBDOHp5Oi14,8726
|
14
|
+
pyrekordbox/db6/database.py,sha256=IhYyFixGBX-1MfhlF-HYWozNsUydNGzafMTtio9A5wA,86584
|
15
|
+
pyrekordbox/db6/registry.py,sha256=a7qpCdvoM9EzL8iQIq4WeYDcwgdhMZtM17xOo3uXftk,10617
|
16
|
+
pyrekordbox/db6/smartlist.py,sha256=ukQpKmA06iWAfdzS81Vb0g0qaTVnXQ7pgKa28KcMkiY,12300
|
17
|
+
pyrekordbox/db6/tables.py,sha256=75SZyWbneArIVYZKAEjVTltm0oKePM5Af0PaMOtAW-8,69140
|
18
|
+
pyrekordbox/mysettings/__init__.py,sha256=czSTZpv8pHYJGbqsNrwxvmpt2zHV1LPEF6f2aVoqpB8,795
|
19
|
+
pyrekordbox/mysettings/file.py,sha256=yAPQmkT5eTRyhJJ-7hKLmyw1EzQxrkFueFBmu3jGJSY,13181
|
20
|
+
pyrekordbox/mysettings/structs.py,sha256=5Y1F3qTmsP1fRB39_BEHpQVxKx2DO9BytEuJUG_RNcY,8472
|
21
|
+
pyrekordbox-0.4.3.dist-info/licenses/LICENSE,sha256=VwG9ZgC2UZnI0gTezGz1qkcAZ7sknBUQ1M62Z2nht54,1074
|
22
|
+
pyrekordbox-0.4.3.dist-info/METADATA,sha256=4i4gsSTfTrxxowkb5gNgewVrlC6AXCNdFaKCD_mOguw,15480
|
23
|
+
pyrekordbox-0.4.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
24
|
+
pyrekordbox-0.4.3.dist-info/top_level.txt,sha256=bUHkyxIHZDgSB6zhYnF1o4Yf1EQlTGGIkVRq9uEtsa4,12
|
25
|
+
pyrekordbox-0.4.3.dist-info/RECORD,,
|
@@ -1,25 +0,0 @@
|
|
1
|
-
pyrekordbox/__init__.py,sha256=hvg2dB7qhgGB6SmcRg8AION6mTGdlsThdHhsDZ9WYfs,622
|
2
|
-
pyrekordbox/__main__.py,sha256=BtyDwVSGyoURY9Cy004vRL5Tgkwt4F7eXX_GD_vVYNQ,5976
|
3
|
-
pyrekordbox/_version.py,sha256=yF2DwGUoQKNnLhAbpZX8kCQKjw77EZzhRk7_OTftets,511
|
4
|
-
pyrekordbox/config.py,sha256=TTrL2bOo9DDKSW2yys8axaLB2GHhhD8VL7vq4dJxi1A,28309
|
5
|
-
pyrekordbox/logger.py,sha256=dq1BtXBGavuAjuc45mvjF6mOWaeZqZFzo2aBOJdJ0Ik,483
|
6
|
-
pyrekordbox/rbxml.py,sha256=UqATygpuOVGlSYj0nzcHSmDjTeQ9EL5AVLhAxS523F4,38340
|
7
|
-
pyrekordbox/utils.py,sha256=hkYIgG5U4rzl2tjN9ESzLnf8OysEFybRQgmr6J7xq-k,4363
|
8
|
-
pyrekordbox/anlz/__init__.py,sha256=SEVY0oPX9ohCVViUbsoOLTrBrFewTh-61qJxwXgAJKg,3155
|
9
|
-
pyrekordbox/anlz/file.py,sha256=F6axHmprnp0j3pZkqmmp5iiJBUpqtWiAhSzlAJp2H6Y,6951
|
10
|
-
pyrekordbox/anlz/structs.py,sha256=Lt4fkb3SAE8w146eWeWGnpgRoP6jhLMWrSMoMwPjG04,7925
|
11
|
-
pyrekordbox/anlz/tags.py,sha256=nlPBKyRB8Z9J69bX2K8ZPQk_g1tMazKeVf2ViAqMX-c,13947
|
12
|
-
pyrekordbox/db6/__init__.py,sha256=TZX_BPGZIkc4zSTULIc8yd_bf91MAezGtZevKNh3kZ0,856
|
13
|
-
pyrekordbox/db6/aux_files.py,sha256=MehdQSc4iryiHvH8RfE9_9xMnD5qjRRDhTo0o0KRLw0,7592
|
14
|
-
pyrekordbox/db6/database.py,sha256=2FTwVZOx8pSLLRr9ZV_95TUUtCfPo3CSLKYyudBN8-o,80678
|
15
|
-
pyrekordbox/db6/registry.py,sha256=zYq_B7INM97de7vUTxqmA4N_P53loDkBkYdzdoeSnvY,9725
|
16
|
-
pyrekordbox/db6/smartlist.py,sha256=GG6jE0BHMtx0RHgiVRpWYuL-Ex5edTNSLSDQNiCGzK0,12170
|
17
|
-
pyrekordbox/db6/tables.py,sha256=EST6wvsJjlwmVB8JWBLMKbW3Mskk5qAo-xBqB09Q-Hg,68479
|
18
|
-
pyrekordbox/mysettings/__init__.py,sha256=6iLTQ1KIjuoq8Zt3thmkjqJSxrRVIi7BrQpxNcsQK04,706
|
19
|
-
pyrekordbox/mysettings/file.py,sha256=JBfVe3jsmah_mGJjyC20_EqJZyJ7ftcOcCkRDKcWgv0,12671
|
20
|
-
pyrekordbox/mysettings/structs.py,sha256=5Y1F3qTmsP1fRB39_BEHpQVxKx2DO9BytEuJUG_RNcY,8472
|
21
|
-
pyrekordbox-0.4.1.dist-info/licenses/LICENSE,sha256=VwG9ZgC2UZnI0gTezGz1qkcAZ7sknBUQ1M62Z2nht54,1074
|
22
|
-
pyrekordbox-0.4.1.dist-info/METADATA,sha256=q8KLPyfFte6I8cpdZai6LN8Kck8LI1E4rNZs947nnSY,15480
|
23
|
-
pyrekordbox-0.4.1.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
24
|
-
pyrekordbox-0.4.1.dist-info/top_level.txt,sha256=bUHkyxIHZDgSB6zhYnF1o4Yf1EQlTGGIkVRq9uEtsa4,12
|
25
|
-
pyrekordbox-0.4.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|