jackcuthbert / slack-fm Goto Github PK
View Code? Open in Web Editor NEWA tiny self-hosted service that automatically updates your Slack status from your Last.fm profile.
License: MIT License
A tiny self-hosted service that automatically updates your Slack status from your Last.fm profile.
License: MIT License
Slack has finally retired the creation of new legacy tokens making this project a non-starter for people who haven't already created a token. For slack-fm to continue working it needs to be refactored to use the Slack App method rather than a legacy token.
If you already have a legacy token you can still use that or re-issue it and slack-fm will continue to work.
This issue will track any progress made towards making sure slack-fm continues to work into the future.
Slack seems to have killed off the legacy API?
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (<anonymous>),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
[Slack] Getting user presence,
Error: internal_error,
at Object.getSlackPresence (/app/dist/utils/slack.js:74:19),
at runMicrotasks (),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
at async main (/app/dist/index.js:42:29),
Unsure if this will work to reduce the number of slack API requests but it's worth a shot
Seems intermittent, trace:
(node:24) UnhandledPromiseRejectionWarning: Error: Operation failed - Most likely the backend service failed. Please try again.
at getLastFmTrack (/app/dist/index.js:42:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:24) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 90)
If a song doesn't have a duration stored in Last.fm then the last song you listen to for the day won't be unset. To resolve this, set a long default duration when setting the slack status.
I made a change in 1.3.0 that moves the time restrictions first which means that any updates outside active hours won't clear any previously set status.
I have both personal and work Slack accounts and running this wonderful program allows me to update my status on one of them, but I'm curious if there's a best practice for updating multiple? I could run another image with a different Slack API Key but then it would double the calls to last.fm, right?
Thanks
Instead of manually clearing statuses and checking for previously set statuses slack-fm should be able to rely on slacks status expiration feature and a configurable "typical song length" (or actual duration value from the track.getinfo API).
This should save a couple API requests to clear a status when:
Mechanism to remove any status set by the app outside running hours. Perhaps detect the unique combination of the middle dot and the :headphones:
emoji so it doesn't remove anything set by the user.
At the moment all releases are manual which means I have to git tag
and version bump package.json
every time a new image is to be built in DockerHub.
Really long titles like Bring me the Horizon's new "One Day the Only Butterflies Left Will Be in Your Chest as You March Towards Your Death" definitely don't fit. These titles should probably be truncated to fit so at least the start of the names can be seen on Slack.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.