File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ class EventType(StrEnum):
379379 PLAYER_ADDED = "player_added"
380380 PLAYER_UPDATED = "player_updated"
381381 PLAYER_REMOVED = "player_removed"
382- PLAYER_SETTINGS_UPDATED = "player_settings_updated "
382+ PLAYER_CONFIG_UPDATED = "player_config_updated "
383383 QUEUE_ADDED = "queue_added"
384384 QUEUE_UPDATED = "queue_updated"
385385 QUEUE_ITEMS_UPDATED = "queue_items_updated"
@@ -390,7 +390,6 @@ class EventType(StrEnum):
390390 MEDIA_ITEM_UPDATED = "media_item_updated"
391391 MEDIA_ITEM_DELETED = "media_item_deleted"
392392 PROVIDERS_UPDATED = "providers_updated"
393- PLAYER_CONFIG_UPDATED = "player_config_updated"
394393 SYNC_TASKS_UPDATED = "sync_tasks_updated"
395394 AUTH_SESSION = "auth_session"
396395 UNKNOWN = "unknown"
@@ -526,6 +525,9 @@ class StreamType(StrEnum):
526525 # other_ffmpeg: any other ffmpeg compatible input stream (used together with extra_input_args)
527526 OTHER_FFMPEG = "other_ffmpeg"
528527
528+ # cache_file: (temporary) cached file - path provided in path
529+ CACHE_FILE = "cache_file"
530+
529531 # custom: custom (bytes) stream - provided by an (async) generator
530532 CUSTOM = "custom"
531533
Original file line number Diff line number Diff line change @@ -103,6 +103,19 @@ class StreamDetails(DataClassDictMixin):
103103 repr = False ,
104104 )
105105
106+ # enable_cache: bool to indicate that the audio be be temporary cached
107+ # this increases performance (especially while seeking) and reduces network
108+ # usage for streams that are played multiple times. For some (slow) streams
109+ # its even required to prevent buffering issues.
110+ # leave/set to None to let the core decide based on the stream type.
111+ # True to enforce caching, False to disable caching.
112+ enable_cache : bool | None = field (
113+ default = None ,
114+ compare = False ,
115+ metadata = field_options (serialize = "omit" , deserialize = pass_through ),
116+ repr = False ,
117+ )
118+
106119 #############################################################################
107120 # the fields below will be set/controlled by the streamcontroller #
108121 #############################################################################
@@ -150,6 +163,12 @@ class StreamDetails(DataClassDictMixin):
150163 metadata = field_options (serialize = "omit" , deserialize = pass_through ),
151164 repr = False ,
152165 )
166+ cache : Any = field (
167+ default = None ,
168+ compare = False ,
169+ metadata = field_options (serialize = "omit" , deserialize = pass_through ),
170+ repr = False ,
171+ )
153172
154173 def __str__ (self ) -> str :
155174 """Return pretty printable string of object."""
You can’t perform that action at this time.
0 commit comments