-
-
Notifications
You must be signed in to change notification settings - Fork 25
Configuration
CineSync offers comprehensive configuration options for customizing media organization, automation, and integration features. All settings are configured through the .env file or the web interface.
CineSync supports configuration through multiple methods:
-
Environment Variables: Set in
.envfile for persistent configuration - Web Interface: Configure settings through the modern web dashboard
- Command Line: Override settings for specific operations
- API: Programmatic configuration management
Make sure to edit the .env file before running CineSync. Below are the configurable variables organized by category:
| Variable | Description | Default Value | Required |
|---|---|---|---|
SOURCE_DIR |
Source directories containing media files (comma-separated for multiple) | /path/to/files |
✅ |
DESTINATION_DIR |
Destination directory for organized media library | /path/to/destination |
✅ |
TMDB_API_KEY |
TMDb API key for metadata lookup | your-api-key |
✅ |
| Variable | Description | Default Value |
|---|---|---|
CINESYNC_IP |
IP address for web interface and API | 0.0.0.0 |
CINESYNC_API_PORT |
Port for API server and WebDAV | 8082 |
CINESYNC_UI_PORT |
Port for web interface | 5173 |
CINESYNC_AUTH_ENABLED |
Enable authentication for web interface | true |
CINESYNC_USERNAME |
Username for web interface login | admin |
CINESYNC_PASSWORD |
Password for web interface login | admin |
| Variable | Description | Default Value |
|---|---|---|
LOG_LEVEL |
Logging verbosity (DEBUG, INFO, WARNING, ERROR, CRITICAL) | INFO |
| Variable | Description | Default Value |
|---|---|---|
CINESYNC_LAYOUT |
Use simplified Movies/Shows layout | false |
USE_SOURCE_STRUCTURE |
Preserve original folder structure | false |
SHOW_RESOLUTION_STRUCTURE |
Enable resolution-based subfolders for shows | true |
MOVIE_RESOLUTION_STRUCTURE |
Enable resolution-based subfolders for movies | true |
| Variable | Description | Default Value |
|---|---|---|
ANIME_SEPARATION |
Separate anime content into dedicated folders | true |
4K_SEPARATION |
Separate 4K content into dedicated folders | true |
KIDS_SEPARATION |
Separate kids/family content based on ratings | false |
| Variable | Description | Default Value |
|---|---|---|
CUSTOM_MOVIE_FOLDER |
Custom folder name for movies | CineSync/Movies |
CUSTOM_SHOW_FOLDER |
Custom folder name for TV shows | CineSync/Shows |
CUSTOM_ANIME_MOVIE_FOLDER |
Custom folder name for anime movies | CineSync/Movies |
CUSTOM_ANIME_SHOW_FOLDER |
Custom folder name for anime shows | CineSync/Shows |
| Variable | Description | Default Value |
|---|---|---|
RENAME_ENABLED |
Enable file renaming based on metadata | false |
RENAME_TAGS |
Tags to include in renamed files | Resolutions |
ALLOWED_EXTENSIONS |
File extensions to process | .mp4,.mkv,.srt |
SKIP_EXTRAS_FOLDER |
Skip processing extras folder files | true |
SKIP_ADULT_PATTERNS |
Skip files matching adult content patterns | true |
| Variable | Description | Default Value |
|---|---|---|
MAX_PROCESSES |
Maximum parallel processing threads | 1 |
SLEEP_TIME |
Real-time monitoring interval (seconds) | 60 |
SYMLINK_CLEANUP_INTERVAL |
Cleanup check interval (seconds) | 600 |
| Variable | Description | Default Value |
|---|---|---|
TMDB_FOLDER_ID |
Use TMDb IDs in folder structure | false |
IMDB_FOLDER_ID |
Use IMDb IDs in folder structure | false |
TVDB_FOLDER_ID |
Use TVDB IDs in folder structure | false |
ANIME_SCAN |
Apply specialized anime detection rules | false |
LANGUAGE |
Metadata language preference | ENGLISH |
| Variable | Description | Default Value |
|---|---|---|
MOVIE_COLLECTION_ENABLED |
Group movies by collections | false |
RELATIVE_SYMLINK |
Create relative instead of absolute symlinks | false |
| Variable | Description | Default Value |
|---|---|---|
DB_THROTTLE_RATE |
Throttle rate for database operations (requests per second). Higher values may increase performance but also resource usage. | 100 |
DB_MAX_RETRIES |
Maximum number of retries for database operations in case of failure. Set to 0 to disable retries. | 10 |
DB_RETRY_DELAY |
Delay (in seconds) between retry attempts for database operations. | 1.0 |
DB_BATCH_SIZE |
Batch size for processing records from the database. Increasing this value can improve performance but may use more memory. | 1000 |
DB_MAX_WORKERS |
Maximum number of parallel workers for database operations. Adjust this value based on your system’s capabilities. | 4 |
| Variable | Description | Default Value |
|---|---|---|
ENABLE_PLEX_UPDATE |
Enable automatic Plex library updates | false |
PLEX_URL |
Plex Media Server URL | your-plex-url |
PLEX_TOKEN |
Plex authentication token | your-plex-token |
| Variable | Description | Default Value |
|---|---|---|
RCLONE_MOUNT |
Enable rclone mount verification | false |
MOUNT_CHECK_INTERVAL |
Mount availability check interval (seconds) | 30 |
| Variable | Description | Default Value |
|---|---|---|
CINESYNC_WEBDAV |
Enable WebDAV server | true |
WEBDAV_IP |
WebDAV server IP address | 0.0.0.0 |
WEBDAV_PORT |
WebDAV server port | 8082 |
WEBDAV_AUTH_ENABLED |
Enable WebDAV authentication | true |
WEBDAV_USERNAME |
WebDAV username | admin |
WEBDAV_PASSWORD |
WebDAV password | admin |
-
SOURCE_DIR: Full path to the directory containing input files- Example:
/mnt/media/incomingorC:\Downloads\Media
- Example:
-
DESTINATION_DIR: Full path where processed files will be organized- Example:
/mnt/media/libraryorD:\Media\Organized
- Example:
- Type: Boolean
-
Default:
false - Description: Determines file organization method
-
Options:
-
true: Preserves original folder structure from source -
false: Organizes files into predefined resolution-based folders
-
- Type: Boolean
-
Default:
false - Description: Simplified directory organization
-
Options:
-
true: Separates files into 'Movies' and 'Shows' directories -
false: Uses more detailed organization method
-
Example Configurations:
# Preserve original structure
USE_SOURCE_STRUCTURE=true
# Simple Movies/Shows layout
CINESYNC_LAYOUT=true
- Description: Controls verbosity of application logging
-
Options:
-
DEBUG: Most detailed logging -
INFO: Standard information messages -
WARNING: Only warnings and errors -
ERROR: Critical errors only -
CRITICAL: Extremely severe errors
-
Example:
LOG_LEVEL="INFO" # Recommended for most users
- Type: Boolean
- Description: Enables verification of remote storage mount points. Prevents symlink deletion if mount suddenly disconnects.
- Use Case: Useful for cloud storage or network-mounted drives
- Type: Integer (seconds)
- Description: Frequency of checking mount point availability
- Recommendation: Balance between responsiveness and system load
Example Configuration:
RCLONE_MOUNT=true
MOUNT_CHECK_INTERVAL=30 # Check every 30 seconds
- Description: API key for accessing TMDb services
- Requirement: Must obtain from TMDb Developer Portal
- Type: Boolean
- Description: Enables specialized scanning for anime files
- Useful for: Anime collections with unique naming conventions
-
TMDB_FOLDER_ID: Organize folders using TMDb IDs -
IMDB_FOLDER_ID: Organize folders using IMDb IDs -
TVDB_FOLDER_ID: Organize folders using TVDB IDs for shows -
RENAME_ENABLED: Enable file renaming based on metadata
- Description: Specify additional tags to include in filename
-
Available Categories:
-
VideoCodecs: e.g., x264, x265, H.264 -
AudioCodecs: e.g., AAC, DTS, AC3 -
AudioAtmos: Dolby Atmos indicator -
DynamicRange: HDR, SDR -
AudioChannels: 5.1, 7.1 -
Resolution: 720p, 1080p, 4K -
MovieVersions: Director's Cut, Extended -
StreamingServices: Netflix, Amazon -
Languages: EN, FR, JP, etc ..
-
Rename Tag Examples:
RENAME_TAGS=TMDB
RENAME_TAGS=VideoCodec,DynamicRange,AudioChannels
RENAME_TAGS=VideoCodec,AudioCodec,AudioAtmos,DynamicRange,AudioChannels,Resolution,Languages,TMDB/IMDB (Use either tmdb or imdb based on folder id)
Bird.Box.Barcelona.2023.1080p.NF.WEB-DL.ENGLISH.HINDI.DDP5.1.Atmos.HDR-DV.H.265-GOPI SAHI.mkv
-
Output:
'Bird Box Barcelona (2023) {tmdb-805320}.mkv' - Description: Uses only TMDb ID, stripping most original metadata
-
Output:
Bird Box Barcelona (2023) [1080P].mkv - Description: Highlights the video resolution
3. Comprehensive Configuration: RENAME_TAGS=VideoCodec,DynamicRange,AudioCodec,AudioChannels,StreamingServices,Languages
-
Output:
Bird Box Barcelona (2023) [H265] [HDR] [ATMOS] [DDP5.1] [NF] [EN+HI].mkv -
Breakdown:
-
H.265: Video Codec -
HDR-DV: Dynamic Range (HDR with Dolby Vision) -
DDP5.1: Audio Codec and Channels (Dolby Digital Plus 5.1) -
NF: Streaming Service (Netflix) -
[EN+HI]: Languages
-
-
Output:
Bird Box Barcelona (2023) [EN+HI].mkv - Description: Emphasizes language and source details
- Type: Boolean
- Description: Organize movies into collection folders
- Example: Harry Potter series files in a dedicated folder
- Type: Boolean
- Description: Create symlinks with relative paths
-
Recommended:
truefor better portability
- Type: Integer
- Description: Maximum parallel symlink creation processes
-
Recommendations:
- Multi-core CPU: Higher values (4-8)
- Single-core/Low-power: Keep at 1-2
-
SKIP_EXTRAS_FOLDER: Skip processing of extras files -
EXTRAS_MAX_SIZE_MB: Maximum file size considered as an extra
-
SKIP_ADULT_PATTERNS: Filter out specific content types using predefined patterns
-
SLEEP_TIME: Interval between directory change checks
-
DB_THROTTLE_RATE: Database operation rate limit -
DB_MAX_RETRIES: Retry attempts for failed operations -
DB_BATCH_SIZE: Record processing batch size -
DB_MAX_WORKERS: Parallel database processing threads
- Description: Controls the rate at which database operations are performed, measured in requests per second.
-
Example:
- If
DB_THROTTLE_RATEis set to1, the script will make one database operation every second. - This helps control the load on the database, especially in cases where it's accessed over a network.
- If
- Description: Defines the number of records to process at once during each database operation.
-
Example:
- If
DB_BATCH_SIZEis set to10, the script will process 10 records at once in each database operation. - Larger batch sizes increase performance but require more memory.
- If
- Description: Defines how many times the script will retry a failed database operation.
-
Example:
- If
DB_MAX_RETRIESis set to10, the script will attempt to retry a failed operation up to 10 times. - If set to
0, no retries will occur.
- If
- Description: The time in seconds to wait before retrying a failed database operation.
-
Example:
- If
DB_RETRY_DELAYis set to1.0, the script will wait 1 second before retrying the operation.
- If
- Description: Defines how many parallel workers the script will use to perform database operations.
-
Example:
- If
DB_MAX_WORKERSis set to4, up to four parallel workers will handle database operations, speeding up processing on systems with multiple CPU cores.
- If
DB_THROTTLE_RATE = 1 # Limits the processing to one batch per second.
DB_BATCH_SIZE = 1 # Only one file is processed per batch.-
Outcome:
- The system will process 1 file every second, with a retry limit of 1 and a 1-second delay between retries.
DB_THROTTLE_RATE = 1 # Limits the system to one batch per second.
DB_BATCH_SIZE = 10 # Each batch contains 10 files, so 10 files are processed per second.-
Outcome:
- The system processes 10 files per second in a single batch, with retries and delays applied as configured.
By adjusting DB_THROTTLE_RATE and DB_BATCH_SIZE, you can:
- Control the rate at which data is processed.
- Manage system load on both the database and the script itself.
- Optimize performance by balancing speed with resource usage.
Adjusting DB_MAX_WORKERS and DB_MAX_RETRIES can help in achieving optimal parallel processing and ensuring that temporary failures are handled effectively.
Pro Tip: Always test configurations in a controlled environment before full deployment!
When KIDS_SEPARATION=true, CineSync automatically identifies and separates family-friendly content:
- Movies: G, PG (configurable threshold)
- TV Shows: TV-Y, TV-Y7, TV-G, TV-PG
Destination/
├── Movies/
│ ├── Regular Movies/
│ └── Kids Movies/
└── Shows/
├── Regular Shows/
└── Kids Shows/
When 4K_SEPARATION=true, high-quality content is automatically organized:
Movies/
├── 4K/
│ ├── Movie Title (2023) [4K]/
│ └── Another Movie (2024) [HDR]/
└── Regular/
└── Standard Definition Movies/
With ANIME_SEPARATION=true, anime content gets specialized handling:
Destination/
├── AnimeMovies/
│ ├── Studio Ghibli Collection/
│ └── Individual Anime Movies/
└── AnimeShows/
├── Attack on Titan/
└── Other Anime Series/
# Optimize for large libraries
MAX_PROCESSES=8
DB_THROTTLE_RATE=50.0
DB_BATCH_SIZE=2000
DB_MAX_WORKERS=8
# Enable all automation
AUTO_PROCESSING_ENABLED=true
CINESYNC_LAYOUT=true
4K_SEPARATION=true
ANIME_SEPARATION=true
KIDS_SEPARATION=true# Conservative resource usage
MAX_PROCESSES=1
DB_THROTTLE_RATE=5.0
DB_BATCH_SIZE=100
DB_MAX_WORKERS=2
# Basic organization
CINESYNC_LAYOUT=true
USE_SOURCE_STRUCTURE=false# Plex integration
ENABLE_PLEX_UPDATE=true
PLEX_URL=http://localhost:32400
PLEX_TOKEN=your-actual-token
# WebDAV for streaming
CINESYNC_WEBDAV=true
WEBDAV_AUTH_ENABLED=true
WEBDAV_USERNAME=mediauser
WEBDAV_PASSWORD=secure-password- Access settings through the web interface at
http://localhost:5173 - Real-time configuration validation and updates
- Export/import configuration settings
- Reset to default values when needed
- Primary configuration through
.envfile - Support for environment variable overrides
- Automatic backup of configuration changes
- Version control friendly configuration format
- Programmatic configuration management via REST API
- Real-time configuration updates without restart
- Bulk configuration operations
- Configuration validation and error reporting
- Installation Guide - Setup and deployment
- Web Interface - Web dashboard and management
- Docker Volumes - Docker configuration for media servers