Compare commits
1 Commits
2f1f72ad5d
...
2a0d281086
| Author | SHA1 | Date |
|---|---|---|
|
|
2a0d281086 |
|
|
@ -16,7 +16,7 @@ repos:
|
|||
- id: black
|
||||
language_version: python3.12
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.19.1
|
||||
rev: v3.19.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py37-plus, --keep-runtime-typing]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Pomice
|
|||
~~~~~~
|
||||
The modern Lavalink wrapper designed for discord.py.
|
||||
|
||||
Copyright (c) 2024, cloudwithax
|
||||
Copyright (c) 2023, cloudwithax
|
||||
|
||||
Licensed under GPL-3.0
|
||||
"""
|
||||
|
|
@ -20,7 +20,7 @@ if not discord.version_info.major >= 2:
|
|||
"using 'pip install discord.py'",
|
||||
)
|
||||
|
||||
__version__ = "2.9.2"
|
||||
__version__ = "2.9.1"
|
||||
__title__ = "pomice"
|
||||
__author__ = "cloudwithax"
|
||||
__license__ = "GPL-3.0"
|
||||
|
|
|
|||
|
|
@ -711,8 +711,6 @@ class Node:
|
|||
search_type
|
||||
and not URLRegex.BASE_URL.match(query)
|
||||
and not re.match(r"(?:[a-z]+?)search:.", query)
|
||||
and not URLRegex.DISCORD_MP3_URL.match(query)
|
||||
and not path.exists(path.dirname(query))
|
||||
):
|
||||
query = f"{search_type}:{query}"
|
||||
|
||||
|
|
@ -780,7 +778,7 @@ class Node:
|
|||
|
||||
return [
|
||||
Track(
|
||||
track_id=track["encoded"],
|
||||
track_id=track["track"],
|
||||
info={
|
||||
"title": local_file.name,
|
||||
"author": "Unknown",
|
||||
|
|
|
|||
|
|
@ -203,13 +203,9 @@ class Queue(Iterable[Track]):
|
|||
raise QueueEmpty("No items in the queue.")
|
||||
|
||||
if self._loop_mode == LoopMode.QUEUE:
|
||||
# set current item to first track in queue if not set already
|
||||
# otherwise exception will be raised
|
||||
if not self._current_item or self._current_item not in self._queue:
|
||||
if self._queue:
|
||||
item = self._queue[0]
|
||||
else:
|
||||
raise QueueEmpty("No items in the queue.")
|
||||
# recurse if the item isnt in the queue
|
||||
if self._current_item not in self._queue:
|
||||
self.get()
|
||||
|
||||
# set current item to first track in queue if not set already
|
||||
if not self._current_item:
|
||||
|
|
|
|||
Loading…
Reference in New Issue