@danhachuel/thunderbolt 0.5.99 → 0.6.0
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.
|
@@ -231,8 +231,19 @@ def upload_with_default_route(
|
|
|
231
231
|
|
|
232
232
|
def _composio_upload(settings: dict[str, Any], *, channel: dict[str, Any], **kwargs: Any) -> IntegrationResult:
|
|
233
233
|
slug = str(settings.get("composio_tool_slug") or "").strip()
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
normalized_slug = slug.upper().replace("-", "_")
|
|
235
|
+
youtube_upload_tool = normalized_slug in {"YOUTUBE_UPLOAD", "YOUTUBE_UPLOAD_VIDEO", "YOUTUBE_MULTIPART_UPLOAD_VIDEO"} or ("YOUTUBE" in normalized_slug and "UPLOAD" in normalized_slug)
|
|
236
|
+
channel_id = str(
|
|
237
|
+
channel.get("youtube_channel_id")
|
|
238
|
+
or channel.get("youtube_id")
|
|
239
|
+
or channel.get("google_channel_id")
|
|
240
|
+
or channel.get("channel_id")
|
|
241
|
+
or ""
|
|
242
|
+
).strip()
|
|
243
|
+
if not channel_id:
|
|
244
|
+
import re
|
|
245
|
+
match = re.search(r"/channel/(UC[\w-]+)", str(channel.get("url") or ""))
|
|
246
|
+
channel_id = match.group(1) if match else ""
|
|
236
247
|
channel_field = str(settings.get("composio_channel_field") or "channel_id").strip()
|
|
237
248
|
if not youtube_upload_tool and not channel_id:
|
|
238
249
|
return IntegrationResult(False, "Composio não foi executado: o canal da tarefa não tem um YouTube channel ID sincronizado.", {"missing": ["youtube_channel_id"]})
|
package/package.json
CHANGED