Share Permission Levels
Nicotine+ supports three permission levels for shared folders:Each share is a tuple:
(virtual_name, folder_path)The virtual name is what other users see. The folder path is the actual location on your system.Adding Shared Folders
Via Configuration File
Manually edit the config file:Share Naming Rules
Valid Virtual Names
Valid Virtual Names
- Cannot contain forward slashes (
/) - Cannot contain backslashes (
\) - Leading/trailing spaces and quotes are stripped
- Empty names default to “Shared”
- Duplicate names are automatically numbered:
Music,Music1,Music2
Duplicate Prevention
Duplicate Prevention
- Cannot share the same folder path twice
- Cannot use the same virtual name twice
- Duplicates are automatically skipped during scanning
Path Normalization
Path Normalization
Paths are normalized using
os.path.normpath():Share Scanning
Automatic Scanning
Daily rescanning runs at the specified hour (e.g.,
rescan_shares_hour = 3 runs at 3:00 AM).Manual Scanning
Via Command Line:Rescan vs Rebuild
Rescan vs Rebuild
Rescan:
- Updates modified files
- Adds new files
- Removes deleted files
- Preserves unchanged file metadata
- Faster
- Deletes all share databases
- Rescans everything from scratch
- Re-extracts all file metadata
- Slower but fixes corrupted databases
Scan Process
Directory Traversal
Each shared folder is recursively scanned:
- Hidden files/folders are skipped (Windows)
- Filtered files/folders are skipped
- File metadata is extracted
Metadata Extraction
For audio files:
- Duration
- Bitrate (VBR detection)
- Sample rate
- Bit depth
Database Creation
Creates multiple database files:
publicfiles.dbn- Public file indexpublicstreams.dbn- Compressed folder contentswords.dbn- Search word index- Similar files for buddy and trusted shares
Share Filters
Exclude Files and Folders
Prevent specific files or folders from being shared:Filters use wildcard patterns:
*matches any characters- Trailing
\indicates a folder filter - Filters are case-insensitive
Filter Examples
Exclude Specific Extensions
Exclude Specific Extensions
Exclude Folders by Name
Exclude Folders by Name
Complex Patterns
Complex Patterns
Share Databases
Database Files
Shares are stored in custom.dbn database files:
Database Format
Database Structure
Database Structure
Custom key-value format optimized for shares:
- Signature:
DBN+ - Version: 3
- Protocol: Pickle (v5)
- Security: RestrictedUnpickler (prevents code execution)
Database Corruption
Database Corruption
If databases become corrupted:
- Automatic recovery: Nicotine+ detects corruption and rescans
-
Manual recovery: Delete
.dbnfiles and rescan: - Version mismatch: Upgrading Nicotine+ may require database rebuild
Database Operations
File Metadata
Supported Audio Formats
Extracted Metadata
For each audio file:Metadata extraction is skipped for files smaller than 128 bytes (assumed empty/invalid).
File Types
All Supported Types
All Supported Types
shares.py FileTypes class for complete list.Share Visibility
Reveal Buddy/Trusted Shares
Control whether buddy/trusted shares count towards public share statistics:User Permission Checking
Nicotine+ determines access based on:Share Management
Add Share Programmatically
Remove Share
Backslash Handling
Soulseek uses backslashes (
\) as path separators. This conflicts with Unix systems where backslashes are valid filename characters.Backslash Sentinel
Nicotine+ substitutes backslashes in filenames:Troubleshooting
Shares Not Visible
Check Share Scan Status
Check Share Scan Status
Verify Share Statistics
Verify Share Statistics
Hidden Files (Windows)
Hidden Files (Windows)
Slow Scanning
Large Collections
Large Collections
Scanning is CPU and I/O intensive:
- 10,000 files: ~1-2 minutes
- 100,000 files: ~10-20 minutes
- 1,000,000 files: ~2-3 hours
Network Drives
Network Drives
Scanning network drives is significantly slower:
- Use local drives when possible
- Consider selective sharing
- Mount network drives locally for better performance
Database Errors
DatabaseVersionError
DatabaseVersionError
DatabaseError
DatabaseError
Scanning Failed
Scanning Failed
- Permission denied on folders
- Invalid characters in paths
- Filesystem errors