This PR adds two features to enhance the user's control over the discord integration:
The ability to hide the current song from the discord activity and display a custom text instead
The ability to customize the text that is shown when no song is playing
Detailed description
To implement these features, this PR introduces three new settings in the discord section of the configuration:
showSong (boolean): This setting determines whether the current song is shown in the discord activity or not. If set to true, the current song will be displayed as usual. If set to false, the custom text specified by the listeningText setting will be shown instead.
idleText (string): This setting specifies the text that is shown in the discord activity when no song is playing. The default value is Browsing Tidal.
listeningText (string): This setting specifies the text that is shown in the discord activity when a song is playing and the showSong setting is set to false. The default value is Listening Tidal.
To handle the different scenarios, this PR also introduces a new function in src/scripts/discord.ts:
getActivity: This function returns the appropriate Presence object based on the current song and the settings. It is used by the other functions in the same file to update the discord activity.
This PR does not include a migration for the storage, as it is uncertain when or if this code will be merged.
I would like to thank the owners and contributors of this project for creating and maintaining this awesome project. I hope this PR will be useful and welcome.
This PR adds two features to enhance the user's control over the discord integration:
Detailed description
To implement these features, this PR introduces three new settings in the
discord
section of the configuration:showSong
(boolean): This setting determines whether the current song is shown in the discord activity or not. If set totrue
, the current song will be displayed as usual. If set tofalse
, the custom text specified by thelisteningText
setting will be shown instead.idleText
(string): This setting specifies the text that is shown in the discord activity when no song is playing. The default value isBrowsing Tidal
.listeningText
(string): This setting specifies the text that is shown in the discord activity when a song is playing and theshowSong
setting is set tofalse
. The default value isListening Tidal
.To handle the different scenarios, this PR also introduces a new function in
src/scripts/discord.ts
:getActivity
: This function returns the appropriatePresence
object based on the current song and the settings. It is used by the other functions in the same file to update the discord activity.This PR does not include a migration for the storage, as it is uncertain when or if this code will be merged.
I would like to thank the owners and contributors of this project for creating and maintaining this awesome project. I hope this PR will be useful and welcome.