-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.example.toml
191 lines (170 loc) · 6.89 KB
/
config.example.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# WARNING:
# IF THE RICH PRESENCE DOES NOT GET UPDATED
# PLEASE CHECK THE LOGS FOR ANY ERRORS
# ------------------
# Basic Settings
# ------------------
# Whether to clear Discord activity when media is paused
clear_on_pause = true
# How often to update Discord presence (in milliseconds)
interval = 2000
# ------------------
# Display Template
# ------------------
[template]
# First line in Discord presence for all activity types
detail = "{{{title}}}"
# Second line in Discord presence for all activity types
state = "{{{artist_display}}}"
# or
# state = "{{#each artists}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}"
# Text shown when hovering over the large image
# For "listening" activity type: Shows as third line
large_text = "{{#if album}}{{{album}}}{{#if year}} ({{{year}}}){{/if}}{{#if album_artist_display}} by {{{album_artist_display}}}{{/if}}{{/if}}"
# Text shown when hovering over the small image (player icon)
# Only visible when show_icon = true
small_text = "{{#if player}}Playing on {{{player}}}{{else}}MPRIS{{/if}}"
# Templates are rendered using Handlebars
#
# Available Handlebars Helpers:
# - Built-in Helpers: https://handlebarsjs.com/guide/builtin-helpers.html
# - eq: Compare two values for equality
# Example: {{#if (eq status "playing")}}Playing{{/if}}
#
# Available template variables:
# Core Metadata:
# {{{title}}} - Track title
# {{{artists}}} - Track artists (as array)
# {{{artist_display}}} - Track artists (comma separated)
# {{{album}}} - Album name
# {{{album_artists}}} - Album artists (as array)
# {{{album_artist_display}}} - Album artists (comma separated)
# {{{track_number}}} - Track number
# {{{track_total}}} - Total tracks in album
# {{{track_display}}} - Track number as "X/Y"
# {{{disc_number}}} - Disc number
# {{{disc_total}}} - Total discs
# {{{disc_display}}} - Disc number as "X/Y"
# {{{genres}}} - Track genres (as array)
# {{{genre_display}}} - Track genres (comma separated)
# {{{year}}} - Release year
#
# Additional Metadata:
# {{{duration_secs}}} - Duration in seconds
# {{{duration_display}}} - Duration as "MM:SS"
# {{{initial_key}}} - Musical key
# {{{bpm}}} - Beats per minute
# {{{mood}}} - Track mood
#
# Audio Properties:
# {{{bitrate_display}}} - e.g. "320 kbps"
# {{{sample_rate_display}}} - e.g. "44.1 kHz"
# {{{bit_depth_display}}} - e.g. "16-bit"
# {{{channels_display}}} - e.g. "Stereo"
#
# Player Status:
# {{{player}}} - Media player name
# {{{player_bus_name}}} - Player bus name
# {{{status}}} - Playback status
# {{{status_icon}}} - Status as icon (▶, ⏸, ⏹)
# {{{volume}}} - Player volume
#
# Additional IDs:
# {{{isrc}}} - International Standard Recording Code
# {{{barcode}}} - Release barcode
# {{{catalog_number}}} - Release catalog number
# {{{label}}} - Record label
# {{{musicbrainz_track_id}}} - MusicBrainz track ID
# {{{musicbrainz_album_id}}} - MusicBrainz album ID
# {{{musicbrainz_artist_id}}} - MusicBrainz artist ID
# {{{musicbrainz_album_artist_id}}} - MusicBrainz album artist ID
# {{{musicbrainz_release_group_id}}} - MusicBrainz release group ID
# ------------------
# Activity Types
# ------------------
[activity_type]
# Automatically determine activity type based on media content
# audio -> "listening", video -> "watching", etc.
use_content_type = true
# Default activity type when content type detection is disabled
# or when the type cannot be determined
# Available types:
# "listening" - Shows as "Listening to ..."
# "watching" - Shows as "Watching ..."
# "playing" - Shows as "Playing ..."
# "competing" - Shows as "Competing in ..."
default = "listening"
# ------------------
# Time Settings
# ------------------
[time]
# Enable/disable time progress in Discord
# When enabled:
# - For "listening": Shows as progress bar
# - For other types: Shows as elapsed/remaining time
show = true
# Time display mode:
# true = show elapsed time (e.g., 1:23)
# false = show remaining time (e.g., -1:23)
as_elapsed = false
# ------------------
# Cover Art Settings
# ------------------
[cover]
# List of file names (without extension) to search for local cover art.
# Files are searched in the order listed.
# Extensions like .jpg, .jpeg, .png, .gif are automatically checked.
file_names = ["cover", "folder", "front", "album", "art"]
# How many parent directories to search upwards from the media file's location
# for local cover art. 0 means only search in the same directory.
local_search_depth = 2
[cover.provider]
# Cover art providers (in order of preference)
# "musicbrainz" - Fetch from MusicBrainz database
# "imgbb" - Upload and host on ImgBB
provider = ["musicbrainz", "imgbb"]
[cover.provider.imgbb]
# Your ImgBB API key (required to use the imgbb provider).
# Obtain from https://api.imgbb.com/
# api_key = "your_api_key"
# Expiration time in seconds for images uploaded to ImgBB.
# 0 means the image never expires.
expiration = 86400 # 24 hours
[cover.provider.musicbrainz]
# Minimum score (0-100) required for a MusicBrainz result to be considered valid.
# Higher values mean stricter matching, lower values allow more potential matches and are more likely to be false positives.
min_score = 95
# ------------------
# Player Settings
# ------------------
[player]
# Default configuration for all players
# Fields:
# ignore: Don't show rich presence for this player
# app_id: Discord application ID (get yours at: https://discord.com/developers/docs/quick-start/overview-of-apps)
# icon: Player icon URL (shown as small image)
# show_icon: Show player icon in Discord (as small image)
# allow_streaming: Enable Discord rich presence for web-based media (browsers, streaming services)
# override_activity_type: Will always show this activity type regardless of media content type
default = { ignore = false, app_id = "1121632048155742288", icon = "https://raw.githubusercontent.com/lazykern/mprisence/main/assets/icon.png", show_icon = false, allow_streaming = false }
# ------------------
# Example Player-Specific Settings
# ------------------
# Each player can override any of the default settings above
# Example for VLC Media Player:
[player.vlc_media_player]
app_id = "1124968989538402334"
icon = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/VLC_Icon.svg/1200px-VLC_Icon.svg.png"
show_icon = true
allow_streaming = true
# override_activity_type = "watching"
# You can add more player-specific configurations below, like:
# [player.spotify]
# ignore = true # Example: ignore Spotify
#
# [player.mpv]
# app_id = "YOUR_MPV_DISCORD_APP_ID"
# icon = "URL_TO_MPV_ICON"
# show_icon = true
# override_activity_type = "watching"
# For more examples of player configurations, see config.default.toml (after running the app once to generate it)