Refactor media storage and management functionalities: enhance IMediaStorage interface with manual inbox handling, update FileSystemMediaStorage to support manual file imports, and improve MediaPathResolver for better path management. Extend MediaEndpoints to include new manual inbox features and update frontend components for improved media management experience.
This commit is contained in:
@@ -62,7 +62,27 @@ export type CreatedIdResponse = { id: string }
|
||||
|
||||
// ── Медиа ────────────────────────────────────────────────────────────────
|
||||
export type MediaAssetStatus = 'Pending' | 'Processing' | 'Ready' | 'Failed'
|
||||
export type MediaSource = 'Upload' | 'Inbox'
|
||||
export type MediaSource = 'Upload' | 'Inbox' | 'ManualInbox' | 'Generated'
|
||||
|
||||
/** Файл ручного inbox: лежит в manual/ и ждёт, пока его разложат по шоу. */
|
||||
export type ManualInboxFileDto = {
|
||||
relativePath: string
|
||||
name: string
|
||||
sizeBytes: number
|
||||
isSupported: boolean
|
||||
alreadyImported: boolean
|
||||
}
|
||||
|
||||
export type ManualInboxListDto = {
|
||||
files: ManualInboxFileDto[]
|
||||
/** Выдача обрезана лимитом — в каталоге есть ещё. */
|
||||
truncated: boolean
|
||||
}
|
||||
|
||||
export type ImportManualInboxResultDto = {
|
||||
imported: number
|
||||
failed: { relativePath: string; reason: string }[]
|
||||
}
|
||||
|
||||
export type MediaAssetDto = {
|
||||
id: string
|
||||
|
||||
@@ -201,6 +201,20 @@ const resources = {
|
||||
media: {
|
||||
title: 'Медиа',
|
||||
upload: 'Загрузить',
|
||||
manualButton: 'Из папки manual',
|
||||
manualTitle: 'Ручной разбор папки manual',
|
||||
manualHint:
|
||||
'Файлы из manual/ не разбираются сканером — выберите нужные и укажите шоу. Импортированные файлы уходят из папки, как и из inbox.',
|
||||
manualSelectAll: 'Выбрать все',
|
||||
manualSelected: 'Выбрано: {{count}}',
|
||||
manualEmpty: 'В папке manual пусто',
|
||||
manualUnsupported: 'формат не поддерживается',
|
||||
manualAlready: 'уже в библиотеке',
|
||||
manualTruncated: 'Показаны первые 500 файлов — в папке есть ещё.',
|
||||
manualPickShow: 'Выберите шоу',
|
||||
manualOrderHint: 'Номера сезона и серии определяются по именам файлов.',
|
||||
manualImport: 'Забрать в шоу',
|
||||
manualImported: 'Импортировано файлов: {{count}}',
|
||||
uploadToShow: 'Загрузить в шоу',
|
||||
toShowTitle: 'Загрузить и добавить в шоу',
|
||||
autoDetectHint:
|
||||
@@ -863,6 +877,20 @@ const resources = {
|
||||
media: {
|
||||
title: 'Media',
|
||||
upload: 'Upload',
|
||||
manualButton: 'From manual folder',
|
||||
manualTitle: 'Manual pick from the manual folder',
|
||||
manualHint:
|
||||
'Files in manual/ are not picked up by the scanner — select the ones you need and choose a show. Imported files leave the folder, just like from inbox.',
|
||||
manualSelectAll: 'Select all',
|
||||
manualSelected: 'Selected: {{count}}',
|
||||
manualEmpty: 'The manual folder is empty',
|
||||
manualUnsupported: 'unsupported format',
|
||||
manualAlready: 'already in the library',
|
||||
manualTruncated: 'Showing the first 500 files — there are more in the folder.',
|
||||
manualPickShow: 'Pick a show',
|
||||
manualOrderHint: 'Season and episode numbers are taken from the file names.',
|
||||
manualImport: 'Import into show',
|
||||
manualImported: 'Files imported: {{count}}',
|
||||
uploadToShow: 'Upload to show',
|
||||
toShowTitle: 'Upload and add to show',
|
||||
autoDetectHint:
|
||||
|
||||
Reference in New Issue
Block a user