Fix downloader

This commit is contained in:
BarsTiger
2023-10-18 12:29:59 +03:00
parent 9348f1c19b
commit d6868f6570
4 changed files with 40 additions and 14 deletions

View File

@@ -1,7 +1,9 @@
from attrs import define
import ytmusicapi
from .downloader import Downloader
from .downloader import Downloader, YouTubeBytestream
from typing import Awaitable
@define
@@ -31,7 +33,7 @@ class SongItem:
def __str__(self):
return f"{', '.join(self.artists)} - {self.name}"
def to_bytestream(self):
def to_bytestream(self) -> Awaitable[YouTubeBytestream]:
return Downloader.from_id(self.id).to_bytestream()