ytdl-sub 2025.12.31.post5__py3-none-any.whl → 2026.1.11__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.
- ytdl_sub/__init__.py +1 -1
- ytdl_sub/entries/script/variable_types.py +1 -9
- ytdl_sub/utils/script.py +17 -1
- {ytdl_sub-2025.12.31.post5.dist-info → ytdl_sub-2026.1.11.dist-info}/METADATA +2 -2
- {ytdl_sub-2025.12.31.post5.dist-info → ytdl_sub-2026.1.11.dist-info}/RECORD +9 -9
- {ytdl_sub-2025.12.31.post5.dist-info → ytdl_sub-2026.1.11.dist-info}/WHEEL +0 -0
- {ytdl_sub-2025.12.31.post5.dist-info → ytdl_sub-2026.1.11.dist-info}/entry_points.txt +0 -0
- {ytdl_sub-2025.12.31.post5.dist-info → ytdl_sub-2026.1.11.dist-info}/licenses/LICENSE +0 -0
- {ytdl_sub-2025.12.31.post5.dist-info → ytdl_sub-2026.1.11.dist-info}/top_level.txt +0 -0
ytdl_sub/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__pypi_version__ = "
|
|
1
|
+
__pypi_version__ = "2026.01.11";__local_version__ = "2026.01.11+41a5bf6"
|
|
@@ -22,7 +22,6 @@ VariableT = TypeVar("VariableT", bound="Variable")
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def _get(
|
|
25
|
-
cast: str,
|
|
26
25
|
metadata_variable_name: str,
|
|
27
26
|
metadata_key: str,
|
|
28
27
|
variable_name: Optional[str],
|
|
@@ -47,7 +46,7 @@ def _get(
|
|
|
47
46
|
return as_type(
|
|
48
47
|
variable_name=variable_name or metadata_key,
|
|
49
48
|
metadata_key=metadata_key,
|
|
50
|
-
definition=f"{{
|
|
49
|
+
definition=f"{{ {out} }}",
|
|
51
50
|
)
|
|
52
51
|
|
|
53
52
|
|
|
@@ -182,7 +181,6 @@ class MapMetadataVariable(MetadataVariable, MapVariable):
|
|
|
182
181
|
Creates a map variable from entry metadata
|
|
183
182
|
"""
|
|
184
183
|
return _get(
|
|
185
|
-
"map",
|
|
186
184
|
metadata_variable_name=ENTRY_METADATA_VARIABLE_NAME,
|
|
187
185
|
metadata_key=metadata_key,
|
|
188
186
|
variable_name=variable_name,
|
|
@@ -204,7 +202,6 @@ class ArrayMetadataVariable(MetadataVariable, ArrayVariable):
|
|
|
204
202
|
Creates an array variable from entry metadata
|
|
205
203
|
"""
|
|
206
204
|
return _get(
|
|
207
|
-
"array",
|
|
208
205
|
metadata_variable_name=ENTRY_METADATA_VARIABLE_NAME,
|
|
209
206
|
metadata_key=metadata_key,
|
|
210
207
|
variable_name=variable_name,
|
|
@@ -226,7 +223,6 @@ class StringMetadataVariable(MetadataVariable, StringVariable):
|
|
|
226
223
|
Creates a string variable from entry metadata
|
|
227
224
|
"""
|
|
228
225
|
return _get(
|
|
229
|
-
"string",
|
|
230
226
|
metadata_variable_name=ENTRY_METADATA_VARIABLE_NAME,
|
|
231
227
|
metadata_key=metadata_key,
|
|
232
228
|
variable_name=variable_name,
|
|
@@ -245,7 +241,6 @@ class StringMetadataVariable(MetadataVariable, StringVariable):
|
|
|
245
241
|
Creates a string variable from playlist metadata
|
|
246
242
|
"""
|
|
247
243
|
return _get(
|
|
248
|
-
"string",
|
|
249
244
|
metadata_variable_name=PLAYLIST_METADATA_VARIABLE_NAME,
|
|
250
245
|
metadata_key=metadata_key,
|
|
251
246
|
variable_name=variable_name,
|
|
@@ -264,7 +259,6 @@ class StringMetadataVariable(MetadataVariable, StringVariable):
|
|
|
264
259
|
Creates a string variable from source metadata
|
|
265
260
|
"""
|
|
266
261
|
return _get(
|
|
267
|
-
"string",
|
|
268
262
|
metadata_variable_name=SOURCE_METADATA_VARIABLE_NAME,
|
|
269
263
|
metadata_key=metadata_key,
|
|
270
264
|
variable_name=variable_name,
|
|
@@ -301,7 +295,6 @@ class IntegerMetadataVariable(MetadataVariable, IntegerVariable):
|
|
|
301
295
|
Creates an int variable from entry metadata
|
|
302
296
|
"""
|
|
303
297
|
return _get(
|
|
304
|
-
"int",
|
|
305
298
|
metadata_variable_name=ENTRY_METADATA_VARIABLE_NAME,
|
|
306
299
|
metadata_key=metadata_key,
|
|
307
300
|
variable_name=variable_name,
|
|
@@ -320,7 +313,6 @@ class IntegerMetadataVariable(MetadataVariable, IntegerVariable):
|
|
|
320
313
|
Creates an int variable from playlist metadata
|
|
321
314
|
"""
|
|
322
315
|
return _get(
|
|
323
|
-
"int",
|
|
324
316
|
metadata_variable_name=PLAYLIST_METADATA_VARIABLE_NAME,
|
|
325
317
|
metadata_key=metadata_key,
|
|
326
318
|
variable_name=variable_name,
|
ytdl_sub/utils/script.py
CHANGED
|
@@ -105,6 +105,19 @@ class ScriptUtils:
|
|
|
105
105
|
|
|
106
106
|
raise UNREACHABLE
|
|
107
107
|
|
|
108
|
+
@classmethod
|
|
109
|
+
def _get_quote_char(cls, arg: str) -> str:
|
|
110
|
+
contains_single_quote = "'" in arg
|
|
111
|
+
contains_double_quote = '"' in arg
|
|
112
|
+
|
|
113
|
+
if not contains_single_quote and not contains_double_quote:
|
|
114
|
+
return '"'
|
|
115
|
+
if not contains_single_quote and contains_double_quote:
|
|
116
|
+
return "'"
|
|
117
|
+
if contains_single_quote and not contains_double_quote:
|
|
118
|
+
return '"'
|
|
119
|
+
return "'''"
|
|
120
|
+
|
|
108
121
|
@classmethod
|
|
109
122
|
def _to_script_code(cls, arg: Argument, top_level: bool = False) -> str:
|
|
110
123
|
if not top_level and isinstance(arg, (Integer, Boolean, Float)):
|
|
@@ -113,7 +126,10 @@ class ScriptUtils:
|
|
|
113
126
|
if isinstance(arg, String):
|
|
114
127
|
if arg.native == "":
|
|
115
128
|
return "" if top_level else "''"
|
|
116
|
-
|
|
129
|
+
|
|
130
|
+
quote = cls._get_quote_char(arg.native)
|
|
131
|
+
|
|
132
|
+
return arg.native if top_level else f"{quote}{arg.native}{quote}"
|
|
117
133
|
|
|
118
134
|
if isinstance(arg, Integer):
|
|
119
135
|
out = f"%int({arg.native})"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ytdl-sub
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2026.1.11
|
|
4
4
|
Summary: Automate downloading metadata generation with YoutubeDL
|
|
5
5
|
Author: Jesse Bannon
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -703,7 +703,7 @@ Requires-Dist: black==24.10.0; extra == "lint"
|
|
|
703
703
|
Requires-Dist: isort==7.0.0; extra == "lint"
|
|
704
704
|
Requires-Dist: pylint==4.0.1; extra == "lint"
|
|
705
705
|
Provides-Extra: docs
|
|
706
|
-
Requires-Dist: sphinx<
|
|
706
|
+
Requires-Dist: sphinx<10,>=7; extra == "docs"
|
|
707
707
|
Requires-Dist: sphinx-rtd-theme<4,>=2; extra == "docs"
|
|
708
708
|
Requires-Dist: sphinx-book-theme~=1.0; extra == "docs"
|
|
709
709
|
Requires-Dist: sphinx-copybutton~=0.5; extra == "docs"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
ytdl_sub/__init__.py,sha256=
|
|
1
|
+
ytdl_sub/__init__.py,sha256=8lL3iPK0gsi8qEN9ccC140Xd6IrTkU0OcQ1Qp4mEfs0,73
|
|
2
2
|
ytdl_sub/main.py,sha256=4Rf9wXxSKW7IPnWqG5YtTZ814PjP1n9WtoFDivaainE,1004
|
|
3
3
|
ytdl_sub/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
ytdl_sub/cli/entrypoint.py,sha256=XXjUH4HiOP_BB2ZA_bNcyt5-o6YLAdZmj0EP3xtOtD8,9496
|
|
@@ -40,7 +40,7 @@ ytdl_sub/entries/script/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
|
40
40
|
ytdl_sub/entries/script/custom_functions.py,sha256=TyfiZilUKB424NXjDCwgOmYBMyqji_QIyk0TTjPC_zU,6963
|
|
41
41
|
ytdl_sub/entries/script/function_scripts.py,sha256=iPIgTpIzXv5PRnfG8gi42zP6YKUIGPtN9KuMpjHWRTM,719
|
|
42
42
|
ytdl_sub/entries/script/variable_definitions.py,sha256=dz4znpZ4op4ALtnYw2vy7ePW6z76A6TI994BFlBaOmo,43561
|
|
43
|
-
ytdl_sub/entries/script/variable_types.py,sha256=
|
|
43
|
+
ytdl_sub/entries/script/variable_types.py,sha256=SMPm52pYbw-c9uFX65pzpIYCecVd0oO0w1htmV6oTTM,9634
|
|
44
44
|
ytdl_sub/entries/variables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
45
|
ytdl_sub/entries/variables/override_variables.py,sha256=LjWtora5FT9hSka3COP6RySBdpQ39ogiwbJgE-Z_X5Y,5923
|
|
46
46
|
ytdl_sub/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -138,7 +138,7 @@ ytdl_sub/utils/file_lock.py,sha256=VlDl8QjBEUAHDBHsfp7Q0tR1Me0fFYELqzMtlyZ0MO4,2
|
|
|
138
138
|
ytdl_sub/utils/file_path.py,sha256=7RWc4fGj7HH6srzGJ5ph1l5euJfWpIX-2cyC-03YXEs,2539
|
|
139
139
|
ytdl_sub/utils/logger.py,sha256=g_23ddk1WpQ3-_MOHz-Rlz7xCydK66BbtqkualX1zAQ,8593
|
|
140
140
|
ytdl_sub/utils/retry.py,sha256=eyhtrfmzwph4uGf4Bwk0UThEIGk4cobwLLuWowGHyK4,1313
|
|
141
|
-
ytdl_sub/utils/script.py,sha256=
|
|
141
|
+
ytdl_sub/utils/script.py,sha256=M0EagR15LNkP0lg0NLAvGkBXLRfprCofj8SLcaLz0_g,6277
|
|
142
142
|
ytdl_sub/utils/scriptable.py,sha256=mSMLVOnBzTAQLZXyBozx2spLwNi6llaT_c2zdS2l1rk,3365
|
|
143
143
|
ytdl_sub/utils/subtitles.py,sha256=0ICFw7C9H9BIZvsZf0YhD9ygwR68XCdOQWerspR2g3I,85
|
|
144
144
|
ytdl_sub/utils/system.py,sha256=I9dH46ZhRRpaO0pEPfeOKp968Ub3SAdyZASVavRHrvc,58
|
|
@@ -158,9 +158,9 @@ ytdl_sub/validators/string_select_validator.py,sha256=KFXNKWX2J80WGt08m5gVYphPMH
|
|
|
158
158
|
ytdl_sub/validators/validators.py,sha256=JC3-c9fSrozFADUY5jqZEhXpM2q3sfserlooQxT2DK8,9133
|
|
159
159
|
ytdl_sub/ytdl_additions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
160
160
|
ytdl_sub/ytdl_additions/enhanced_download_archive.py,sha256=Lsc0wjHdx9d8dYJCskZYAUGDAQ_QzQ-_xbQlyrBSzfk,24884
|
|
161
|
-
ytdl_sub-
|
|
162
|
-
ytdl_sub-
|
|
163
|
-
ytdl_sub-
|
|
164
|
-
ytdl_sub-
|
|
165
|
-
ytdl_sub-
|
|
166
|
-
ytdl_sub-
|
|
161
|
+
ytdl_sub-2026.1.11.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
162
|
+
ytdl_sub-2026.1.11.dist-info/METADATA,sha256=h4tsROWeM1wEk3Nl7C-NJm0EPjvE9BMfm-g8QhgDHZo,51420
|
|
163
|
+
ytdl_sub-2026.1.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
164
|
+
ytdl_sub-2026.1.11.dist-info/entry_points.txt,sha256=K3T5235NlAI-WLmHCg5tzLZHqc33OLN5IY5fOGc9t10,48
|
|
165
|
+
ytdl_sub-2026.1.11.dist-info/top_level.txt,sha256=6z-JWazl6jXspC2DNyxOnGnEqYyGzVbgcBDoXfbkUhI,9
|
|
166
|
+
ytdl_sub-2026.1.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|