Code Monkey home page Code Monkey logo

spotify-my-slack's People

Contributors

dependabot[bot] avatar micthiesen avatar thekevinjones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

spotify-my-slack's Issues

Spotify not connecting with "Connect through facebook"

Hello,

I recently tried your app. Installed it, connected slack, connected a "family" spotify account through "connect with facebook" and changed my song on my Linux Spotify client.

No status updated, and the button to connect Spotify didn't change to "connected"

Uncaught error stops update loop

Aug 13 10:28:40 spotify-my-slack app/web.1: (node:4) UnhandledPromiseRejectionWarning: SequelizeConnectionRefusedError: connect ECONNREFUSED 10.231.86.239:5432 
Aug 13 10:28:40 spotify-my-slack app/web.1:     at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:116:24) 
Aug 13 10:28:40 spotify-my-slack app/web.1:     at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:123:14) 
Aug 13 10:28:40 spotify-my-slack app/web.1:     at Connection.emit (events.js:182:13) 
Aug 13 10:28:40 spotify-my-slack app/web.1:     at Socket.reportStreamError (/app/node_modules/pg/lib/connection.js:71:10) 
Aug 13 10:28:40 spotify-my-slack app/web.1:     at Socket.emit (events.js:182:13) 
Aug 13 10:28:40 spotify-my-slack app/web.1:     at emitErrorNT (internal/streams/destroy.js:82:8) 
Aug 13 10:28:40 spotify-my-slack app/web.1:     at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) 
Aug 13 10:28:40 spotify-my-slack app/web.1:     at process._tickCallback (internal/process/next_tick.js:63:19) 
Aug 13 10:28:40 spotify-my-slack app/web.1: (node:4) 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: 99) 
Aug 13 10:28:40 spotify-my-slack app/web.1: (node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 

Default status, or revert to original

It would be nice to be able to set a default status message in the web interface, or after no song was detected it would default the status message to whatever it was before Spotify my Slack changed it.

I would prefer the second option as it doesn't require interaction for the end user.

Getting an asyncpg naive/aware datetime subtraction issue

Hi,

I decided to fork and run this for my company and everything seems in order until I try to connect my Slack, as a user. Basically, this gets thrown:

Traceback (most recent call last):
backend_1   |   File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
backend_1   |     result = await app(self.scope, self.receive, self.send)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
backend_1   |     return await self.app(scope, receive, send)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 140, in __call__
backend_1   |     await super().__call__(scope, receive, send)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 134, in __call__
backend_1   |     await self.error_middleware(scope, receive, send)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 178, in __call__
backend_1   |     raise exc from None
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 156, in __call__
backend_1   |     await self.app(scope, receive, _send)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/middleware/sessions.py", line 75, in __call__
backend_1   |     await self.app(scope, receive, send_wrapper)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 73, in __call__
backend_1   |     raise exc from None
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 62, in __call__
backend_1   |     await self.app(scope, receive, sender)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 590, in __call__
backend_1   |     await route(scope, receive, send)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 208, in __call__
backend_1   |     await self.app(scope, receive, send)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
backend_1   |     response = await func(request)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 133, in app
backend_1   |     raw_response = await dependant.call(**values)
backend_1   |   File "/spotify-my-slack/backend/routers/slack.py", line 62, in slack_grant_callback
backend_1   |     await sign_in(request)
backend_1   |   File "/spotify-my-slack/backend/utils/auth.py", line 18, in sign_in
backend_1   |     user, created = await get_or_create_from_session(session=request.session)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/databases/core.py", line 321, in wrapper
backend_1   |     return await func(*args, **kwargs)
backend_1   |   File "/spotify-my-slack/backend/database/users.py", line 76, in get_or_create_from_session
backend_1   |     user = await User.objects.create(
backend_1   |   File "/usr/local/lib/python3.8/site-packages/orm/models.py", line 237, in create
backend_1   |     instance.pk = await self.database.execute(expr)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/databases/core.py", line 152, in execute
backend_1   |     return await connection.execute(query, values)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/databases/core.py", line 240, in execute
backend_1   |     return await self._connection.execute(self._build_query(query, values))
backend_1   |   File "/usr/local/lib/python3.8/site-packages/databases/backends/postgres.py", line 158, in execute
backend_1   |     return await self._connection.fetchval(query, *args)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/asyncpg/connection.py", line 438, in fetchval
backend_1   |     data = await self._execute(query, args, 1, timeout)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/asyncpg/connection.py", line 1402, in _execute
backend_1   |     result, _ = await self.__execute(
backend_1   |   File "/usr/local/lib/python3.8/site-packages/asyncpg/connection.py", line 1411, in __execute
backend_1   |     return await self._do_execute(query, executor, timeout)
backend_1   |   File "/usr/local/lib/python3.8/site-packages/asyncpg/connection.py", line 1433, in _do_execute
backend_1   |     result = await executor(stmt, None)
backend_1   |   File "asyncpg/protocol/protocol.pyx", line 178, in bind_execute
backend_1   |   File "asyncpg/protocol/prepared_stmt.pyx", line 160, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg
backend_1   | asyncpg.exceptions.DataError: invalid input for query argument $1: datetime.datetime(2020, 2, 26, 15, 13, 6... (can't subtract offset-naive and offset-aware datetimes)

I've tried to make all the datetime objects in the code timezone-unaware, to see if anything odd was going on there, but that didn't help anything. I realize you're no longer maintaining this, but I thought I'd ask, just in case it's something you've already encountered and had a minute to answer. Thanks !

Don't cache the homepage

I believe the homepage / is being cached sometimes (response status 304). This prevents correct information from being shown, for example if a user has logged in with Spotify the button style might not update (this was the symptom I saw).

Disable custom emojis :(

It has been requested that users are given the option to disable emojis based on song and artist names. The alternative behaviour will be to cycle between the 3 generic "sound" emojis.

Some sort of user settings will have to be implemented in order to support this.

Prod application: Cannot connect spotify or slack

I don't know if this is the right place to post it but the prod application cannot accept new connection. The spotify button nor the slack button work so a new connection cannot be made unfortunately.

Use FastAPI for the backend

One reason I used Node.js for the backed is for the excellent single-thread concurrency support. I run this project on a single hobby Heroku dyno (both the web server and the update tasks). The downside of using Node.js is that I am somewhat unfamiliar with it and also, without typing, it's difficult to manage.

I'm much more comfortable with Python. Using FastAPI seems like we may get to keep the performance benefits while using a nicer backend framework at the same time.

Connecting to Spotify requires multiple attempts

Not sure what's happening here, but sometimes you have to click "Connect Spotify" multiple times before it registers. This is a more general issue to replace #3 which made a few too many assumptions.

Add debug logs

I've removed some of the spammy logs so only errors and warnings are shown, but it would still be useful to be able to enable more verbose debug logs. Maybe use debug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.