Repository navigation
Windows context menu, JustPaste, video resolutions, managed downloads (2.6.0) - #1
Merged
Merged
Conversation
…aged downloads - Add a File Explorer context menu for Windows (`just context install`): a single-level JustTools flyout with per-file-type entries, served by the new justtools_shell.dll extension and registered per user as a Windows 11 package or as classic verbs. Console windows close by themselves. - Add justpaste, which saves whatever a link points at: files as-is, pages through yt-dlp, then the media a page declares. Never overwrites. - Add justvideo --resolution (480p, 720p, 1080p, 1440p, 4k, source) and the matching launcher row; URL downloads raise their height cap to match. - Download a missing yt-dlp or FFmpeg automatically on every platform into a per-user folder, verified against the vendor's SHA-256, and run yt-dlp --update whenever twelve hours have passed. - Add justip and URL inputs for justvideo, justaudio, justmp3, and justwav. - Ship the extension in the Windows archives, with optional package signing. - Bump to 2.6.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment on lines
+638
to
+642
| if urls.len() < options.inputs.len() { | ||
| return Err(ToolError::usage( | ||
| TOOL, | ||
| "every input must be an http(s) link", | ||
| )); |
There was a problem hiding this comment.
Bug: Providing duplicate URLs as command-line arguments causes a misleading error because the input count is checked after deduplication.
Severity: MEDIUM
Suggested Fix
The validation logic should be adjusted. Instead of comparing the count of deduplicated URLs to the original input count, the check should happen before deduplication, or the check should be removed in favor of simply using the deduplicated list of URLs. The current clipboard handling logic already correctly deduplicates URLs without this faulty check and could serve as a model.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/commands/paste.rs#L638-L642
Potential issue: When multiple identical URLs are provided as command-line arguments,
the `links()` function deduplicates them. Subsequently, a check at
`src/commands/paste.rs:638` compares the deduplicated URL count with the original input
count. This discrepancy (`urls.len() < options.inputs.len()`) incorrectly triggers an
error stating 'every input must be an http(s) link', even though all inputs are valid
URLs. This can happen if a user accidentally provides the same URL twice or if a script
does so.
Did we get this right? 👍 / 👎 to inform future reviews.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ubuntu 22.04 ships fish 3.3, which predates the path builtin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
just context installadds a single-level JustTools flyout with entries per file type. It is served by the newjusttools_shell.dlland registered per user, as a Windows 11 package (signed package or Developer Mode) or as classic verbs. Each entry runs an ordinary headless command in a console window that closes by itself.justpaste <url>/--clipboardsaves whatever a link points at — files as-is, pages through yt-dlp, then the media a page declares. Never overwrites.--resolution 480p|720p|1080p|1440p|4k|source, plus the launcher row.yt-dlp --updateruns whenever twelve hours have passed.justipand URL inputs for the media tools, and bumps to 2.6.0.Cross-platform
The extension crate is empty off Windows and the menu model is plain Rust tested everywhere. Windows archives gain
justtools_shell.dll; other archives are unchanged. A new non-blocking CI step downloads and runs the managed yt-dlp and FFmpeg on all six targets.Test plan
-D warnings, full tests, Rust 1.90 check, release build (Windows x64, local)🤖 Generated with Claude Code