Compare commits

...

3 Commits

Author SHA1 Message Date
pre-commit-ci[bot] 2f1f72ad5d
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0)
- [github.com/psf/black: 23.10.1 → 24.10.0](https://github.com/psf/black/compare/23.10.1...24.10.0)
- [github.com/asottile/pyupgrade: v3.15.0 → v3.19.1](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.19.1)
- [github.com/asottile/reorder-python-imports: v3.12.0 → v3.14.0](https://github.com/asottile/reorder-python-imports/compare/v3.12.0...v3.14.0)
2024-12-23 18:08:06 +00:00
cloudwithax 855bf4e0d7 2.9.2 2024-11-21 21:11:24 -05:00
cloudwithax cd579becad fixed file playing and recursion issue in queue looping 2024-11-21 21:06:32 -05:00
4 changed files with 16 additions and 10 deletions

View File

@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
@ -11,17 +11,17 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.10.1
rev: 24.10.0
hooks:
- id: black
language_version: python3.12
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
rev: v3.14.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/asottile/add-trailing-comma

View File

@ -3,7 +3,7 @@ Pomice
~~~~~~
The modern Lavalink wrapper designed for discord.py.
Copyright (c) 2023, cloudwithax
Copyright (c) 2024, 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.1"
__version__ = "2.9.2"
__title__ = "pomice"
__author__ = "cloudwithax"
__license__ = "GPL-3.0"

View File

@ -711,6 +711,8 @@ 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}"
@ -778,7 +780,7 @@ class Node:
return [
Track(
track_id=track["track"],
track_id=track["encoded"],
info={
"title": local_file.name,
"author": "Unknown",

View File

@ -203,9 +203,13 @@ class Queue(Iterable[Track]):
raise QueueEmpty("No items in the queue.")
if self._loop_mode == LoopMode.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
# 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.")
# set current item to first track in queue if not set already
if not self._current_item: