Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated properties from MediaController #838

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 0 additions & 35 deletions pychromecast/controllers/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,41 +624,6 @@ def _send_command(
command, callback_function=callback_function, inc_session_id=True
)

@property
def is_playing(self) -> bool:
"""Deprecated as of June 8, 2015. Use self.status.player_is_playing.
Returns if the Chromecast is playing."""
return self.status is not None and self.status.player_is_playing

@property
def is_paused(self) -> bool:
"""Deprecated as of June 8, 2015. Use self.status.player_is_paused.
Returns if the Chromecast is paused."""
return self.status is not None and self.status.player_is_paused

@property
def is_idle(self) -> bool:
"""Deprecated as of June 8, 2015. Use self.status.player_is_idle.
Returns if the Chromecast is idle on a media supported app."""
return self.status is not None and self.status.player_is_idle

@property
def title(self) -> str | None:
"""Deprecated as of June 8, 2015. Use self.status.title.
Return title of the current playing item."""
return None if not self.status else self.status.title

@property
def thumbnail(self) -> str | None:
"""Deprecated as of June 8, 2015. Use self.status.images.
Return thumbnail url of current playing item."""
if not self.status:
return None

images = self.status.images

return images[0].url if images else None

def play(self, timeout: float = 10.0) -> None:
"""Send the PLAY command."""
response_handler = WaitResponse(timeout)
Expand Down