feat: --scan-ext to scan for any file type, with multi-select#18
Merged
Conversation
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
--extract-scanonly looked for streaming video. Now it scans for video and audio by default, and--scan-ext=iso,zip,mkv,flac(any extensions, any type) restricts the scan to those file types instead, which also covers a plain directory listing (Apache/nginx autoindex). The extension set is threaded throughscan_pageintoclassify_urland the URL-capture regexes are built dynamically from it. When a page yields more than one matching file,run_extract_scanopens a multi-select TUI (reusingtui_select_many) so the user picks which files go into the generated config; a deselected subset is captured as an alternation of the raw page refs so it still resolves on a relative-href listing. The download commandflux <url>is unchanged and gains no scanning.A directory-listing config is matched by its landing directory with an optional
:port, so the generated config actually re-attaches to the page it came from.Changes
listconfig keyed by extension; partial multi-select emits an alternation of the raw captured refs; reject candidates containing control characters.