ytdl-sub 2025.12.31.post5__py3-none-any.whl → 2026.1.6__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 CHANGED
@@ -1 +1 @@
1
- __pypi_version__ = "2025.12.31.post5";__local_version__ = "2025.12.31+b2056be"
1
+ __pypi_version__ = "2026.01.06";__local_version__ = "2026.01.06+6b99c31"
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
- return arg.native if top_level else f"'''{arg.native}'''"
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: 2025.12.31.post5
3
+ Version: 2026.1.6
4
4
  Summary: Automate downloading metadata generation with YoutubeDL
5
5
  Author: Jesse Bannon
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -1,4 +1,4 @@
1
- ytdl_sub/__init__.py,sha256=hI6E1r9CSOlD72phPfNMyc5j7T2dYlh8X-pGjCY1Fd4,79
1
+ ytdl_sub/__init__.py,sha256=nLml9KZHf1Nc577PKf16c0ZGjsSoLjrMPVHCbI69wBw,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
@@ -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=3sUWCZxVuk5inm6ou3ChFTfeDk7lRnhPSV1wQARj5UI,5777
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-2025.12.31.post5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
162
- ytdl_sub-2025.12.31.post5.dist-info/METADATA,sha256=fzL4Aa-93zcIhXqOsp0vs5ZNiQBY8WhQDSv6N7BFqJc,51426
163
- ytdl_sub-2025.12.31.post5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
164
- ytdl_sub-2025.12.31.post5.dist-info/entry_points.txt,sha256=K3T5235NlAI-WLmHCg5tzLZHqc33OLN5IY5fOGc9t10,48
165
- ytdl_sub-2025.12.31.post5.dist-info/top_level.txt,sha256=6z-JWazl6jXspC2DNyxOnGnEqYyGzVbgcBDoXfbkUhI,9
166
- ytdl_sub-2025.12.31.post5.dist-info/RECORD,,
161
+ ytdl_sub-2026.1.6.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
162
+ ytdl_sub-2026.1.6.dist-info/METADATA,sha256=gVJGeZNSYZ_Cq1wnwVdwkQkJsnVAnYNM-scbVs1zttw,51418
163
+ ytdl_sub-2026.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
164
+ ytdl_sub-2026.1.6.dist-info/entry_points.txt,sha256=K3T5235NlAI-WLmHCg5tzLZHqc33OLN5IY5fOGc9t10,48
165
+ ytdl_sub-2026.1.6.dist-info/top_level.txt,sha256=6z-JWazl6jXspC2DNyxOnGnEqYyGzVbgcBDoXfbkUhI,9
166
+ ytdl_sub-2026.1.6.dist-info/RECORD,,