Added missing options in amuleweb-main-prefs.php options apply - #419
Merged
Vollstrecker merged 1 commit intoFeb 23, 2026
Conversation
This was referenced Dec 26, 2025
mrjimenez
pushed a commit
to mrjimenez/amule
that referenced
this pull request
Jul 11, 2026
…t#419) (amule-project#427) * feat(amuleapi): file comments & ratings in the REST API (amule-project#419) Read: inline `comment` + `rating` on GET /downloads/{hash} and GET /shared/{hash} (base CKnownFile tags, decoded via the shared MergeKnownFileDetail helper). New GET /downloads/{hash}/comments returns the per-source list {count, comments:[{username,filename,rating,comment}]} decoded from EC_TAG_PARTFILE_COMMENTS (rating -1 = unrated). Write: PATCH /shared/{hash} and PATCH /downloads/{hash} accept a `comment`+`rating` pair, mapped to EC_OP_SHARED_FILE_SET_COMMENT. Both fields are required together (400 otherwise); comment <= 50 chars, rating 0-5; only settable on a shared file (409 not_shared) since amuled resolves the hash against the shared-files registry. No amuled/EC-protocol change. RefresherTest gains a decode case; curl 04 covers the read fields + comments endpoint and 17 the PATCH round-trip + validation; REST reference documents all of it. Depends on amule-project#417 (the GET /shared/{hash} detail endpoint). * Address clang-tidy: range-based loop in comments unpack modernize-loop-convert (Tier-2) flagged the iterator loop that copies the EC_TAG_PARTFILE_COMMENTS children into the kids vector; use a range-based for over the container instead.
ngosang
added a commit
to ngosang/amule
that referenced
this pull request
Jul 13, 2026
Surface the file comments & ratings REST feature (issue amule-project#419/amule-project#434) in the Downloads and Shared Files detail panels, and restructure those panels into a cleaner notebook layout. Comments: - New 'Comments' tab in both detail panels. Downloads shows the per-source comments/ratings list (username, rating, filename, comment, incl. retrieved Kad notes) from GET /downloads/{hash}/comments, a 'Get from Kad' trigger (POST) with a searching indicator, and an edit-your-own comment+rating form. Shared shows the edit form only (no live source list). - Rating renders as text labels matching the desktop GetRateString() scale (0 Not rated .. 5 Excellent, -1 = comment only), colour-accented, not stars. - The editor (shared CommentEditor component) is admin-only and, on Downloads, disabled until the file has >=1 complete part (the daemon only accepts a comment/rating on a shared file; otherwise PATCH 409 not_shared), with an inline hint. - The Comments tab does not poll GET /downloads/{hash}; live detail polling is gated to the Details tab. Detail-panel layout: - SplitDetail lifted to the page level so the layout is table container -> splitter -> detail container as siblings, the detail no longer nested in the table's box. - The panel is a notebook: file title + close button sit free at the top, the Details/Comments tab strip below, and only the active tab's content is boxed (.detail-body) and scrolls internally while the head + tabs stay fixed. - Detail body spans the panel's full width (flush with the list container). - Progress bar + pieces map moved into the Details tab. - Copy ED2K / Copy magnet buttons moved into the Details tab's Hash row. - Tighter header spacing and close-button alignment. New en/es i18n keys and CSS included.
ngosang
added a commit
to ngosang/amule
that referenced
this pull request
Jul 13, 2026
…mule-project#474) Surface the file comments & ratings REST feature (issue amule-project#419/amule-project#434) in the Downloads and Shared Files detail panels, and restructure those panels into a cleaner notebook layout. Comments: - New 'Comments' tab in both detail panels. Downloads shows the per-source comments/ratings list (username, rating, filename, comment, incl. retrieved Kad notes) from GET /downloads/{hash}/comments, a 'Get from Kad' trigger (POST) with a searching indicator, and an edit-your-own comment+rating form. Shared shows the edit form only (no live source list). - Rating renders as text labels matching the desktop GetRateString() scale (0 Not rated .. 5 Excellent, -1 = comment only), colour-accented, not stars. - The editor (shared CommentEditor component) is admin-only and, on Downloads, disabled until the file has >=1 complete part (the daemon only accepts a comment/rating on a shared file; otherwise PATCH 409 not_shared), with an inline hint. - The Comments tab does not poll GET /downloads/{hash}; live detail polling is gated to the Details tab. Detail-panel layout: - SplitDetail lifted to the page level so the layout is table container -> splitter -> detail container as siblings, the detail no longer nested in the table's box. - The panel is a notebook: file title + close button sit free at the top, the Details/Comments tab strip below, and only the active tab's content is boxed (.detail-body) and scrolls internally while the head + tabs stay fixed. - Detail body spans the panel's full width (flush with the list container). - Progress bar + pieces map moved into the Details tab. - Copy ED2K / Copy magnet buttons moved into the Details tab's Hash row. - Tighter header spacing and close-button alignment. New en/es i18n keys and CSS included.
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.
Options "udp_port" and "reconn_en" are present in JS code that populate options page with values from backend, but not in PHP code that save POST provided values into backend.