mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 21:00:09 +00:00
Add Transmission/NZBGet and per-client paths and much more
Extend multi-download-client support to include Transmission and NZBGet and introduce per-client custom download paths. Adds protocol mapping and new client types, Transmission/NZBGet integration services, API CRUD and validation changes, UI components/modal updates and live path previews, and manager routing by protocol. Includes DB migrations (download_path on download_history, interactive_search_access on users), schema updates, and related processor/service fixes and tests to ensure backward compatibility and proper path resolution.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* Component: Audio Format Constants
|
||||
* Documentation: documentation/phase3/file-organization.md
|
||||
*
|
||||
* Centralized audio format definitions used across the application.
|
||||
* Add new formats here to enable support in all subsystems.
|
||||
*/
|
||||
|
||||
/**
|
||||
* All supported audio file extensions for audiobook detection and file organization.
|
||||
* Used by: file-organizer.ts, files-hash.ts
|
||||
*/
|
||||
export const AUDIO_EXTENSIONS = [
|
||||
'.m4b',
|
||||
'.m4a',
|
||||
'.mp3',
|
||||
'.mp4',
|
||||
'.aa',
|
||||
'.aax',
|
||||
'.flac',
|
||||
'.ogg',
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* Audio formats supported by the chapter merger (FFmpeg concat + M4B output).
|
||||
* Formats here can be detected, probed, ordered, and merged into a single M4B.
|
||||
* Note: .aa/.aax excluded (DRM-protected, cannot be decoded by FFmpeg without keys).
|
||||
* Note: .ogg excluded (FFmpeg concat demuxer does not support Ogg container).
|
||||
*/
|
||||
export const CHAPTER_MERGE_FORMATS = [
|
||||
'.mp3',
|
||||
'.m4a',
|
||||
'.m4b',
|
||||
'.mp4',
|
||||
'.aac',
|
||||
'.flac',
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* Audio formats supported by metadata tagging via FFmpeg.
|
||||
* Each format maps to a specific FFmpeg output format flag and tagging strategy.
|
||||
*/
|
||||
export const METADATA_TAG_FORMATS = [
|
||||
'.m4b',
|
||||
'.m4a',
|
||||
'.mp3',
|
||||
'.mp4',
|
||||
'.flac',
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* Formats that use MP4/M4A container tags (iTunes-style metadata).
|
||||
* These use `-f mp4` output format in FFmpeg.
|
||||
*/
|
||||
export const MP4_CONTAINER_FORMATS = ['.m4b', '.m4a', '.mp4'] as const;
|
||||
|
||||
/**
|
||||
* Audio format identifiers detectable in torrent/NZB titles.
|
||||
* Used by Prowlarr service for metadata extraction and ranking algorithm for scoring.
|
||||
*/
|
||||
export const TORRENT_TITLE_FORMATS = ['M4B', 'M4A', 'MP3', 'FLAC'] as const;
|
||||
|
||||
export type TorrentTitleFormat = (typeof TORRENT_TITLE_FORMATS)[number];
|
||||
|
||||
/**
|
||||
* Type helper for the format field on TorrentResult.
|
||||
* 'OTHER' is used when no recognized format is detected in the title.
|
||||
*/
|
||||
export type AudioFormat = TorrentTitleFormat | 'OTHER';
|
||||
Reference in New Issue
Block a user