Repository navigation
Conversation
pyJianYingDraft's Script_file already takes an fps argument (default 30), but create_draft never passed one, so every draft was fixed at 30 fps. Accept an optional fps on create_draft / get_or_create_draft, the HTTP /create_draft route and the MCP create_draft tool. The default stays 30, so existing callers are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create_draftalways produced a 30 fps timeline:pyJianYingDraft.Script_filealready accepts anfpsargument (default 30), butcreate_draftnever passed one, so there was no way to make a 24/25/50/60 fps draft through the HTTP API or the MCP server.This adds an optional
fpsparameter, defaulting to 30, so existing callers behave exactly as before:create_draft(width, height, fps=30)/get_or_create_draft(..., fps=30)→Script_file(width, height, fps=fps)POST /create_draftreadsfpsfrom the bodycreate_drafttool schema gainsfps(integer, default 30, minimum 1)MCP_Documentation_English.md/MCP_文档_中文.mdlist the new parameterget_or_create_draftonly usesfpswhen it creates a new draft; an existing draft from the cache is returned unchanged.Testing
Ran locally on Windows, Python 3.12, against
0596f17:create_draft(width=1920, height=1080, fps=60)→script.fps == 60, and the serialized draft (script.dumps()) contains"fps": 60create_draft()→fps == 30(default unchanged)get_or_create_draft(fps=25)creates a 25 fps draft; calling it again with thatdraft_idandfps=60returns the same cached draft, still 25 fpsPOST /create_draft {"width":1280,"height":720,"fps":24}→ cached draft hasfps == 24;POST /create_draft {}→ 30mcp_server.execute_tool("create_draft", {"fps": 50})→ success, cached draft hasfps == 50