mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Change default local cache level (#5140)
* Change default local cache level * Update the owner message as well
This commit is contained in:
parent
c3362f6eaa
commit
be04ec1c86
@ -198,7 +198,7 @@ class AudioAPIInterface:
|
||||
uri: str,
|
||||
notifier: Optional[Notifier],
|
||||
skip_youtube: bool = False,
|
||||
current_cache_level: CacheLevel = CacheLevel.none(),
|
||||
current_cache_level: CacheLevel = CacheLevel.all(),
|
||||
) -> List[str]:
|
||||
"""Return youtube URLS for the spotify URL provided."""
|
||||
youtube_urls = []
|
||||
@ -718,7 +718,7 @@ class AudioAPIInterface:
|
||||
self,
|
||||
ctx: commands.Context,
|
||||
track_info: str,
|
||||
current_cache_level: CacheLevel = CacheLevel.none(),
|
||||
current_cache_level: CacheLevel = CacheLevel.all(),
|
||||
) -> Optional[str]:
|
||||
"""Call the Youtube API and returns the youtube URL that the query matched."""
|
||||
track_url = await self.youtube_api.get_call(track_info)
|
||||
|
||||
@ -15,7 +15,7 @@ from redbot.core.commands import Cog
|
||||
from redbot.core.data_manager import cog_data_path
|
||||
from redbot.core.i18n import Translator, cog_i18n
|
||||
|
||||
from ..utils import PlaylistScope
|
||||
from ..utils import CacheLevel, PlaylistScope
|
||||
from . import abc, cog_utils, commands, events, tasks, utilities
|
||||
from .cog_utils import CompositeMetaClass
|
||||
|
||||
@ -95,7 +95,7 @@ class Audio(
|
||||
schema_version=1,
|
||||
bundled_playlist_version=0,
|
||||
owner_notification=0,
|
||||
cache_level=0,
|
||||
cache_level=CacheLevel.all().value,
|
||||
cache_age=365,
|
||||
daily_playlists=False,
|
||||
global_db_enabled=False,
|
||||
|
||||
@ -260,10 +260,7 @@ See `[p]help audioset globalapi` for more information.
|
||||
Access to this service is disabled by default and **requires you to explicitly opt-in** to start using it.
|
||||
|
||||
An access token is **required** to use this API. To obtain this token you may join <https://discord.gg/red> and run `?audioapi register` in the #testing channel.
|
||||
Note: by using this service you accept that your bot's IP address will be disclosed to the Cog-Creators organization and used only for the purpose of providing the Global API service.
|
||||
|
||||
On a related note, it is highly recommended that you enable your local cache if you haven't yet.
|
||||
To do so, run `[p]audioset cache 5`. This cache, which stores only metadata, will make repeated audio requests faster and further reduce the likelihood of YouTube rate-limiting your bot. Since it's only metadata the required disk space for this cache is expected to be negligible."""
|
||||
Note: by using this service you accept that your bot's IP address will be disclosed to the Cog-Creators organization and used only for the purpose of providing the Global API service."""
|
||||
)
|
||||
await send_to_owners_with_prefix_replaced(self.bot, msg)
|
||||
await self.config.owner_notification.set(1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user