feat: finish the upload, playback, and test gaps from the docs
ci / api / api (push) Successful in 40s
ci / db / db (push) Successful in 1m3s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Failing after 1m48s
ci / docker / docker (образы собираются — их сервер собирает сам при обновлении) (push) Successful in 46s
ci / ts / ts (packages + web) (push) Failing after 4m57s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 5m7s

Quality upgrades, batch covers, staging preview, and resume after reload are in the queue. Loudness and crossfade work on web and Android, and the documented checks now have suites.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
mrleo1nidandCursor committed 2026-10-21 09:37:53 +03:00
1 parent 2b76060ea3
commit 066ba24834
61 files changed
+2818 -463

No files matched your search

+28 -6
View File
@@ -435,12 +435,13 @@ func (s *Service) GetSettings(ctx context.Context) (Settings, error) {
// SettingsInput — правка настроек; nil — не менять. ClearPerUser / ClearDefault — сбросить.
type SettingsInput struct {
QueueLimitBytes *int64
PerUserLimitBytes *int64
MaxFileBytes *int64
DefaultSourceID *uuid.UUID
ClearPerUser bool
ClearDefault bool
QueueLimitBytes *int64
PerUserLimitBytes *int64
MaxFileBytes *int64
DefaultSourceID *uuid.UUID
AllowQualityUpgrade *bool
ClearPerUser bool
ClearDefault bool
}
// UpdateSettings меняет лимиты; уменьшение ниже занятого ничего не удаляет (docs/uploads.md#3).
@@ -484,6 +485,9 @@ func (s *Service) UpdateSettings(ctx context.Context, in SettingsInput) (Setting
}
st.DefaultSourceID = in.DefaultSourceID
}
if in.AllowQualityUpgrade != nil {
st.AllowQualityUpgrade = *in.AllowQualityUpgrade
}
if err := s.store.SaveSettings(ctx, st); err != nil {
return Settings{}, err
}
@@ -662,3 +666,21 @@ func (s *Service) removeStaging(f File) {
// TusURL — адрес tus для файла.
func TusURL(id uuid.UUID) string { return "/api/v1/uploads/files/" + id.String() }
// Staged — файл очереди и абсолютный путь в staging.
type Staged struct {
File
Abs string
}
// OpenStaging возвращает файл, который ещё лежит в staging.
func (s *Service) OpenStaging(ctx context.Context, id uuid.UUID) (Staged, error) {
f, err := s.store.File(ctx, id)
if err != nil {
return Staged{}, notFound(err)
}
if f.StagingPath == "" || !f.Status.KeepsStaging() {
return Staged{}, apperr.NotFound(CodeNotFound, "file is not in staging")
}
return Staged{File: f, Abs: s.stagingAbs(f.StagingPath)}, nil
}