Skip to content

Add Slack Now Playing plugin #3242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d2a3faa
feat: Add slack scrobbler
curtisgibby Apr 14, 2025
d023aaf
(feat) Move Slack Now Playing to its own plugin
curtisgibby May 9, 2025
b7f7e73
(fix) Remove unneeded imports and debug logging
curtisgibby May 9, 2025
bbb6685
Add i18n for Slack Now Playing plugin
curtisgibby May 9, 2025
7a5de99
(i18n) Update plugin name and status text to use different languages
curtisgibby May 9, 2025
caf25a3
(i18n) Add localizations for Slack Now Playing
curtisgibby May 9, 2025
747e075
Merge master into slack-now-playing branch
curtisgibby May 9, 2025
a970185
Fix newlines
curtisgibby May 9, 2025
839e21a
chore: revert leftover changes to scrobbler plugin
curtisgibby May 9, 2025
21eb5ac
refactor(slack-now-playing): improve type safety with proper type guards
curtisgibby May 9, 2025
8b757d6
feat: enhance error handling and logging in Slack Now Playing plugin
curtisgibby May 9, 2025
38d964a
feat: add album art caching and temporary file cleanup for Slack plugin
curtisgibby May 9, 2025
7c468dc
refactor: improve Slack API error handling and response typing
curtisgibby May 9, 2025
d560ed2
feat: add caching and rate limiting to Slack API client with improved…
curtisgibby May 9, 2025
d1c329b
feat: add help text and improve layout of Slack Now Playing config di…
curtisgibby May 9, 2025
04b86e4
refactor: remove unnecessary console logs and whitespace in slack-now…
curtisgibby May 9, 2025
ec9a8e4
chore: rename Slack Status to Slack Now Playing in English translations
curtisgibby May 9, 2025
b75c24d
feat: add SSL certificate validation bypass for local development in …
curtisgibby May 9, 2025
af5e58e
refactor: replace axios and form-data with native fetch and formdata-…
curtisgibby May 10, 2025
a8350ec
refactor: Use `unknown` instead of `any`
curtisgibby May 10, 2025
7e89a0d
chore: remove unused @types/form-data dependency
curtisgibby May 10, 2025
94910d6
refactor: Use native JS APIs to send emoji to Slack
curtisgibby May 17, 2025
8a68034
fix: handle FormData file upload in environments without File/Blob su…
curtisgibby May 17, 2025
2e287c7
chore: remove file-type dependency from package.json
curtisgibby May 17, 2025
1fff670
Update pnpm-lock.yaml
curtisgibby May 17, 2025
5d4c531
refactor: simplify image file creation by removing Blob fallback
curtisgibby May 17, 2025
97e928e
(i18n) Revert changes to most language files
curtisgibby May 18, 2025
4aab863
Merge remote-tracking branch 'upstream/master' into slack-now-playing
curtisgibby May 18, 2025
4eb1211
refactor: remove unnecessary fetch options comment in slack API client
curtisgibby May 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"vite:inspect": "pnpm clean && electron-vite build --mode development && pnpm exec serve .vite-inspect",
"start": "electron-vite preview",
"start:debug": "cross-env ELECTRON_ENABLE_LOGGING=1 pnpm start",
"dev": "cross-env NODE_OPTIONS=--enable-source-maps electron-vite dev --watch",
"dev": "cross-env NODE_ENV=development NODE_OPTIONS=--enable-source-maps electron-vite dev --watch",
"dev:renderer": "cross-env NODE_OPTIONS=--enable-source-maps electron-vite dev",
"dev:debug": "cross-env ELECTRON_ENABLE_LOGGING=1 pnpm dev",
"clean": "del-cli dist && del-cli pack && del-cli .vite-inspect",
Expand Down
1,282 changes: 631 additions & 651 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/i18n/resources/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,17 @@
}
}
},
"slack-now-playing": {
"description": "Sets your Slack status to the currently playing song",
"menu": {
"settings": "Settings",
"token": "Slack API Token",
"cookie-token": "Slack Cookie Token",
"emoji-name": "Custom Emoji Name"
},
"name": "Slack Now Playing",
"status-text": "Now Playing: {{artist}} - {{title}}"
},
"downloader": {
"backend": {
"dialog": {
Expand Down
11 changes: 11 additions & 0 deletions src/i18n/resources/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,17 @@
},
"name": "Desactivar reproducción automática"
},
"slack-now-playing": {
"description": "Establece tu estado de Slack con la canción que estás reproduciendo",
"menu": {
"settings": "Configuración",
"token": "Token de API de Slack",
"cookie-token": "Token de Cookie de Slack",
"emoji-name": "Nombre del emoji personalizado"
},
"name": "Estado de Slack",
"status-text": "Reproduciendo: {{artist}} - {{title}}"
},
"discord": {
"backend": {
"already-connected": "Se intentó conectar con una conexión activa",
Expand Down
18 changes: 18 additions & 0 deletions src/plugins/slack-now-playing/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { createPlugin } from '@/utils';
import { onMenu } from './menu';
import { backend, SlackNowPlayingConfig } from './main';
import { t } from '@/i18n';

export default createPlugin({
name: () => t('plugins.slack-now-playing.name'),
description: () => t('plugins.slack-now-playing.description'),
restartNeeded: true,
config: {
enabled: false,
token: '',
cookieToken: '',
emojiName: 'my-album-art',
} as SlackNowPlayingConfig,
menu: onMenu,
backend,
});
Loading