Skip to content

Commit

Permalink
feat: New media-player entity features and RepeatMode enum (#16)
Browse files Browse the repository at this point in the history
Additional features: context_menu, settings
  • Loading branch information
zehnm authored Mar 4, 2024
1 parent 89c7e22 commit 6812d70
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

_Changes in the next release_

### Added
- Media-player RepeatMode enum and new features: context_menu, settings

---

## v0.1.5 - 2024-02-28
Expand Down
12 changes: 12 additions & 0 deletions ucapi/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Features(str, Enum):
NUMPAD = "numpad"
HOME = "home"
MENU = "menu"
CONTEXT_MENU = "context_menu"
GUIDE = "guide"
INFO = "info"
COLOR_BUTTONS = "color_buttons"
Expand All @@ -66,6 +67,7 @@ class Features(str, Enum):
AUDIO_TRACK = "audio_track"
SUBTITLE = "subtitle"
RECORD = "record"
SETTINGS = "settings"


class Attributes(str, Enum):
Expand Down Expand Up @@ -133,6 +135,7 @@ class Commands(str, Enum):
FUNCTION_BLUE = "function_blue"
HOME = "home"
MENU = "menu"
CONTEXT_MENU = "context_menu"
GUIDE = "guide"
INFO = "info"
BACK = "back"
Expand All @@ -145,6 +148,7 @@ class Commands(str, Enum):
OPEN_CLOSE = "open_close"
AUDIO_TRACK = "audio_track"
SUBTITLE = "subtitle"
SETTINGS = "settings"
SEARCH = "search"


Expand Down Expand Up @@ -175,6 +179,14 @@ class MediaType(str, Enum):
VIDEO = "VIDEO"


class RepeatMode(str, Enum):
"""Repeat modes."""

OFF = "OFF"
ALL = "ALL"
ONE = "ONE"


class MediaPlayer(Entity):
"""
Media-player entity class.
Expand Down

0 comments on commit 6812d70

Please sign in to comment.