- More Discord options:

- Added the ability to hide the current song from the discord activity and display a custom text instead
  - Added the ability to customize the text that is shown when no song is playing
  - Discord now reacts to pausing/unpausing events
- Refactored media info updates so it only updates the required info, fixes #342, #306
- Added 5.9.0 logs/versions/migrations
This commit is contained in:
2024-02-11 22:42:45 +01:00
parent e37b2f99cc
commit b11dbbd6d8
8 changed files with 172 additions and 106 deletions

View File

@@ -57,7 +57,7 @@ let adBlock: HTMLInputElement,
discord_button_text: HTMLInputElement,
discord_show_song: HTMLInputElement,
discord_idle_text: HTMLInputElement,
discord_listening_text: HTMLInputElement;
discord_using_text: HTMLInputElement;
addCustomCss(app);
@@ -148,7 +148,7 @@ function refreshSettings() {
discord_button_text.value = settingsStore.get(settings.discord.buttonText);
discord_show_song.checked = settingsStore.get(settings.discord.showSong);
discord_idle_text.value = settingsStore.get(settings.discord.idleText);
discord_listening_text.value = settingsStore.get(settings.discord.listeningText);
discord_using_text.value = settingsStore.get(settings.discord.usingText);
// set state of all switches with additional settings
Object.values(switchesWithSettings).forEach((settingSwitch) => {
@@ -263,7 +263,7 @@ window.addEventListener("DOMContentLoaded", () => {
listenbrainz_delay = get("listenbrainz_delay");
discord_button_text = get("discord_button_text");
discord_show_song = get("discord_show_song");
discord_listening_text = get("discord_listening_text");
discord_using_text = get("discord_using_text");
discord_idle_text = get("discord_idle_text")
refreshSettings();
@@ -301,5 +301,5 @@ window.addEventListener("DOMContentLoaded", () => {
addInputListener(discord_button_text, settings.discord.buttonText);
addInputListener(discord_show_song, settings.discord.showSong, switchesWithSettings.discord_show_song);
addInputListener(discord_idle_text, settings.discord.idleText);
addInputListener(discord_listening_text, settings.discord.listeningText);
addInputListener(discord_using_text, settings.discord.usingText);
});

View File

@@ -227,9 +227,9 @@
<div class="group__option" class="hidden">
<div class="group__description">
<h4>Listening Text</h4>
<p>The text displayed on Discord's rich presence while listening to a song.</p>
<input id="discord_listening_text" type="text" class="text-input" name="discord_listening_text" />
<h4>Using Tidal Text</h4>
<p>The text displayed on Discord's rich presence while "showSong" is turned off</p>
<input id="discord_using_text" type="text" class="text-input" name="discord_using_text" />
</div>
</div>
@@ -432,7 +432,7 @@
<img alt="tidal icon" class="about-section__icon" src="./icon.png" />
<h4>TIDAL Hi-Fi</h4>
<div class="about-section__version">
<a href="https://github.com/Mastermindzh/tidal-hifi/releases/tag/5.8.0">5.8.0</a>
<a href="https://github.com/Mastermindzh/tidal-hifi/releases/tag/5.9.0">5.9.0</a>
</div>
<div class="about-section__links">
<a href="https://github.com/mastermindzh/tidal-hifi/" class="about-section__button">Github <i
@@ -454,4 +454,4 @@
</div>
</body>
</html>
</html>