feat: multi-file torrent upload with per-file editing#696
Open
staners2 wants to merge 1 commit intoYouROK:masterfrom
Open
feat: multi-file torrent upload with per-file editing#696staners2 wants to merge 1 commit intoYouROK:masterfrom
staners2 wants to merge 1 commit intoYouROK:masterfrom
Conversation
New feature: multiple .torrent files can be selected/dropped at once. Instead of adding them blindly, a dedicated MultiAddDialog shows all files as a scrollable list where each file has its own editable fields: title, poster URL, and category. Duplicate detection compares infohash against existing torrents and pre-fills fields from DB with a warning. Frontend changes: - New MultiAddDialog component for batch .torrent file uploads with per-file title, poster, category editing and duplicate detection - AddDialog simplified: file uploads always delegate to MultiAddDialog, AddDialog now only handles link/magnet/hash input and edit mode - LeftSideComponent simplified: dropzone always visible (no "file selected" state), supports multiple file selection - TorrentList: stable sort via useMemo (timestamp + hash tiebreaker), fixes card jumping caused by unstable backend sort order - TorrentCard: custom memo comparator prevents unnecessary re-renders on every 1s refetch interval - Grid layout: replaced unstable max-content minimum with fixed 450px - Locales: updated ClickOrDrag text to indicate multiple files support - Removed dead code: LeftSideBottomSectionFileSelected, TorrentIconWrapper, CancelIconWrapper, unused hashRegex export, commented-out catArray Backend changes: - upload.go: removed dead multiFile title/poster blanking logic (frontend now sends one request per file with individual metadata) - upload.go: API still supports multiple files per request for backward compatibility
bbe6318 to
9de64e7
Compare
pavelpikta
suggested changes
Apr 13, 2026
Contributor
pavelpikta
left a comment
There was a problem hiding this comment.
Hi @staners2
Don't need to push chages for static files, static files will udpated before release
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
Adds support for selecting and uploading multiple
.torrentfiles at once, with a dedicated dialog for editing each file's metadata before saving.New functionality
.torrentfiles (drag & drop or file picker)Bug fixes
useMemowith stable sort (timestamp + hash tiebreaker) to prevent cards from reordering on each 1-second refetch. The backend returns torrents in non-deterministic order when timestamp and title are equal(a, b) => a.title > b.title(returns boolean, causes unstable sort) withlocaleCompareminmax(max-content, 570px)withminmax(450px, 570px)to prevent layout shifts from dynamic contenttorrentsbefore.map()/.filter()calls (undefined on initial render before query resolves)Code cleanup
LeftSideBottomSectionFileSelected,TorrentIconWrapper,CancelIconWrapperstyled-components; unusedhashRegexexport; commented-outcatArrayAddDialog: file upload logic moved entirely toMultiAddDialog,AddDialognow only handles link/magnet/hash and edit modeLeftSideComponent: removed "file selected" state, dropzone always visiblemultiFiletitle/poster blanking logic inupload.go(frontend now sends one request per file)Localization
ClickOrDragtext in all 7 locales to indicate multiple file support (e.g., "CLICK / DRAG & DROP FILES (.torrent)")Test plan
.torrentfile — MultiAddDialog opens with one item, fields editable.torrentfiles — all shown in scrollable list with individual fields.torrent— warning shown, fields pre-filled from DB