@danhachuel/thunderbolt 0.7.22 → 0.7.23
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.
- package/app/main.py +8 -0
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -5169,6 +5169,13 @@ def _saved_script_task_matches(task: dict[str, Any], record: dict[str, Any], cha
|
|
|
5169
5169
|
def _sync_saved_scripts_to_youtube_automation() -> None:
|
|
5170
5170
|
"""Expose every saved video script as one manual YouTube task, without duplicates."""
|
|
5171
5171
|
records = _backfill_saved_script_blueprints(list_script_documents())
|
|
5172
|
+
sync_signature = "|".join(
|
|
5173
|
+
f"{record.get('id', '')}:{record.get('created_at', '')}:{record.get('blueprint_id', '')}:{record.get('blueprint_name', '')}"
|
|
5174
|
+
for record in records
|
|
5175
|
+
if str(record.get("document_type") or "video_script").strip() == "video_script"
|
|
5176
|
+
)
|
|
5177
|
+
if st.session_state.get("youtube_script_sync_signature") == sync_signature:
|
|
5178
|
+
return
|
|
5172
5179
|
channels = [item for item in read_json("channels.json", []) if isinstance(item, dict)]
|
|
5173
5180
|
existing_tasks = load_video_tasks_for_catalog()
|
|
5174
5181
|
for raw_record in records:
|
|
@@ -5201,6 +5208,7 @@ def _sync_saved_scripts_to_youtube_automation() -> None:
|
|
|
5201
5208
|
continue
|
|
5202
5209
|
created = _create_video_task_from_saved_script(record, channel, {})
|
|
5203
5210
|
existing_tasks.extend(created)
|
|
5211
|
+
st.session_state["youtube_script_sync_signature"] = sync_signature
|
|
5204
5212
|
|
|
5205
5213
|
|
|
5206
5214
|
def _automation_created_at(task: dict[str, Any]) -> tuple[datetime, str]:
|
package/package.json
CHANGED