MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _operations_to_media_refs

Method _operations_to_media_refs

src/services/flow_client.py:2096–2120  ·  view source on GitHub ↗
(
        self,
        operations: List[Dict[str, Any]],
    )

Source from the content-addressed store, hash-verified

2094 }
2095
2096 def _operations_to_media_refs(
2097 self,
2098 operations: List[Dict[str, Any]],
2099 ) -> List[Dict[str, str]]:
2100 media_refs: List[Dict[str, str]] = []
2101 for operation in operations or []:
2102 if not isinstance(operation, dict):
2103 continue
2104 operation_body = operation.get("operation") or {}
2105 media_name = (
2106 operation.get("mediaName")
2107 or operation.get("name")
2108 or operation_body.get("name")
2109 )
2110 project_id = (
2111 operation.get("projectId")
2112 or operation.get("project_id")
2113 or operation_body.get("projectId")
2114 )
2115 if isinstance(media_name, str) and media_name.strip() and isinstance(project_id, str) and project_id.strip():
2116 media_refs.append({
2117 "name": media_name.strip(),
2118 "projectId": project_id.strip(),
2119 })
2120 return media_refs
2121
2122 async def generate_video_text(
2123 self,

Callers 1

check_video_statusMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected