feat: dodano pasek postępu odtwarzania w czasie rzeczywistym w panelu webowym

This commit is contained in:
mmacierzanka committed 2026-05-23 15:04:42 +02:00
1 parent c550215070
commit 3eee27edfd
5 files changed
+132 -1

No files matched your search

+8
View File
@@ -32,6 +32,14 @@ class YTDLSource(discord.PCMVolumeTransformer):
self.title = data.get('title')
self.url = data.get('url')
self.id = uuid.uuid4().hex # Unique track identifier
self.duration = data.get('duration') # Duration in seconds
self.elapsed = 0.0 # Elapsed time in seconds
def read(self):
data = super().read()
if data:
self.elapsed += 0.02 # 20ms frames read
return data
@classmethod
async def from_url(cls, url, *, loop=None, stream=False):