Configuration - smokin-salmon/smoked-salmon GitHub Wiki
smoked-salmon Configuration Options
Required Configuration Options
Option |
Type |
Description |
DOWNLOAD_DIRECTORY |
Path |
Directory where your files are moved to after upload. Usually the download directory for your torrent client |
DOTTORRENTS_DIR |
Path |
Directory where .torrent files are saved after upload. Safe to use a folder scanned by a torrent client that deletes .torrent files. |
RED_SESSION |
String |
Authentication cookie for RED. Get from browser by logging in with "Remember Me" checked, then inspect element, go to Application tab, and copy the Session cookie. |
OPS_SESSION |
String |
Authentication cookie for OPS. Get from browser by logging in with "Remember Me" checked, then inspect element, go to Application tab, and copy the Session cookie. |
PTPIMG_KEY |
String |
Required for using ptpimg as image host. Get from logging into ptpimg, go to Developpers tools, Elements tab, and search for "api_key". |
PTSCREENS_KEY |
String |
Required for using ptscreens as image host. Get from logging into ptscreens, go to Settings, API tab, and generate your "api_key". |
OEIMG_KEY |
String |
Required for using oeimg as image host. Get from logging into oeimg, go to Settings, API tab, and generate your "api_key". |
Tracker Options
Option |
Type |
Default |
Description |
TRACKER_LIST |
List |
- |
List of trackers to offer as upload choices (e.g., ['RED','OPS'] ). |
DEFAULT_TRACKER |
String |
- |
Three-letter code of default tracker to use without explicit -t choice. |
RED_API_KEY |
String |
- |
Set to use RED API instead of upload.php. |
OPS_API_KEY |
String |
- |
Set to use OPS API instead of upload.php. |
MULTI_TRACKER_UPLOAD |
Boolean |
True |
If true, offers uploading to another tracker after first upload completes. |
RED_DOTTORRENTS_DIR |
Path |
- |
Directory for RED-specific .torrent files. Overrides DOTTORRENTS_DIR . |
OPS_DOTTORRENTS_DIR |
Path |
- |
Directory for OPS-specific .torrent files. Overrides DOTTORRENTS_DIR . |
General Options
Option |
Type |
Default |
Description |
DEBUG_TRACKER_CONNECTION |
Boolean |
False |
Outputs requests responses from trackers connection. |
UPDATE_NOTIFICATION |
Boolean |
True |
Checks if a newer version of smoked-salmon is available on github. |
UPDATE_NOTIFICATION_VERBOSE |
Boolean |
True |
Outputs the detailed changelog between the local version and the latest version on github. |
DISABLE_HARDLINKS |
Boolean |
False |
If True, hardlinks won't be used when copying files. |
TMP_DIR |
Path |
None |
If set, spectrals will be generated in this folder. If undefined/None, spectrals will be generated in the albums folders during upload. |
CLEAN_TMP_DIR |
Boolean |
If True, remove all files from the temp folder on startup. If TMP_DIR is not set, this option has no effect. Make sure the TMP_DIR folder is only used by smoked_salmon when using this option, as all files inside it will be removed. |
|
File/Folder Naming Options
Option |
Type |
Default |
Description |
FOLDER_TEMPLATE |
String |
'{artists} - {title} ({year}) [{source} {format}] {{{label}}}' |
Template for folder names using metadata keys. |
FILE_TEMPLATE |
String |
'{tracknumber}. {artist} - {title}' |
Template for file names using tag data. |
NO_ARTIST_IN_FILENAME_IF_ONLY_ONE_ALBUM_ARTIST |
Boolean |
True |
Use alternative template when same artist is on all tracks. |
ONE_ALBUM_ARTIST_FILE_TEMPLATE |
String |
'{tracknumber}. {title}' |
Alternative file template when same artist is on all tracks. |
LOWERCASE_COVER |
Boolean |
False |
Convert "Cover.jpg" to "cover.jpg". |
VARIOUS_ARTIST_THRESHOLD |
Integer |
4 |
Number of artists before using VARIOUS_ARTIST_WORD . |
VARIOUS_ARTIST_WORD |
String |
'Various' |
Word used when artist count exceeds threshold. |
GUESTS_IN_TRACK_TITLE |
Boolean |
False |
Put guest artists in track title rather than artist string. |
BLACKLISTED_SUBSTITUTION |
String |
'_' |
Character to replace OS-reserved characters with. |
FULLWIDTH_REPLACEMENTS |
Boolean |
False |
Use CJK fullwidth equivalents for blacklisted characters. |
BLACKLISTED_GENRES |
Set[String] |
{'Soundtrack'} |
Genres to exclude or replace with "delete.this.tag". |
Tagging options
Option |
Type |
Default |
Description |
REVIEW_AS_COMMENT_TAG |
Boolean |
True |
Include reviews in comment tag for each track. |
STRIP_USELESS_VERSIONS |
Boolean |
True |
Remove descriptors like "Original Mix" from track titles. |
ADD_EDITION_TITLE_TO_ALBUM_TAG |
Boolean |
True |
Add edition titles like "Remastered" to album tag. |
EMPTY_TRACK_COMMENT_TAG |
Boolean |
True |
Removes track tag comments before upload |
Upload Process Options
Option |
Type |
Default |
Description |
CHECK_REQUESTS |
Boolean |
True |
Whether to search for possible request fills. |
ALWAYS_ASK_FOR_REQUEST_FILL |
Boolean |
False |
If true, always prompts for request ID input, even when no requests are found. |
CHECK_RECENT_UPLOADS |
Boolean |
True |
Whether to check logs for recent possible duplicates. |
LOG_DUPE_TOLERANCE |
Number |
0.5 |
Similarity threshold for flagging possible duplicates. |
COPY_UPLOADED_URL_TO_CLIPBOARD |
Boolean |
False |
Copy permalinks to clipboard after uploads. Don't enable over SSH. |
YES_ALL |
Boolean |
False |
Automatically answers "Yes" to all questions. Allows for faster upload although riskier (dupe, bad lossless files, ...). |
FLAC_COMPRESSION_LEVEL |
Integer |
8 |
FLAC compression level (0-8, higher = smaller files but slower). |
NATIVE_SPECTRALS_VIEWER |
Boolean |
False |
Use feh instead of web interface for viewing spectrals. |
PROMPT_PUDDLETAG |
Boolean |
False |
Prompt to open files in puddletag for manual tag editing. |
FEH_FULLSCREEN |
Boolean |
True |
Open feh in fullscreen mode for spectral viewing. |
COMPRESS_SPECTRALS |
Boolean |
False |
Compress spectral images with optipng (requires installation). |
SIMULTANEOUS_THREADS |
Integer |
3 |
Number of threads to use for spectrals generation, transcodes, downconverts ... |
Search Options
Option |
Type |
Default |
Description |
SEARCH_LIMIT |
Integer |
3 |
Maximum number of results to show per metadata source. |
DISCOGS_TOKEN |
String |
Required for Discogs metadata. Create a Discogs account and get token from https://www.discogs.com/settings/developers. |
|
QOBUZ_APP_ID |
String |
None |
Found on qobuz in your auth response when logged in to the web-player (see below) |
QOBUZ_USER_AUTH_TOKEN |
String |
None |
Found on qobuz in your auth response when logged in to the web-player (see below) |
TIDAL_TOKEN |
String |
None |
Found on tidal in your events response when logged in to the web-player (see below) |
TIDAL_SEARCH_REGIONS |
List[String] |
['DE', 'NZ', 'US', 'GB'] |
Regions to search on Tidal. |
TIDAL_FETCH_REGIONS |
List[String] |
['DE', 'NZ', 'US', 'GB'] |
Regions to use for fetching Tidal metadata. |
USER_AGENT |
String |
'salmon uploading tools, maintained by lights' |
User agent for sites with API policies. |
SEARCH_EXCLUDED_LABELS |
Set[String] |
None |
Labels to exclude from metadata search results. |
Qobuz APP_ID and USER_AUTH_TOKEN
- Create an account on Qobuz.
- Open the Qobuz Web Player.
- Open the Developer Tools in your browser (usually by pressing F12 or right-clicking on the page and selecting "Inspect").
- Navigate to the "Network" tab in the Developer Tools.
- Reload the Web Player with the Developer Tools open.
- Look for an XHR/websocket request named "auth".
- Click on the "auth" request.
- In the "Request Headers" section, locate X-App-id and X-User-Auth-Token.
- Copy the values of X-App-id and X-User-Auth-Token into your configuration file.
This will enable Qobuz in smoked-salmon.
Removing both QOBUZ_APP_ID and QOBUZ_USER_AUTH_TOKEN from your config file will disable Qobuz metadata search.
Tidal TOKEN
- Create an account on Tidal.
- Open the Tidal Web Player.
- Open the Developer Tools in your browser (usually by pressing F12 or right-clicking on the page and selecting "Inspect").
- Navigate to the "Network" tab in the Developer Tools.
- Start playing any song (with the free tier, it will play 30 seconds of the song, you don't need more)
- In the "Network" tab of the Developer Tools, look for an XHR request named "playbackinfo"
- Click on the "playbackinfo" request
- In the "Request Headers" section, locate X-Tidal-Token
- Copy the values of X-Tidal-Token into your configuration file.
This will enable Tidal in smoked-salmon.
Removing TIDAL_TOKEN from your config file will disable Tidal metadata search.
Description Options
Option |
Type |
Default |
Description |
TRACKLIST_IN_T_DESC |
Boolean |
False |
Include tracklist and timestamps in torrent description. |
BITRATES_IN_T_DESC |
Boolean |
False |
Include track bitrates in torrent description. |
USE_UPC_AS_CATNO |
Boolean |
True |
Use UPC code as catalog number when not found. |
ICONS_IN_DESCRIPTIONS |
Boolean |
False |
Include icons for metadata sources in descriptions. |
LMA_COMMENT_IN_T_DESC |
Boolean |
False |
Includes the full Lossy Master Approval report (text, optional source info, and spectrals) in the release description. |
Image Upload Options
Option |
Type |
Default |
Description |
IMAGE_UPLOADER |
String |
'ptpimg' |
Host for general image uploads (possible values: ptpimg, ptscreens, oeimg, catbox, emp). |
COVER_UPLOADER |
String |
'ptpimg' |
Host for cover image uploads (possible values: ptpimg, ptscreens, oeimg, catbox, emp). |
SPECS_UPLOADER |
String |
'ptpimg' |
Host for spectral image uploads (possible values: ptpimg, ptscreens, oeimg, catbox, emp). |
Webserver Options
Option |
Type |
Default |
Description |
WEB_HOST |
String |
'http://127.0.0.1:55110/' |
Web host URL for accurate link generation. |
WEB_PORT |
Integer |
55110 |
Port for salmon's web service. |
WEB_STATIC_ROOT_URL |
String |
'/static' |
URL root for static content when using custom nginx location. |
RUTorrent Settings
Option |
Type |
Default |
Description |
RED_LABEL |
String |
'ptpimg' |
RED label in rutorrent |
OPS_LABEL |
String |
'ptpimg' |
OPS label in rutorrent |
RED_DIR |
String |
'ptpimg' |
RED directory in rutorrent |
OPS_DIR |
String |
None |
OPS directory in rutorrent |
TRACKER_DIRS |
String |
{'OPS': OPS_DIR, 'RED': RED_DIR} |
per tracker rutorrent dir |
TRACKER_LABELS |
String |
{'OPS': OPS_LABEL, 'RED': RED_LABEL} |
per tracker rutorrent labels |
RUTORRENT_URL |
String |
"http://RUTORRENT_ADDRESS:9380/plugins/rpc/rpc.php" |
XMLRPC for rutorrent |
Notes on Templates
- Folder Template: Supports keys
artists
, title
, year
, edition_title
, label
, catno
, rls_type
, source
, and format
.
- File Template: Supports keys
tracknumber
, artist
, title
, and ISRC
.
- Use
{{}}
to include literal curly braces in templates.
- Subfolders are supported with the
/
character in templates.