mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Adding more stability to Searcher
This commit is contained in:
@@ -2,7 +2,7 @@ from discord.ext.commands import Context
|
||||
from discord import Client
|
||||
from Controllers.AbstractController import AbstractController
|
||||
from Controllers.ControllerResponse import ControllerResponse
|
||||
from Utils.Utils import format_time
|
||||
from Utils.Utils import Utils
|
||||
|
||||
|
||||
class HistoryController(AbstractController):
|
||||
@@ -18,7 +18,7 @@ class HistoryController(AbstractController):
|
||||
else:
|
||||
text = f'\n📜 History Length: {len(history)} | Max: {self.config.MAX_SONGS_HISTORY}\n'
|
||||
for pos, song in enumerate(history, start=1):
|
||||
text += f"**`{pos}` - ** {song.title} - `{format_time(song.duration)}`\n"
|
||||
text += f"**`{pos}` - ** {song.title} - `{Utils.format_time(song.duration)}`\n"
|
||||
|
||||
embed = self.embeds.HISTORY(text)
|
||||
return ControllerResponse(self.ctx, embed)
|
||||
|
||||
@@ -3,7 +3,7 @@ from discord import Client
|
||||
from Controllers.AbstractController import AbstractController
|
||||
from Controllers.ControllerResponse import ControllerResponse
|
||||
from Music.Downloader import Downloader
|
||||
from Utils.Utils import format_time
|
||||
from Utils.Utils import Utils
|
||||
|
||||
|
||||
class QueueController(AbstractController):
|
||||
@@ -29,15 +29,15 @@ class QueueController(AbstractController):
|
||||
else:
|
||||
title = self.config.QUEUE_TITLE
|
||||
|
||||
total_time = format_time(sum([int(song.duration if song.duration else 0)
|
||||
for song in songs_preload]))
|
||||
total_time = Utils.format_time(sum([int(song.duration if song.duration else 0)
|
||||
for song in songs_preload]))
|
||||
total_songs = len(self.player.playlist)
|
||||
|
||||
text = f'📜 Queue length: {total_songs} | ⌛ Duration: `{total_time}` downloaded \n\n'
|
||||
|
||||
for pos, song in enumerate(songs_preload, start=1):
|
||||
song_name = song.title if song.title else self.config.SONG_DOWNLOADING
|
||||
text += f"**`{pos}` - ** {song_name} - `{format_time(song.duration)}`\n"
|
||||
text += f"**`{pos}` - ** {song_name} - `{Utils.format_time(song.duration)}`\n"
|
||||
|
||||
embed = self.embeds.QUEUE(title, text)
|
||||
return ControllerResponse(self.ctx, embed)
|
||||
|
||||
Reference in New Issue
Block a user