Audio Fixes (#4492)

* handles #4491

* add typing indicators to audio playlists commands like discussed with aika.

* recheck perms upon change of token to avoid needing a reload.

* Ensure the player lock is always released... on rewrite to this as a callback to the task.

* ffs

* resolves#4495

* missed one

* aaaaaaaaa

* fix https://canary.discord.com/channels/133049272517001216/387398816317440000/766711707921678396

* some tweaks

* Clear errors to users around YouTube Quota
This commit is contained in:
Draper
2020-10-20 17:57:02 +01:00
committed by GitHub
parent 335e2a7c25
commit e31196d19f
39 changed files with 1255 additions and 1014 deletions

View File

@@ -3,6 +3,7 @@ import contextlib
import json
import logging
import time
from pathlib import Path
from typing import TYPE_CHECKING, List, Mapping, MutableMapping, Optional, Tuple, Union
@@ -19,7 +20,7 @@ from ..errors import SpotifyFetchError
if TYPE_CHECKING:
from .. import Audio
_ = Translator("Audio", __file__)
_ = Translator("Audio", Path(__file__))
log = logging.getLogger("red.cogs.Audio.api.Spotify")
@@ -104,7 +105,7 @@ class SpotifyWrapper:
log.debug(f"Issue making GET request to {url}: [{r.status}] {data}")
return data
def update_token(self, new_token: Mapping[str, str]):
async def update_token(self, new_token: Mapping[str, str]):
self._token = new_token
async def get_token(self) -> None: