Skip to content

fix models for get_album_with_tracks method#7

Merged
KatantDev merged 3 commits into
KatantDev:devfrom
unicoder7726:fixmodels
Apr 4, 2026
Merged

fix models for get_album_with_tracks method#7
KatantDev merged 3 commits into
KatantDev:devfrom
unicoder7726:fixmodels

Conversation

@unicoder7726

Copy link
Copy Markdown

No description provided.

from ymdantic.models.tracks.r128 import R128
from ymdantic.models.tracks.track import Track, UnavailableTrack

TrackType = Union[UnavailablePodcast, Podcast, Track, UnavailableTrack]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему порядок поменял?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вернул обратно, заработало.

Comment thread ymdantic/models/tracks/track.py Outdated
type: Literal["music", "asmr", "audiobook", "noise", "fairy-tale"]
# Тип трека.
available: Literal[True]
available: bool = True

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему?

@unicoder7726 unicoder7726 Apr 3, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вернул обратно

Comment thread ymdantic/models/tracks/track.py Outdated
type: Literal["music", "asmr", "audiobook", "noise", "fairy-tale"]
# Тип трека.
available: Literal[False]
available: Literal[False] = False

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему?

@unicoder7726 unicoder7726 Apr 3, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вернул обратно

Comment thread ymdantic/models/tracks/podcast.py Outdated
short_description: str | None = None
# Краткое описание подкаста (если есть).

@model_validator(mode="before")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем? Оно и так резолвило нормально

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Удалю, заработало вроде

Comment thread tests/albums/test_get_album_with_tracks.py
@unicoder7726 unicoder7726 deployed to pull_requests April 3, 2026 17:58 — with GitHub Actions Active
@KatantDev KatantDev merged commit e9b7b63 into KatantDev:dev Apr 4, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants