Repository navigation
0.5.1: выбор нескольких файлов в «Медиа», скачать или удалить разом - #10
Merged
Merged
Conversation
Holding a tile in the gallery (450 ms, cancelled by moving or scrolling; right-click on a PC, or the new "select" button) switches it to selecting. Taps then toggle tiles, "all" selects what the filter shows, and a bar at the bottom shows the count and size with "download" and "delete". Esc, "done" or leaving the tab ends it. Download: one item is fetched as before; several either as separate files or as one zip from the new GET /api/media/zip?t=&ids=, which the Deck streams without compression (media is compressed already) under <game>/<file>, Steam clips as mp4, same names numbered. Every id is checked before the answer starts, so a stale one is a 404, not a cut zip. Delete: /api/media/delete also takes "ids" and deletes them all with one PIN, reporting what was removed and what failed. tests/test_media.py runs the server on a throwaway ~/Pictures: the zip holds exactly the selected files, needs the media password, a wrong PIN deletes nothing, and deleting one item works as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117oG9pVCiLVdgdzWJT9nJH
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.
Что сделано
В галерее «Медиа» появился режим множественного выбора, как в обычных галереях телефона.
Сервер
GET /api/media/zip?t=<token>&ids=a,b,c— Дек сразу отдаёт zip без сжатия (медиа и так сжаты): файлы разложены по папкам игр (<игра>/<файл>), клипы Steam как.mp4, одинаковые имена нумеруются. Все id проверяются до начала ответа, так что неизвестный id даёт 404, а не обрезанный архив. Нужен пароль медиа.POST /api/media/deleteтеперь принимает иids(список); вариант с однимidработает как раньше.Ограничение: размер zip заранее неизвестен, поэтому браузер покажет только сколько уже скачано, без процентов.
Прочее
tests/test_media.py: в архиве ровно выбранные файлы; без пароля медиа архив не отдаётся; с неверным PIN ничего не удаляется; удаление одного файла работает как раньше.Проверка
Локально прошли pyflakes,
tools/changelog.py --check, сборка, все 96 юнит-тестов (включаяtest_user_data.py), smoke из исходников и собранного файла,tests/ui_check.pyна обоих языках. Отдельно прогнал в headless Chromium: зажатие пальцем (touch-события) на телефонном экране, выбор, «все»/«снять», скачивание zip, удаление с PIN; на ПК — правый клик, кнопка «выбрать», Esc. Скриншоты в README не переснимал.🤖 Generated with Claude Code
https://claude.ai/code/session_0117oG9pVCiLVdgdzWJT9nJH
Generated by Claude Code