upload-post 2.5.0__tar.gz → 2.7.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: upload-post
3
- Version: 2.5.0
3
+ Version: 2.7.0
4
4
  Summary: Cross-platform social media upload for TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, Discord, Telegram, and X (Twitter)
5
5
  Home-page: https://www.upload-post.com/
6
6
  Author: Upload-Post
@@ -300,6 +300,7 @@ boards = client.get_pinterest_boards("my-profile")
300
300
  - `allowedCountries` / `blockedCountries` - Country restrictions
301
301
  - `hasPaidProductPlacement` - Paid placement flag
302
302
  - `recordingDate` - Recording date (ISO 8601)
303
+ - `youtube_playlist_id` - Playlist ID (single string, list, or comma-separated) to add the uploaded video to after publishing
303
304
 
304
305
  ### LinkedIn
305
306
  - `visibility` - PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER
@@ -262,6 +262,7 @@ boards = client.get_pinterest_boards("my-profile")
262
262
  - `allowedCountries` / `blockedCountries` - Country restrictions
263
263
  - `hasPaidProductPlacement` - Paid placement flag
264
264
  - `recordingDate` - Recording date (ISO 8601)
265
+ - `youtube_playlist_id` - Playlist ID (single string, list, or comma-separated) to add the uploaded video to after publishing
265
266
 
266
267
  ### LinkedIn
267
268
  - `visibility` - PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name="upload-post",
8
- version="2.5.0",
8
+ version="2.7.0",
9
9
  author="Upload-Post",
10
10
  author_email="hi@img2html.com",
11
11
  description="Cross-platform social media upload for TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, Discord, Telegram, and X (Twitter)",
@@ -15,7 +15,7 @@ Example:
15
15
  ... )
16
16
  """
17
17
 
18
- __version__ = "2.5.0"
18
+ __version__ = "2.7.0"
19
19
 
20
20
  from .api_client import UploadPostClient, UploadPostError
21
21
 
@@ -177,10 +177,17 @@ class UploadPostClient:
177
177
  data.append(("brand_content_toggle", str(kwargs["brand_content_toggle"]).lower()))
178
178
  if kwargs.get("brand_organic_toggle") is not None:
179
179
  data.append(("brand_organic_toggle", str(kwargs["brand_organic_toggle"]).lower()))
180
-
180
+
181
+ # Shared by TikTok video AND photo uploads: the backend reads privacy_level and
182
+ # post_mode for both /upload (video) and /upload_photos. They used to sit behind
183
+ # the `if is_video` gate, so photo carousels silently published as
184
+ # PUBLIC_TO_EVERYONE / DIRECT_POST regardless of what the caller passed (issue #24).
185
+ if kwargs.get("privacy_level"):
186
+ data.append(("privacy_level", kwargs["privacy_level"]))
187
+ if kwargs.get("post_mode"):
188
+ data.append(("post_mode", kwargs["post_mode"]))
189
+
181
190
  if is_video:
182
- if kwargs.get("privacy_level"):
183
- data.append(("privacy_level", kwargs["privacy_level"]))
184
191
  if kwargs.get("disable_duet") is not None:
185
192
  data.append(("disable_duet", str(kwargs["disable_duet"]).lower()))
186
193
  if kwargs.get("disable_stitch") is not None:
@@ -189,8 +196,6 @@ class UploadPostClient:
189
196
  data.append(("cover_timestamp", str(kwargs["cover_timestamp"])))
190
197
  if kwargs.get("is_aigc") is not None:
191
198
  data.append(("is_aigc", str(kwargs["is_aigc"]).lower()))
192
- if kwargs.get("post_mode"):
193
- data.append(("post_mode", kwargs["post_mode"]))
194
199
  else:
195
200
  if kwargs.get("auto_add_music") is not None:
196
201
  data.append(("auto_add_music", str(kwargs["auto_add_music"]).lower()))
@@ -262,6 +267,12 @@ class UploadPostClient:
262
267
  data.append(("hasPaidProductPlacement", str(kwargs["hasPaidProductPlacement"]).lower()))
263
268
  if kwargs.get("recordingDate"):
264
269
  data.append(("recordingDate", kwargs["recordingDate"]))
270
+ playlist_value = kwargs.get("youtube_playlist_id")
271
+ if playlist_value:
272
+ if isinstance(playlist_value, (list, tuple)):
273
+ playlist_value = ",".join(str(p).strip() for p in playlist_value if str(p).strip())
274
+ if playlist_value:
275
+ data.append(("youtube_playlist_id", str(playlist_value)))
265
276
  if kwargs.get("subtitles"):
266
277
  for idx, sub in enumerate(kwargs["subtitles"]):
267
278
  if sub.get("language"):
@@ -464,6 +475,8 @@ class UploadPostClient:
464
475
  blockedCountries: Comma-separated country codes
465
476
  hasPaidProductPlacement: Paid placement flag
466
477
  recordingDate: Recording date (ISO 8601)
478
+ youtube_playlist_id: Playlist ID (or list/comma-separated of IDs) to add
479
+ the uploaded video to after publishing
467
480
  subtitles: List of subtitle dicts with keys: language (BCP-47),
468
481
  name (display name), file (path to SRT/VTT file), url (subtitle URL)
469
482
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: upload-post
3
- Version: 2.5.0
3
+ Version: 2.7.0
4
4
  Summary: Cross-platform social media upload for TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, Discord, Telegram, and X (Twitter)
5
5
  Home-page: https://www.upload-post.com/
6
6
  Author: Upload-Post
@@ -300,6 +300,7 @@ boards = client.get_pinterest_boards("my-profile")
300
300
  - `allowedCountries` / `blockedCountries` - Country restrictions
301
301
  - `hasPaidProductPlacement` - Paid placement flag
302
302
  - `recordingDate` - Recording date (ISO 8601)
303
+ - `youtube_playlist_id` - Playlist ID (single string, list, or comma-separated) to add the uploaded video to after publishing
303
304
 
304
305
  ### LinkedIn
305
306
  - `visibility` - PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER
File without changes