final commit
This commit is contained in:
parent
c35df24186
commit
63ee4b6ee1
1 changed files with 3 additions and 6 deletions
|
@ -1,14 +1,10 @@
|
|||
import os
|
||||
import urllib.parse
|
||||
from email import header
|
||||
|
||||
import requests
|
||||
from auth.session import SessionData, SessionManager
|
||||
from fastapi import APIRouter
|
||||
from fastapi.responses import RedirectResponse
|
||||
|
||||
from backend.endpoints.queue import delete_item
|
||||
|
||||
music_router = APIRouter(prefix="/music")
|
||||
|
||||
SPOTIFY_CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID")
|
||||
|
@ -58,7 +54,7 @@ def callback(code: str):
|
|||
|
||||
return {
|
||||
"changed": session != old_session,
|
||||
"access_token": session.access_token,
|
||||
"access_token": session.access_token,
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,7 +86,7 @@ def play(song_id: str):
|
|||
"Content-Type": "application/json"
|
||||
}
|
||||
print(body)
|
||||
response = requests.put(url,json=body, headers=header)
|
||||
response = requests.put(url, json=body, headers=header)
|
||||
|
||||
return response.json()
|
||||
except Exception as e:
|
||||
|
@ -109,6 +105,7 @@ def current_song():
|
|||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
@music_router.get("/add_queue_track")
|
||||
async def add_queue_track(song_id: str):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue