File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 44
55import time
66from dataclasses import dataclass , field
7- from typing import Any , Self
7+ from typing import Any
88
99from mashumaro import DataClassDictMixin , field_options , pass_through
1010
1111from .enums import PlaybackState , RepeatMode
12- from .media_items import MediaItemType , media_from_dict
12+ from .media_items import MediaItemType
1313from .queue_item import QueueItem
1414
1515
@@ -101,10 +101,3 @@ def to_cache(self) -> dict[str, Any]:
101101 # otherwise 'dont stop the music' will not work
102102 d ["enqueued_media_items" ] = [x .to_dict () for x in self .enqueued_media_items ]
103103 return d
104-
105- @classmethod
106- def from_cache (cls , d : dict [Any , Any ]) -> Self :
107- """Restore a PlayerQueue from a cache dict."""
108- if "enqueued_media_items" in d :
109- d ["enqueued_media_items" ] = [media_from_dict (x ) for x in d ["enqueued_media_items" ]]
110- return cls .from_dict (d )
You can’t perform that action at this time.
0 commit comments