lyrics_info.py 869 B

1234567891011121314151617181920212223242526
  1. from typing import TYPE_CHECKING, Optional
  2. from yandex_music import YandexMusicModel
  3. from yandex_music.utils import model
  4. if TYPE_CHECKING:
  5. from yandex_music import ClientType
  6. @model
  7. class LyricsInfo(YandexMusicModel):
  8. """Класс, описывающий доступные тексты трека.
  9. Attributes:
  10. has_available_sync_lyrics (:obj:`bool`): Наличие синхронизированного текста.
  11. has_available_text_lyrics (:obj:`bool`): Наличие текста трека.
  12. client (:obj:`yandex_music.Client`, optional): Клиент Yandex Music.
  13. """
  14. has_available_sync_lyrics: bool
  15. has_available_text_lyrics: bool
  16. client: Optional['ClientType'] = None
  17. def __post_init__(self) -> None:
  18. self._id_attrs = (self.has_available_sync_lyrics, self.has_available_text_lyrics)